The state of the forward and reverse limit switches may also be tested during the jump-on-condition statement. The _LR condition specifies the reverse limit and _LF specifies the forward limit. X,Y,Z, or W following LR or LF specifies the axis. The CN command can be used to configure the polarity of the limit switches.

Limit Switch Example:

#A;JP #A;EN

Dummy Program

#LIMSWI

Limit Switch Utility

V1=_LFX

Check if forward limit

V2=_LRX

Check if reverse limit

JP#LF,V1=0

Jump to #LF if forward

JP#LR,V2=0

Jump to #LR if reverse

JP#END

Jump to end

#LF

#LF

MG "FORWARD LIMIT" Send message

STX;AMX

Stop motion

PR-1000;BGX;AMX

Move in reverse

JP#END

End

#LR

#LR

MG "REVERSE LIMIT"

Send message

STX;AMX

Stop motion

PR1000;BGX;AMX

Move forward

#END

End

RE

Return to main program

NOTE: An applications program must be executing for #LIMSWI to function.

Chapter 8 Hardware & Software Protection • 152

USER MANUAL

Page 152
Image 152
Galil DMC-13X8 user manual V2=LRX, Jp#End, #Lf, Stxamx, #LR MG Reverse Limit, PR1000BGXAMX