Galil DMC-2X00 Projector User Manual


 
DMC-2X00 Chapter 7 Application Programming y 85
Example- Multiple Move Sequence
The AM trip point is used to separate the two PR moves. If AM is not used, the controller returns a ?
for the second PR command because a new PR cannot be given until motion is complete.
Instruction Interpretation
#TWOMOVE Label
PR 2000 Position Command
BGA Begin Motion
AMA Wait for Motion Complete
PR 4000 Next Position Move
BGA Begin 2nd move
EN End program
Example- Set Output after Distance
Set output bit 1 after a distance of 1000 counts from the start of the move. The accuracy of the trip
point is the speed multiplied by the sample period.
Instruction Interpretation
#SETBIT Label
SP 10000 Speed is 10000
PA 20000 Specify Absolute position
BGA Begin motion
AD 1000 Wait until 1000 counts
SB1 Set output bit 1
EN End program
Example- Repetitive Position Trigger
To set the output bit every 10000 counts during a move, the AR is used as shown in the next example.
Instruction Interpretation
#TRIP Label
JG 50000 Specify Jog Speed
BGA;n=0 Begin Motion
#REPEAT # Repeat Loop
AR 10000 Wait 10000 counts
TPA Tell Position
SB1 Set output 1
WT50 Wait 50 msec
CB1 Clear output 1
n=n+1 Increment counter
JP #REPEAT,n<5 Repeat 5 times
STA Stop
EN End
Example - Start Motion on Input
This example waits for input 1 to go low and then starts motion.