
The position tracking mode shouldn’t be confused with the contour mode. The contour mode allows the user to
generate custom profiles by updating the reference position at a specific time rate. In this mode, the position can
be updated randomly or at a fixed time rate, but the velocity profile will always be trapezoidal with the parameters
specified by AC, DC, and SP. Updating the position target at a specific rate will not allow the user to create a
custom profile.
The following example will demonstrate the possible different motions that may be commanded by the controller
in the position tracking mode. In this example, there is a host program that will generate the absolute position
targets. The absolute target is determined based on the current information the host program has gathered on the
object that it is tracking. The position tracking mode does allow for all of the axes on the controller to be in this
mode, but for the sake of discussion, it is assumed that the robot is tracking only in the X dimension.
The controller must be placed in the position tracking mode to allow on the fly absolute position changes. This is
performed with the PT command. To place the X axis in this mode, the host would issue PT1 to the controller if
both X and Y axes were desired the command would be PT 1,1. The next step is to begin issuing PA command to
the controller. The BG command isn’t required in this mode, the SP, AC, and DC commands determine the shape of
the trapezoidal velocity profile that the controller will use.
Example - Motion 1:
The host program determines that the first target for the controller to move to is located at 5000 encoder counts.
The acceleration and deceleration should be set to 150,000 counts/sec2 and the velocity is set to 50,000
counts/sec. The command sequence to perform this is listed below.
#EX1
PT 1;'
Place the X axis in Position tracking mode
AC 150000;'
Set the X axis acceleration to 150000 counts/sec2
DC 150000;'
Set the X axis deceleration to 150000 counts/sec2
SP 50000;'
Set the X axis speed to 50000 counts/sec
PA 5000;'
Command the X axis to absolute position 5000 encoder counts
EN
The output from this code can be seen in Figure 6.2, a screen capture from the GalilTools scope.
Example - Motion 2:
The previous step showed the plot if the motion continued all the way to 5000, however partway through the
motion, the object that was being tracked changed direction, so the host program determined that the actual
target position should be 2000 counts at that time. Figure 6.2 shows what the position profile would look like if the
move was allowed to complete to 5000 counts. The position was modified when the robot was at a position of
4200 counts (Figure 6.3). Note that the robot actually travels to a distance of almost 5000 counts before it turns
around. This is a function of the deceleration rate set by the DC command. When a direction change is
Chapter 6 Programming Motion ▫ 76
DMC-40x0 User Manual
Figure 6.2: Position vs Time (msec) - Motion 1