96
•
Chapter 7 Application Programming
DMC-1500
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
BGX Begin
motion
MCX
Motion Complete trip point
EN
End main program
#MCTIME
Motion Complete Subroutine
MG “X fell short”
Send out a message
EN
End subroutine without restoring trippoint
Summary of Contents for DMC-1510
Page 6: ......
Page 18: ...6 Chapter 1 Overview DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 88: ...76 Chapter 6 Programming Motion DMC 1500 Figure 6 7 Motion intervals in the Home sequence...
Page 90: ...78 Chapter 6 Programming Motion DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 137: ...DMC 1500 Chapter 7 Application Programming 125 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 157: ...DMC 1500 Chapter 10 Theory of Operation 145 THIS PAGE LEFT BLANK INTENTIONALLY...
Page 160: ...148 Appendices DMC 1500 Card Level Layout...
Page 180: ...168 Appendices DMC 1500...
Page 198: ...186 Appendices DMC 1500 THIS PAGE LEFT BLANK INTENTIONALLY...