Galil DMC-13X8 Home Theater Server User Manual


 
USER MANUAL Chapter 7 Application Programming 123
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 a forward limit switch occurs on the X axis, the #LIMSWI subroutine will be executed.
Notes regarding the #LIMSWI Routine:
1) The RE command is used to return from the #LIMSWI subroutine.
2) The #LIMSWI subroutine will be re-executed if the limit switch remains active.
The #LIMSWI routine is only executed when the motor is being commanded to move
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.