The following routine computes the table points. As the phase equals 0.18X and X varies in increments of 20, the phase varies by increments of 3.6°. The program then computes the values of Y according to the equation and assigns the values to the table with the instruction ET[N] = ,Y.

INSTRUCTION

INTERPRETATION

#SETUP

Label

EAX

Select X as master

EM 2000,1000

Cam cycles

EP 20,0

Master position increments

N = 0

Index

#LOOP

Loop to construct table from equation

P = N3.6

Note 3.6 = 0.1820

S = @SIN [P] *100

Define sine position

Y = N *10+S

Define slave position

ET [N] =, Y

Define table

N = N+1

 

JP #LOOP, N<=100

Repeat the process

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: X = 1000 and Y = 500. This implies that Y must be driven to that point to avoid a jump.

This is done with the program:

INSTRUCTION

INTERPRETATION

#RUN

Label

EB1

Enable cam

PA,500

starting position

SP,5000

Y speed

BGY

Move Y motor

AM

After Y moved

AI1

Wait for start signal

EG,1000

Engage slave

AI - 1

Wait for stop signal

EQ,1000

Disengage slave

EN

End

Command Summary - Electronic CAM

COMMAND

DESCRIPTION

 

 

EA p

Specifies master axes for electronic cam where:

 

p = X,Y,Z or W for main encoder as master

 

 

EB n

Enables the ECAM

EC n

ECAM counter - sets the index into the ECAM table

 

 

EG x,y,z,w

Engages ECAM

 

 

 

 

USER MANUAL

Chapter 6 Programming Motion • 83

Page 83
Image 83
Galil DMC-13X8 user manual Command Summary Electronic CAM, Instruction Interpretation