pcimatti78 - 2020-09-02

Hi , I'm trying to use the softmotion light function but i found a problem in the MC_MoveVelocity_SML

The MC_MoveVelocity_SML function pass to the objects TargetVel 60FFh, ProfAcc 6083h, ProfDec 6084h the value passed in the FB in units scaled by (Axis.dwRatioTechUnitsDenom) / Axis.iRatioTechUnitsNum)

this is incorrect because by the CIA DS402 these values should be expressed in 1/10 of RPM for the 60FFh and in msec from 0 to 3000RPM for the 6083h and 6084h and not in pulses/second and pulses/second^2

I have encapsulated the correct scaling of these factor in an outer FB,

Acceleration := Velocity / Acceleration;
Deceleration := Velocity / Deceleration;

Velocity := (Velocity * 600.0) / IncPerTurns;

Acceleration := (Acceleration * 3000000.0) / (Velocity * EXPT(DWORD_TO_LREAL (Axis.dwRatioTechUnitsDenom) / DWORD_TO_LREAL (Axis.iRatioTechUnitsNum), 2));
Deceleration := (Deceleration * 3000000.0) / (Velocity * EXPT(DWORD_TO_LREAL (Axis.dwRatioTechUnitsDenom) / DWORD_TO_LREAL (Axis.iRatioTechUnitsNum), 2));

anyway there is the necessity also to pass the number of Incrementsper turns because the

SML_Drive_ETC.Axis_REF_ETC_DSP402_SML

doesn't contains this value