Virtual Axis - Galil Motion Control DMC-21 5 Series User Manual

Table of Contents

Advertisement

Record and Playback Example:
#record;
DM
apos[501];
RA
apos[];
RD
_TPA;
MO
A;
RC
2;
#a;
WT
20
JP
#a,(_RC=1);
#compute;
DM
da[500];
c=0;
#l;
d=c+1;
delta=apos[d]-apos[c];
da[c]=delta;
c=c+1;
JP
#l,(c<500);
#plyback;
SH
A;
CM
A;
DT
2;
i=0;
#b;
CD
da[i];
i=i+1;
JP
#b,(i<500);
CD
0=0;
#wait;
WT
20
JP
#wait,(_CM<>511);
EN;
For additional information about automatic array capture, see Automatic Data Capture into Arrays in Chapter 7.

Virtual Axis

The DMC-21x5 controller has a virtual axis designated as the N axis. This axis has no encoder and no DAC.
However, it can be commanded by the commands:
AC, DC, JG, SP, PR, PA, BG, IT, GA, VM, VP, CR, ST, DP,
The main use of the virtual axis is to serve as a virtual master in ECAM modes, and to perform an unnecessary part
of a vector mode. These applications are illustrated by the following examples.
ECAM Master Example
Suppose that the motion of the A and B axes is constrained along a path that can be described by an electronic
cam table. Further assume that the ECAM master is not an external encoder but has to be a controlled variable.
This can be achieved by defining an imaginary axis as the master with the EA command and setting the modulo of
the master. Next, the table is constructed. To move the constrained axes, simply command the N axis in the jog
mode or with the PR and PA commands.
Chapter 6 Programming Motion ▫ 66
'begin 'program
'dimension array with 501 elements
'specify automatic record
'specify A position to be captured
'turn A motor off
'begin recording at 4 msec interval (at TM1000)
'continue until done recording
'compute da
'dimension array for da
'initialize counter
'label
'compute the difference
'store difference in array
'increment index
'repeat until done
'begin playback
'specify contour mode
'specify time increment
'initialize array counter
'loop counter
'specify contour data and increment array counter
'loop until done
'end contour buffer
'wait until path is done
'end program
RP
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents