Syntax
WLSN1
|
Wait for slave’s Limit Switch Negative goes from 0 to 1
|
WLSN0
|
Wait for slave’s Limit Switch Negative goes from 1 to 0
|
Binary code
Description | Sets the event condition and halts the execution of the TML program from motion controller until the programmed transition occurs at the negative limit switch input. 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 expires.
Execution | Activates monitoring of the event on the slave axis, when the programmed transition occurs at the negative limit switch input. 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 slave C when negative limit switch is reached
//Position feedback: 500 lines encoder (2000 counts/rev)
(C)
CACC = 0.0637; //acceleration rate = 200[rad/s^2]
CSPD = -16.6667; //jog speed = -500[rpm]
MODE SP;
UPD; //execute immediate
}
// Wait for event : When axis C negative limit switch goes low->high
WLSN1 (C);
CSPD = 40; //jog speed = 1200[rpm]
MODE SP; //after quick stop set again the motion mode
UPD; //execute immediate
|