Syntax
WPRU (Slave), value32
|
Wait for slave’s Position Reference Under value32
|
WPRU (Slave), VAR32
|
Wait for slave’s Position Reference Under VAR32
|
Operands | Slave: slave axis monitored for event occurrence |
VAR32: long variable
value32: 32-bit long immediate value
Binary code
Description | Sets the event condition and halts the execution of the TML program from motion controller until the when the position reference is equal or under 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 when the event occurs, with command STOP. |
The programmed event is automatically erased when the event occurs or if the timeout for the WAIT! command expires.
Remark: After setting UPD! or STOP! you need to wait until the programmed event occurs using WAIT!, otherwise, the program will continue with the next instructions that may override the event monitoring.
Execution | Activates the monitoring of the event, when position reference <= 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:
//Stop motion when position reference >= 3 rev
//Position feedback: 500 lines encoder (2000 counts/rev)
WPRU 6000; //Set event: when position reference is >= 3 rev
STOP;//Stop the motion when the event occurs
|