Galil DMC-1700 Manual Do Utilizador

Página de 253
DMC-1700/1800 
Chapter 7 Application Programming  •  151 
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 
 
 
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.