WAMPO        Set and wait event when the slave’s motor absolute position is equal or over a 32-bit long value or the value of a long variable

Syntax                        

WAMPO (Slave) value32

Wait for slave’s Absolute Motor Position Over value32

WAMPO (Slave) VAR32

Wait for slave’s Absolute Motor Position Over VAR32

 

OperandsSlave: slave axis monitored for event occurrence

VAR32: long variable

value32: 32-bit long immediate value

PlaceTMLOnline

Binary code

WALPO

DescriptionSets the event condition and halts the execution of the TML program from motion controller until the slave’s motor absolute position becomes equal or over the specified value or the value of the specified 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 of slave axes when the event occurs, with command STOP.

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

 

ExecutionActivates the monitoring of the event on the slave axis, when motor absolute position >= 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        

//Reverse motion on B slave when motor position >= 1rev on C slave

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

(B) {

   //Speed profile on B slave

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

   CSPD = 3.3333;//jog speed = 100[rpm]

   MODE SP;

   TUM1; //set Target Update Mode 1

   UPD; // execute immediate

 }

CSPD = -40;                //jog speed = -1200[rpm]

(B)CSPD = CSPD; //Send the local variable CSPD to variable CSPD of

// slaves (B)

// Wait for event : When axis C motor absolute position is equal

// or over value 1 rot

WAMPO (C), 2000L;

(B) {

   UPD; // Update immediate. Speed command is reversed

}

 

Remark: You can activate a new motion on a programmed event in 2 ways:

Set UPD! command then wait for event occurrence. This will activate the new motion immediately when the event occurs
Wait the event then update the motion with UPD. This will activate the new motion with a slight delay compared with the first option