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

Table of Contents

Advertisement

Example - Multiple Moves
This example makes a coordinated linear move in the AB plane. The Arrays
incremental distances which are filled by the program #load.
#load;
DM
va [750],vb
count=0;
n=0;
#loop;
va[count]=n;
vb[count]=n;
n=n+10;
count=count+1;
JP#loop,(count<750);
#a;
SH
AB;
LM
AB;
count=0;
#loop2;
WT
20
JP#loop2,(_LM=0);
JS#c,(count=500);
LI
va[count],vb[count];
count=count+1;
JP#loop2,(count<750);
LE;
AM
S;
MG
"DONE";
EN;
#c;BG S;AM S;MO
Chapter 6 Programming Motion ▫ 48
Figure 6.6: Linear Interpolation
'label for load program
[750];
'define array
'initialize counter
'initialize position increment
'label for loop
'fill array element in va
'fill array element in vb
'increment position
'increment counter
'loop if array not full
'label
'enable A and B axes
'specify linear mode for AB
'initialize array counter
'if sequence buffer full, wait
'begin motion on 500th segment
'specify linear segment
'increment array counter
'repeat until array done
'end linear move
'after move sequence done
'send message
'end program
AB;EN;
'begin motion subroutine
va
and
vb
are used to store 750
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents