Example - Position Error
Instruction
Interpretation
:ED Edit
Mode
000 #LOOP
Dummy Program
001 JP #LOOP;EN
Loop
002 #POSERR
Position Error Routine
003 V1=_TEX
Read Position Error
004 MG "EXCESS POSITION ERROR"
Print Message
005 MG "ERROR=",V1=
Print Error
006 RE
Return from Error
<control> Q
Quit Edit Mode
:XQ #LOOP
Execute Dummy Program
:JG 100000
Jog at High Speed
:BGX Begin
Motion
Now, when excess position error occurs on the X axis, the #POSERR subroutine will be executed.
Example - Input Interrupt
Instruction
Interpretation
#A Label
II1
Input Interrupt on 1
JG 30000,60000
Jog
BGXY Begin
Motion
#LOOP;JP#LOOP;EN Loop
#ININT Input
Interrupt
STXY;AM Stop
Motion
#TEST;JP #TEST, @IN[1]=0
Test for Input 1 still low
JG 30000,6000
Restore Velocities
BGXY Begin
motion
RI0
Return from interrupt routine to Main Program and do not re-enable trippoints
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
108
i
Chapter 7 Application Programming
DMC-14x5/6
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com