WMSU                Set and wait event when slave’s motor speed is equal or under a 32-bit value or the value of a fixed variable

Syntax                        

WMSU (Slave), value32

Wait for slave’s Motor Speed Under value32

WMSU (Slave), VAR32

Wait for slave’s Motor Speed Under VAR32

 

OperandsSlave: slave axis monitored for event occurrence

VAR32: fixed variable

value32: 32-bit fixed immediate value

PlaceTMLOnline

Binary code

MSU

DescriptionSets the event condition halts the execution of the TML program from motion controller until the motor speed is equal or under the 32-bit value or the value of the specified fixed variable. After you have programmed an event, you can do the following actions:
Change the motion mode and/or the parameters when the event occurs, with command UPD!
Stop the motion when the event occurs, with command STOP.

The programmed event is automatically erased when the event occurs or if the timeout for wait expires.

 

ExecutionActivates the monitoring of the event when motor speed <= value32, respectively VAR32. The motion controller application remains in a loop until the event on the slave axis occurs or it timeouts. This operation erases a previous programmed event that has occurred.

Example                

//Motor on slave A is decelerating. Start a new position profile

// on slave A when  motor speed < 600 rpm

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

WMSU (A) 20; //Set event: when motor speed is < 600 rpm

// prepare new motion mode

(A)

 

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

};