WLSP                Set and wait event when the slave’s positive limit switch (LSP) goes low or high

Syntax                        

WLSP1

Wait for slave’s Limit Switch Positive goes from 0 to 1

WLSP0

Wait for slave’s Limit Switch Positive goes from 1 to 0

Operands

PlaceTMLOnline

Binary code

WLSP

DescriptionSets the event condition when the programmed transition occurs at the positive 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.

ExecutionActivates monitoring of the event when the programmed transition occurs at the positive limit switch input. This operation erases a previous programmed event that has occurred.

 

Example                

//Reverse slave C when positive 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 positive limit switch goes low->high

WLSP1 (C);

// Wait for event : When motion is completed on axis (C)

WMC (C); //limit switch is active -> quick stop mode active

// wait until the motor stops because only then the

// new motion commands are accepted

(C)

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

MODE SP;                //after quick stop set again the motion mode

UPD;                        //execute immediate

}