Trapezoidal Speed Profiles – Related TML Instructions and Data

Parameters

CSPD        Command speed – desired slew speed for the load. The sign specifies the direction. Measured in speed units

CACC        Command acceleration – desired acceleration / deceleration for the load. The command acceleration can have only positive values. Measured in acceleration units.

 

Variables

TPOS        Target load position – position reference computed by the reference generator at each slow loop sampling period. TPOS is computed by integrating the target speed TSPD.Measured in position units

TSPD        Target load speed – speed reference computed by the reference generator at each slow loop sampling period. Measured in speed units

TACC        Target load acceleration – acceleration/deceleration reference computed by the reference generator at each slow loop sampling period. Measured in acceleration units

APOS_LD        Actual load position. Measured in position units. Alternate name: APOS.

ASPD_LD        Actual load speed – measured in speed units.

APOS_MT        Actual motor position. Measured in motor position units.

ASPD_MT        Actual motor speed. Measured in motor speed units. Alternate name: ASPD

 

Instructions

MODE SP        Set speed profile mode

TUM1        Target Update Mode 1 (TUM1). Generates new trajectory starting from the actual values of position and speed reference (i.e. don’t update the reference values with load/motor position and speed)

TUM0        Target Update Mode 0 (TUM0). Generates new trajectory starting from the actual values of load/motor position and speed (i.e. update the reference values with load/motor position and speed)

UPD        Update motion parameters and start new motion mode

STOP        STOP the motion.

 

Remarks:

The sum between CSPD and CACC values must be maximum 32767.99998 (0x7FFF.FFFF) i.e. the maximum value for fixed number.
After a STOP command or after setting jog speed command to zero, you can find when the motion is completed, by setting an event on motion complete and waiting until this event occurs.
In order to activate the TUM1 mode, execute the TML instruction TUM1 AFTER the MODE SP command and BEFORE the UPD command. When MODE SP is executed, it automatically sets TUM0 mode. However, as the new motion mode becomes effective only after the UPD command, a TUM1 command will overwrite the TUM0 mode
Under TUM0 mode, at the UPD command TPOS=APOS_LD and TSPD=ASPD_LD. In open loop control of steppers, TUM0 is ignored as there is no position and/or speed feedback
In setup configurations where there is no transmission ratio between the motor and the load, it is supposed that these are directly connected. In these cases: APOS_MT=APOS_LD and ASPD_MT=ASPD_LD

 

Programming Example        

// Speed profile with position feedback on motor: 500 lines

// incremental encoder (2000 counts/rev)

CACC = 0.1591;//acceleration rate = 500[rad/s^2]

CSPD = 40;//jog speed = 1200[rpm]

MODE SP; // set trapezoidal speed profile mode

TUM1; //set Target Update Mode 1

UPD; //execute immediate

 

See also:

Trapezoidal Speed Profiles – TML Programming Details

TML Description