User Manual

Table Of Contents
Closed Loop Count Position Mode
158 Advanced Digital Motor Controller User Manual V2.0 July 8, 2019
Beware that the next commands must be entered while the motor is moving, since the
next commands will only be taken into account at the end of the current motion.
To chain more than two commands, use a MicroBasic script or an external program to
load new “next” command when the previous “next” commands become active. The
?DR query can be used to detect that this transition has occurred and that a new next
command can be sent to the controller.
The chart below shows a typical chaining flow.
Enter First Destination!P nn mm
Enter 2nd Destination!PX nn mm
?DR Destination Reached
Enter 3rd Destination!PX nn mm
?DR Destination Reached
Enter Last Destination!PX nn mm
FIGURE 12-2 Command Chaining flow
Position Accuracy Considerations
In the position mode, the controller computes a trajectory that the motor then attempts to
follow using a PID. For this technique to work well, the motor must first be physically able
to run as fast as dictated by the trajectory calculation. If not, a loop error (ie desired posi-
tion - actual position) will accumulate and eventually grow to trigger an error that will stop
the motor. Make sure that the velocity setting is always under the max speed that can be
reached by the motor while running at full load, in open loop.
Some difference between the desired and actual position, i.e. a loop error, is always to
be expected when using a PID. The PID gains must be tuned to minimize the loop error
while keeping smooth motion. The expected position and loop error can be monitored in
real time using the PC utility’s Tracking and Loop Error channels, respectively, in the chart
recorder.
Beware that the Destination Reached flag will become true when the result of the trajec-
tory computation equals the desired destination. In most practical situations, the motor
will still be on its way to actually reach that destination. This can be an important consid-
eration when chaining commands, as the new command will become active before the
motor has actually reached the previous destination