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

Table of Contents

Advertisement

Speed = 20000 x @AN[]
The corresponding velocity for the motor is assigned to a variable.
#main;
JG
0;
SH
A;
BG
A;
#loop;
vel=@AN[1]*20000;
JG
vel;
WT
20;
JP
#loop;
EN;
Position Control by Joystick
This system requires the position of the motor to be proportional to the joystick angle. Furthermore, the ratio
between the two positions must be programmable. For example, if the control ratio is 5:1, it implies that when the
joystick voltage is 5 Volts, corresponding to 1028 counts, the required motor position must be 5120 counts. The
variable changes the position ratio.
#program;
ratio=5;
DP
0;
JG
0;
SH
A;
BG
A;
#loop;
vin=@AN[1];
target=vin*ratio;
error=target-_TPA-_TEA;
speed=error*20;
JG
speed;
WT
50;
JP
#loop;
EN;
Backlash Compensation by Sampled Dual-Loop
The continuous dual loop, enabled by the
cases, however, when the backlash magnitude is large, it may be difficult to stabilize the system. In those cases, it
may be easier to use the sampled dual loop method described below.
This design example addresses the basic problems of backlash in motion control systems. The objective is to
control the position of a linear slide precisely. The slide is to be controlled by a rotary motor, which is coupled to
the slide by a lead screw. Such a lead screw has a backlash of 4 micron, and the required position accuracy is for
0.5 micron.
The basic dilemma is where to mount the sensor. If a rotary sensor is used, there will be a 4 micron backlash error.
On the other hand, if a linear encoder is used, the backlash in the feedback loop will cause oscillations due to
instability.
An alternative approach is the dual-loop, where two sensors are used, rotary and linear. The rotary sensor assures
stability (because the position loop is closed before the backlash) whereas the linear sensor provides accurate load
position information. The operation principle is to drive the motor to a given rotary position near the final point.
Chapter 7 Application Programming ▫ 116
'label for main program
'set starting jog speed
'enable A axis
'begin motion
'label for loop
'read Analog Input 1 and calculate new speed
'set new jog speed
'jump back to loop label
'end program
'label for main program
'define control ratio
'define the starting position
'set starting jog speed
'enable A axis
'begin motion
'label for loop
'read and store Analog Input 1
'compute desired position
'compute the following error
'compute a proportional speed
'set new jog speed
'wait
'jump back to loop label
'end program
command is an effective way to compensate for backlash. In some
DV
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents