Galil Motion Control DMC-21 5 Series User Manual page 67

Table of Contents

Advertisement

Example - Electronic CAM
The following example illustrates a cam program with a master axis, Z, and two slaves, A and Y.
#a;v1=0;
SH
ABC;
PA
0,0;
BG
AB;
EA
C;
EM
0,0,4000;
EP
400,0;
ET[0]=0,0;
ET[1]=0,0;
ET[2]=120,60;
ET[3]=240,120;
ET[4]=360,180;
ET[5]=360,180;
ET[6]=360,180;
ET[7]=240,120;
ET[8]=120,60;
ET[9]=0,0;
ET[10]=0,0;
EB
1;
JGC=4000;
EG
0,0;
BG
C;
#loop;
WT
20
JP
#loop,(v1=0);
EQ
2000,2000;
MF ,,
2000;
ST
C;
AM
C;
EB
0
MO
ABC;
EN;
The above example shows how the ECAM program is structured and how the commands can be given to the
controller. Figure 6.14 shows the GDK scope capture of the ECAM profile. This shows how the motion will be seen
during the ECAM cycles. The first trace is for the A axis, the second trace shows the cycle on the B axis and the
third trace shows the cycle of the C axis.
Chapter 6 Programming Motion ▫ 62
'label; initialize variable
'enable A and B axes
AM
AB;
'go to position 0,0 on A and B axes
'C axis as the Master for ECAM
'change for C is 4000, 0 for A and B axes
'ECAM interval is 400 counts with zero start
'when master is at 0 position; 1st point
'2nd point in the ECAM table
'3rd point in the ECAM table
'4th point in the ECAM table
'5th point in the ECAM table
'6th point in the ECAM table
'7th point in the ECAM table
'8th point in the ECAM table
'9th point in the ECAM table
'10th point in the ECAM table
'starting point for next cycle
'enable ECAM mode
'set C to jog at 4000
'engage both A and B when Master = 0
'begin jog on C axis
'loop until the variable is set
'disengage A and B when master = 2000
'wait until the Master goes to 2000
'stop the C axis motion
'wait until motion is completed
'exit the ECAM mode
'disable axes
'end program
Figure 6.14: ECAM cycle with C axis as master
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents