Using The Dmc Editor To Enter Programs (Advanced) - Galil Motion Control DMC-21 5 Series User Manual

Table of Contents

Advertisement

Once there, the load position is read to find the position error and the controller commands the motor to move to
a new rotary position which eliminates the position error.
Since the required accuracy is 0.5 micron, the resolution of the linear sensor should preferably be twice finer. A
linear sensor with a resolution of 0.25 micron allows a position error of ±2 counts.
The dual-loop approach requires the resolution of the rotary sensor to be equal or better than that of the linear
system. Assuming that the pitch of the lead screw is 2.5mm (approximately 10 turns per inch), a rotary encoder of
2500 lines per turn or 10,000 count per revolution results in a rotary resolution of 0.25 micron. This results in equal
resolution on both linear and rotary sensors.
To illustrate the control method, assume that the rotary encoder is used as a feedback for the A-axis, and that the
linear sensor is read and stored in a variable. Further assume that at the start, both the position of A and the value
of LINPOS are equal to zero. Now assume that the objective is to move the linear load to the position of 1000.
The first step is to command the A motor to move to the rotary position of 1000. Once it arrives, the position of
the load is checked. If, for example, the load position is 980 counts, it implies that a correction of 20 counts must
be made. However, when the A-axis is commanded to be at the position of 1000, suppose that the actual position
is only 995, implying that A has a position error of 5 counts, which will be eliminated once the motor settles. This
implies that the correction needs to be only 15 counts, since 5 counts out of the 20 would be corrected by the A-
axis. Accordingly, the motion correction should be:
Correction = Load Position Error - Rotary Position Error
The correction can be performed a few times until the error drops below ±2 counts. Often, this is performed in one
correction cycle.
#main;
DP
0;
linpos=0;
PR
1000
SH
A;
BG
A;
#loop;
AM
A;
WT
50;
linpos=_DEA;
er=1000-linpos-_TEA;
JP
#end,(@ABS[er]<2);
PR
er;
BG
A;
JP
#loop;
#end;
EN;

Using the DMC Editor to Enter Programs (Advanced)

The GDK software package provides an editor and utilities that allow the upload and download of DMC programs
to the motion controller. In most instances the user will use Galil software or a host application to download
programs to the Galil controller rather than using the
Chapter 7 Application Programming ▫ 117
'label for main program
'define starting position
'initialize variable for linear position
'define relative position move
'enable A axis
'begin motion
'label for loop
'wait for motion to finish
'wait 50 msec
'read linear position from Auxiliary encoder
'calculate correction
'jump to end label if error is within acceptable margin
'command correction move
'begin motion
'jump to loop label to repeat the process
'label to end program
'end program
ED
command.
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents