Limit Switch Routine - Galil Motion Control CDS-3310 User Manual

Table of Contents

Advertisement

Example
NOTE: An applications program must be executing for the #POSERR routine to function.

Limit Switch Routine

The CDS-3310 provides forward and reverse limit switches which inhibit motion in the respective
direction. There is also a special label for automatic execution of a limit switch subroutine. The
#LIMSWI label specifies the start of the limit switch subroutine. This label causes the statements
following to be automatically executed if any limit switch is activated and that axis motor is moving in
that direction. The RE command ends the subroutine.
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. A,B,C,
or D following LR or LF specifies the axis. The CN command can be used to configure the polarity of
the limit switches.
Example
NOTE: An applications program must be executing for #LIMSWI to function.
CDS-3310
Instruction
#A;JP #A;EN
#POSERR
MG "error"
SB 1
STA
AMA
SHA
RE
Instruction
#A;JP #A;EN
#LIMSWI
v1=_LFA
v2=_LRA
JP#LF,v1=0
JP#LR,v2=0
JP#END
#LF
MG "FORWARD LIMIT"
STX;AMA
PR-1000;BGA;AMA
JP#END
#LR
MG "REVERSE LIMIT"
STX;AMA
PR1000;BGA;AMA
#END
RE
Interpretation
"Dummy" program
Start error routine on error
Send message
Fire relay
Stop motor
After motor stops
Servo motor here to clear error
Return to main program
Interpretation
Dummy Program
Limit Switch Utility
Check if forward limit
Check if reverse limit
Jump to #LF if forward
Jump to #LR if reverse
Jump to end
#LF
Send message
Stop motion
Move in reverse
End
#LR
Send message
Stop motion
Move forward
End
Return to main program
Chapter 8 Hardware & Software Protection
i
61

Advertisement

Table of Contents
loading

Related Products for Galil Motion Control CDS-3310

Table of Contents