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:
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
Instructions !MC Set event when the actual position is completed
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 |