![Galil Motion Control DMC-18 2 Series User Manual Download Page 137](http://html1.mh-extra.com/html/galil-motion-control/dmc-18-2-series/dmc-18-2-series_user-manual_3263754137.webp)
126
●
Chapter 7 Application Programming
DMC-18x2
Now, when excess position error occurs on the X axis, the #POSERR subroutine will be executed.
Example - Input Interrupt
#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 Begin
motion
RI0
Return from interrupt routine to Main Program and do not re-enable trippoints
Example - Motion Complete Timeout
#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
This simple program will issue the message “X fell short” if the X axis does not reach the commanded
position within 1 second of the end of the profiled move.
Example - Command Error
#BEGIN
Begin main program
IN "ENTER SPEED", SPEED
Prompt for speed
JG SPEED;BGX;
Begin motion
JP #BEGIN
Repeat
EN
End main program
#CMDERR Command
error
utility
JP#DONE,_ED<>2
Check if error on line 2
JP#DONE,_TC<>6
Check if out of range
MG "SPEED TOO HIGH"
Send message
MG "TRY AGAIN"
Send message
ZS1 Adjust
stack
JP #BEGIN
Return to main program
#DONE
End program if other error
ZS0 Zero
stack
EN End
program
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Summary of Contents for DMC-18 2 Series
Page 3: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Page 5: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...
Page 11: ...Artisan Technology Group Quality Instrumentation Guaranteed 888 88 SOURCE www artisantg com...