Parameters
| Command position – desired position (absolute or relative) for the load. Measured in position units. |
| Command speed – desired slew speed for the load. The command speed can have only positive values. Measured in speed units. |
| Command acceleration – desired acceleration / deceleration for the load. The command acceleration can have only positive values. Measured in acceleration units |
ACR Auxiliary Control Register – includes several TML programming options
Variables
| Target load position – position reference computed by the reference generator at each slow loop sampling period. Measured in position units |
| Target load speed – speed reference computed by the reference generator at each slow loop sampling period. Measured in speed units |
| Target load acceleration – acceleration/deceleration reference computed by the reference generator at each slow loop sampling period. Measured in acceleration units |
Actual load position. Measured in position units. Alternate name:
Actual load speed – measured in speed units
Actual motor position. Measured in motor position units
Instructions
CPR Command position is relative
CPA Command position is absolute
MODE PP Set position 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 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
SRB Set/reset bits from a TML data
Remarks:
• | CSPD and CACC must be positive. Negative values are taken in modulus |
• | The difference between CPOS and TPOS values in modulus must be maximum 231-1. |
• | The sum between CSPD and CACC values must be maximum 32767.99998 (0x7FFF.FFFF) i.e. the maximum value for fixed number |
• | Once a position profile is started, 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 PP command and BEFORE the UPD command. When MODE PP 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
// Position profile. Position feedback: 500 lines incremental
// encoder (2000 counts/rev)
CACC = 0.3183; //acceleration rate = 1000[rad/s^2]
CSPD = 33.3333; //slew speed = 1000[rpm]
CPOS = 6000; //position command = 3[rot]
CPR; //position command is relative
SRB ACR 0xFFFF, 0x800; // and additive
MODE PP; // set trapezoidal position profile mode
TUM1; //set Target Update Mode 1
UPD; //execute immediate
!MC; WAIT!; //wait for completion
See also:
Trapezoidal Position Profiles – TML Programming Details
Trapezoidal Position Profiles – On the fly change of the motion parameters
Trapezoidal Position Profiles – Automatic elimination of round-off errors
TML Description
|