Conditional Jumps - Galil Motion Control DMC-1000 User Manual

Table of Contents

Advertisement

This example makes multiple relative distance moves by waiting for each to be complete before
executing new moves.
Instruction
#MOVES
PR 12000
SP 20000
AC 100000
BGX
AD 10000
SP 5000
AMX
WT 200
PR -10000
SP 30000
AC 150000
BGX
EN
The following program causes Output 1 to be high for 10 msec and low for 40 msec. The cycle
repeats every 50 msec.
Instruction
#OUTPUT
AT0
SB1
#LOOP
AT 10
CB1
AT -40
SB1
JP #LOOP
EN
The DMC-1000 provides Conditional Jump (JP) and Conditional Jump to Subroutine (JS) instructions
for branching to a new program location. Program execution will continue at the location specified by
the JP and JS command if the jump condition is satisfied. Conditional jumps are useful for testing
events in real-time since they allow the DMC-1000 to make decisions without a host computer. For
example, the DMC-1000 can begin execution at a specified label or line number based on the state of
an input line.
94 • Chapter 7 Application Programming
Artisan Technology Group - Quality Instrumentation ... Guaranteed | (888) 88-SOURCE | www.artisantg.com
Event Trigger - Multiple Move with Wait
Interpretation
Label
Distance
Speed
Acceleration
Start Motion
Wait a distance of 10,000 counts
New Speed
Wait until motion is completed
Wait 200 ms
New Position
New Speed
New Acceleration
Start Motion
End
Example - creating an output Waveform Using AT
Interpretation
Program label
Initialize time reference
Set Output 1
Loop
After 10 msec from reference,
Clear Output 1
Wait 40 msec from reference and reset reference
Set Output 1
Jump to location #LOOP and continue executing commands
End of program

Conditional Jumps

DMC-1000

Advertisement

Table of Contents
loading

Table of Contents