Galil DMC-3425 Manual De Usuario
34 • Chapter 2 Getting Started
DMC-3425
Example 9 - Motion Programs
Motion programs may be edited and stored in the memory. They may be executed at a later time.
The instruction
ED Edit
mode
moves the operation to the editor mode where the program may be written and edited. For example, in
response to the first ED command, the Galil Windows software will open a simple editor window.
From this window, the user can type in the following program:
response to the first ED command, the Galil Windows software will open a simple editor window.
From this window, the user can type in the following program:
#A Define
label
PR 700
Distance
SP 2000
Speed
BGA Start
motion
EN End
program
This program can be downloaded to the controller by selecting the File menu option download. Once
this is done, close the editor.
this is done, close the editor.
Now the program may be executed with the command
XQ #A
Start the program running
Example 10 - Motion Programs with Loops
Motion programs may include conditional jumps as shown below.
Instruction Interpretation
#A Label
DP 0
DP 0
Define current position as zero
V1=1000
Set initial value of V1
#Loop
Label for loop
PA V1
Move motor V1 counts
BGA Start
motion
AMA
After motion is complete
WT 500
Wait 500 ms
TPA Tell
position
V1=V1+1000
Increase the value of V1
JP #Loop,V1<10001
Repeat if V1<10001
EN End
After the above program is entered, download the program from the File menu and exit the Editor. To
start the motion, command:
start the motion, command:
XQ #A
Execute Program #A
Example 11- Motion Programs with Trippoints
The motion programs may include trippoints as shown below.
Instruction Interpretation
#B
Label
DP0 Define
initial
position
PR 30000
Set target