Download Manual

Transcript
XQ #LOOP
Execute Dummy Program
JG 5000
Jog X axis at rate of 5000 counts / sec
BGX
Begin motion on X axis
Now, when a forward limit switch occurs on the X axis, the #LIMSWI subroutine will be executed.
NOTE: The RE command is used to return from the #LIMSWI subroutine.
NOTE: The #LIMSWI will continue to be executed until the limit switch is cleared (goes high).
Example - Position Error
Instruction
Interpretation
#LOOP
Dummy Program
JP #LOOP;EN
Loop
#POSERR
Position Error Routine
V1=_TEX
Read Position Error
MG "EXCESS POSITION ERROR"
Print Message
MG "ERROR=",V1=
Print Error
RE
Return from Error
While running the 'dummy' program, if the position error on the X axis exceeds that value specified
by the ER command, the #POSERR routine will execute.
NOTE: The RE command is used to return from the #POSERR subroutine
NOTE: The #POSERR routine will continue to be executed until the position error is cleared (is less
than the ER limit).
Example - Input Interrupt
Instruction
Interpretation
#A
Label
II1
Input Interrupt on 1
JG 30000,,,60000
Jog
BGXW
Begin Motion
#LOOP;JP#LOOP;EN
Loop
#ININT
Input Interrupt
STXW;AM
Stop Motion
#TEST;JP #TEST, @IN[1]=0
Test for Input 1 still low
JG 30000,,,6000
Restore Velocities
BGXW;RI
Begin motion and Return to Main Program
EN
NOTE: Use the RI command to return from #ININT subroutine.
Example - Motion Complete Timeout
Instruction
Interpretation
#BEGIN
Begin main program
TW 1000
Set the time out to 1000 ms
PA 10000
Position Absolute command
User Manual DMC-1500
Chapter 7 Application Programming • 7 - 99