Motion S Curve Profile – Related TML Instructions and Data

Parameters

CPOS        Command position – desired position (absolute or relative) for the load. Measured in position units

CSPD        Command speed – desired slew speed for the load. Measured in speed units

CACC        Command acceleration – maximum desired acceleration / deceleration for the load. Measured in acceleration units

CDEC        Command deceleration for quick stop mode. Measured in acceleration units

TJERK        Jerk time needed to accelerate from zero up to the CACC value. Measured in time units

ACR        Auxiliary Control Register – includes several TML programming options

 

Variables

TPOSTarget load position – position reference computed by the reference generator at each slow loop sampling period. Measured in position units
TSPDTarget load speed – speed reference computed by the reference generator at each slow loop sampling period. Measured in speed units
TACCTarget 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_MTActual motor speed. Measured in motor speed units. Alternate name: ASPD

 

Instructions

CPR                Command position is relative

CPA                Command position is absolute

MODE PSC        Set S-curve mode.

UPD                Update motion parameters and start new motion mode

STOP                Stop the motion

SRB                Set/reset bits from a TML data

 

Remarks:

CSPD, CACC and TJERK must be positive
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.
The S-curve profile uses always TUM1 mode, i.e. preserves the values of TPOS and TSPD. If these values don’t match with the actual feedback values, precede the S-curve command with another motion command accepting TUM0 to update TPOS and TSPD. This command may be for example a trapezoidal profile that keeps position unchanged
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        

// S-curve profile. Position feedback: 500 lines incremental

// encoder (2000 counts/rev)

TJERK = 50;//jerk = 2e+004[rad/s^3]

CACC = 0.3183;//acceleration rate = 1000[rad/s^2]

CSPD = 33.3333;//slew speed = 1000[rpm]

CPOS = 20000;//position command = 10[rot]

CPR; //position command is relative

MODE PSC; // set S-curve profile mode

SRB ACR, 0xFFFE, 0x0000; //Stop using an S-curve profile

UPD; //execute immediate

!MC; WAIT!; //wait for completion

 

See also:

S Curve Profile – TML Programming Details

TML Description