Galil Motion Control CDS-3310 User Manual page 64

Table of Contents

Advertisement

Suppose we want to define a table with 100 segments. This implies increments of 20 counts each. If
the master points are to start at zero, the required instruction is EP 20,0.
The following routine computes the table points. As the phase equals 0.18N and N varies in
increments of 20, the phase varies by increments of 3.6°. The program then computes the values of X
according to the equation and assigns the values to the table with the instruction ET[n] =X.
Instruction
#SETUP
EAN
EM 2000,1000
EP 20,0
n = 0
#LOOP
P = n∗3.6
S = @SIN [P] * 100
X = n * 10+S
ET [n] =X
n = n+1
JP #LOOP, n<=100
EN
Now suppose that the slave axis is engaged with a start signal, input 1, but that both the engagement
and disengagement points must be done at the center of the cycle: N = 1000 and X = 500. This
implies that X must be driven to that point to avoid a jump.
This is done with the program:
Instruction
#RUN
EB1
PA500
SP5000
BGY
AM
AI1
EG1000
AI – 1
EQ1000
EN
The following example illustrates a cam program with a master axis, N.
Instruction
#A;V1=0
CDS-3310
Interpretation
Label
Select N as master
Cam cycles
Master position increments
Index
Loop to construct table from equation
Note 3.6 = 0.18∗20
Define sine position
Define slave position
Define table
Repeat the process
Interpretation
Label
Enable cam
X starting position
X speed
Move X motor
After X moved
Wait for start signal
Engage slave
Wait for stop signal
Disengage slave
End
Interpretation
Label; Initialize variable
Chapter 6 Programming Motion
i
3

Advertisement

Table of Contents
loading

Related Products for Galil Motion Control CDS-3310

Table of Contents