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

Table of Contents

Advertisement

Example - Motion 3:
In this motion, the host program commands the controller to begin motion towards position 5000, changes the
target to -2000, and then changes it again to 8000. Figure 6.4 shows the plot of position vs. time and velocity vs.
time. Below is the code that is used to simulate this scenario:
#ex3;
DP
0;
SH
A;
PT
1;
AC
150000;
DC
150000;
SP
50000;
PA
5000;
WT
300;
PA
-2000;
WT
200;
PA
8000;
AM
A;
MO
A;
EN;
Figure 6.5 demonstrates the use of motion smoothing (IT) on the velocity profile in this mode. The jerk in the
system is also affected by the values set for
Chapter 6 Programming Motion ▫ 43
'label
'define position as zero
'servo A axis
'place the A axis in Position tracking mode
'set the A axis acceleration to 150000 counts/sec2
'set the A axis deceleration to 150000 counts/sec2
'set the A axis speed to 50000 counts/sec
'command the A axis to absolute position 5000
encoder counts
'wait 300 ms
'change end point position to -2000
'wait 200 ms
'change end point position to 8000
'after motion
'disable A axis
'end program
AC
and DC.
Figure 6.4: Position and Velocity vs Time (msec) for Motion 3
Figure 6.5: Position and Velocity vs Time (msec) for Motion 3 with IT 0.1
DMC-21x5 User Manual 1.0a1

Advertisement

Table of Contents
loading

Table of Contents