Galil DMC-1700 Manual De Usuario

Descargar
Página de 253
DMC-1700/1800 
Chapter 7 Application Programming  •  137 
#SQUARE 
#X1 
#BEGIN1 
Invalid labels 
#1Square 
#123 
 
A Simple Example Program: 
#START 
Beginning of the Program 
PR 10000,20000 
Specify relative distances on X and Y axes 
BG XY 
Begin Motion 
AM 
Wait for motion complete 
WT 2000 
Wait 2 sec 
JP #START 
Jump to label START 
EN 
End of Program 
The above program moves X and Y 10000 and 20000 units.  After the motion is complete, the motors rest for 2 
seconds.  The cycle repeats indefinitely until the stop command is issued. 
Special Labels 
The DMC-1700 and DMC-1800 have some special labels, which are used to define input interrupt subroutines, limit 
switch subroutines, error handling subroutines, and command error subroutines.  See section on Auto-Start Routine 
The DMC-1700/1800 has a special label for automatic program execution.  A program which has been saved into 
the controller’s non-volatile memory can be automatically executed upon power up or reset by beginning the 
program with the label #AUTO.  The program must be saved into non-volatile memory using the command, BP.  
Automatic Subroutines for Monitoring Conditions on page 149
#ININT 
Label for Input Interrupt subroutine 
#LIMSWI 
Label for Limit Switch subroutine 
#POSERR 
Label for excess Position Error subroutine 
#MCTIME 
Label for timeout on Motion Complete trip point 
#CMDERR 
Label for incorrect command subroutine 
Commenting Programs 
Using the command, NO or Apostrophe (‘) 
The DMC-1700/1800 provides a command, NO, for commenting programs or single apostrophe.  This command 
allows the user to include up to 78 characters on a single line after the NO command and can be used to include 
comments from the programmer as in the following example: 
#PATH 
‘ 2-D CIRCULAR PATH 
VMXY 
‘  VECTOR MOTION ON X AND Y 
VS 10000 
‘  VECTOR SPEED IS 10000 
VP -4000,0