User's Manual
Table Of Contents
- Contents
- Overview
- Controller Notation
- Servo and Stepper Motor Notation:
- Command Descriptions
- Servo Update Rates
- Commands which are not Allowed when Operating in Fast Mode:
- #
- $
- & |
- ( )
- ;
- [ ]
- + - * /
- <, >, =, <=, >=, <>
- =
- AB
- @ABS[n]
- AC
- @ACOS[n]
- AD
- AF
- AI
- AL
- AM
- @AN[n]
- AO
- AP
- AR
- AS
- @ASIN[n]
- AT
- @ATAN[n]
- #AUTO
- #AUTOERR
- AV
- BA
- BB
- BC
- BD
- BG
- BI
- BK
- BL
- BM
- BN
- BO
- BP
- BS
- BV
- BZ
- CB
- CC
- CD
- CE
- CF
- CI
- CM
- #CMDERR
- CN
- CO
- @COM[n]
- #COMINT
- @COS[n]
- CR
- CS
- CW
- DA
- DC
- DE
- DL
- DM
- DP
- DT
- DV
- EA
- EB
- EC
- ED
- EG
- EI
- ELSE
- EM
- EN
- ENDIF
- EO
- EP
- EQ
- ER
- ES
- ET
- FA
- FE
- FI
- FL
- @FRAC[n]
- FV
- GA
- GN
- GM
- GR
- HM
- HX
- IA
- IF
- IH
- II
- IL
- IN
- @IN[n]
- #ININT
- @INT[n]
- IP
- IT
- IV
- JG
- JP
- JS
- KD
- KI
- KP
- KS
- LA
- LE
- _LF*
- LI
- #LIMSWI
- LL
- LM
- _LR*
- LS
- LV
- LZ
- MB
- MC
- #MCTIME
- MF
- MG
- MO
- MR
- MT
- NB
- NF
- NO
- NZ
- OB
- OC
- OE
- OF
- OP
- @OUT[n]
- P1CD P2CD
- P1CH P2CH
- P1NM P2NM
- P1ST P2ST
- #POSERR
- PA
- PF
- PR
- QD
- QR
- QU
- QZ
- RA
- RC
- RD
- RE
- REM
- RI
- RL
- @RND[n]
- RP
- RS
-
R S -
R V - SA
- SA n
- SB
- SC
- SH
- @SIN[n]
- SL
- SP
- @SQR[n]
- ST
- @TAN[n]
- TB
- TC
- #TCPERR
- TD
- TE
- TH
- TI
- TIME*
- TL
- TM
- TP
- TR
- TS
- TT
- TV
- TW
- UI
- UL
- VA
- VD
- VE
- VF
- VM
- VP
- VR
- VS
- VT
- WC
- WH
- WT
- XQ
- ZR
- ZS
- Index

128 ● #LIMSWI DMC-1400 Series Command Reference
#LIMSWI
FUNCTION: Limit switch automatic subroutine
DESCRIPTION:
Without #LIMSWI defined, the controller will effectively issue the STn on the axis when it’s
limit switch is tripped. With #LIMSWI defined, the axis is still stopped, and in addition,
code is executed. #LIMSWI is most commonly used to turn the motor off when a limit
switch is tripped (see example below). For #LIMSWI to run, code must be running in
thread 0 AND the switch corresponding to the direction of motion must be tripped
(forward limit switch for positive motion and negative limit switch for negative motion).
#LIMSWI interrupts thread 0 when it runs.
USAGE:
While Moving Yes
In a Program Yes
Command Line No
Controller Usage
ALL
RELATED COMMANDS:
_LFX State of forward limit switch
_
LRX State of reverse limit switch
RE Return from error routine
EXAMPLES:
#Main ;'print a message every second
MG "Main"
WT1000
JP#Main
EN
#LIMSWI ;'runs when a limit switch is tripped
IF (_LFX = 0) | (_LRX = 0)
MG "X"
DCX=67107840
STX
AMX
MOX
ELSE; IF (_LFY = 0) | (_LRY = 0)
MG "Y"
DCY=67107840
STY
AMY
MOY
ENDIF; ENDIF
RE1
NOTE: An application program must be executing for the automatic subroutine to function, which
runs in thread 0.
NOTE: Use RE to end the routine