!MC                Set event when the actual motion is completed

Syntax                        

!MC

!(set event) if MotionComplete

 

Operands

PlaceTMLOnline

Binary code

DescriptionSets the event condition when the actual motion is completed. The motion complete 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 defined by POSOKLIM, for a preset stabilize time interval defined by TONPOSOK
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.

 

ExecutionActivates monitoring of the event when the actual motion is completed. This operation erases a previous programmed event that has occurred.

 

Example                

//Execute successive position profiles

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

POSOKLIM = 10; //Set settle band to 0.005[rot]

TONPOSOK = 10; //Set stabilize time to 0.01[s]

SRB UPGRADE, 0xFFFF, 0x0800; // motion complete with settle band        

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