Events – When the actual motion is completed. Related TML Instructions and Data

Setting this event allows you to detect when a motion is completed. You can use, for example, this event to start your next move only after the actual move is finalized.

The motion complete condition is set in the following conditions:

During position control:
If UPGRADE.11=1, when the position reference arrives at the position to reach (commanded position) and the position error remains inside a settle band for a preset stabilize time interval
If UPGRADE.11=0, when the position reference arrives at the position to reach (commanded position)
During speed control, when the speed reference arrives at the commanded speed

The motion complete condition is reset when a new motion is started i.e. when the update command – UPD is executed.

Remark: In case of steppers controlled open-loop, the motion complete condition for positioning is always set when the position reference arrives at the position to reach independently of the UPGRADE.11 status.

 

Parameters

POSOKLIMSpecifies the settle band when UPGRADE.11=1. Measured in position units
TONPOSOKSpecifies the stabilize time UPGRADE.11=1. Measured in time units
UPGRADETML register. When UPGRADE.11=1, the motion complete is set when commanded/target position is reached and the position error is inside a settle band for a preset stabilize time. When UPGRADE.11=0, the motion complete is set when commanded/target position speed is reached

 

Instructions

!MC                Set event when the actual position is completed

UPD!Update the motion mode and/or the motion parameters when the programmed event occurs
STOP!Stop motion with the acceleration/deceleration set in CACC, when the programmed event occurs
WAIT! value16Wait until the programmed event occurs. If the command is followed by value16, the wait ends after the time interval specified in this 16-bit integer value. Value16 is measured in time units

 

Programming Example 1

       //Execute successive position profiles

//Position feedback: 500 lines encoder (2000 counts/rev)

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

CSPD = 100;//slew speed = 3000[rpm]

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

CPR; //position command is relative

MODE PP;

TUM1; //set Target Update Mode 1

UPD; //execute immediate

!MC; WAIT!; // set event and wait for motion complete

// start here next move

Programming Example 2

//Execute successive position profiles

// Position feedback: 500 lines encoder (2000 counts/rev)

// First move

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

CSPD = 100;//slew speed = 3000[rpm]

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

CPR; //position command is relative

MODE PP;

TUM1; //set Target Update Mode 1

UPD; //start first move

 

// set motion complete parameters

POSOKLIM = 20; //Set settle band to 0.01[rot]

TONPOSOK = 10; //Set stabilize time to 10[ms]

SRB UPGRADE, 0xFFFF, 0x0800;

 

!MC; // set event when motion is complete

// Prepare data for second move

CPOS = 10000;//new position command = 5[rot]

CPR; //position command is relative

MODE PP;

TUM1; //set Target Update Mode 1

UPD!; //execute on event

WAIT!;//Wait until the event occurs. When the event

// occurs the second move will start

See also:

Events – Function of motor or load position. Related TML Instructions and Data

Events – Function of motor or load speed. Related TML Instructions and Data

Events – After a wait time. Related TML Instructions and Data

Events – Function of reference. Related TML Instructions and Data

Events – Function of inputs status. Related TML Instructions and Data

Events – Function of 32-bit variable value. Related TML Instructions and Data

Events – TML Programming Details