Motor Commands – Related TML Instructions and Data

Parameters

CACC                Deceleration rate following a STOP command

CDEC                Deceleration rate during quick stop

TML Variables

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

TPOSTarget position – position reference computed by the reference generator at each slow loop sampling period. Measured in position units
POSERRRepresents the value of load position error, computed as the difference between the target position and the measured position of the load

 

Instructions

AXISON        Set axis ON. Activate control loops and PWM commands

AXISOFF        Set axis OFF. Deactivate control loops and PWM commands

STOP                Stop motion with the acceleration/deceleration set in CACC

UPD                Update immediate motion mode and parameters. Start motion

UPD!        Update the motion mode and parameters when the programmed event occurs
SAP V32Set V32 in the actual or target position. V32 is either a 32-bit immediate value or a long TML data (user variable) containing the value to set

STA                Set target position TPOS equal with the actual position APOS

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

MODE PP;

TUM1; //set Target Update Mode 1

UPD; //execute immediate

...

STOP; // stop motion before reaching the final position        

//Define event: When actual position remains inside

//a settle band around the position to reach

SRB UPGRADE, 0xFFFF, 0x0800;

!MC;

WAIT!;//Wait until the event occurs i.e. motor stops

SAP 0; // Set actual position value to 0[rot]

...        

MODE PP;

UPD; //execute immediate – restart motion after a STOP command

See also:

Motor Commands – TML Programming Details

TML Description