Anticipating every move
Does this sound familiar? Your team has designed a fast new machine, only to find that you cannot use it at anywhere near full speed. Well, here’s one fix.
Tough turn
Tough turn: Without limiting
Tough turn: With limiting
Here a path is dominated by two long stretches, with a difficult 90° turn between them. Without an imposed limit, the system undergoes sudden and potentially damaging acceleration. After look-ahead acceleration limiting, acceleration is far more gradual (and less jerky) and X-axis velocity is reduced in exact proportion to Y-axis velocity, which maintains the programmed path.
Basic instructions
How does a designer make use of look-ahead programs and adjust underlying calculations? Setup involves entering limits for position, velocity, and acceleration for each axis. Programs can specify very high path velocities without risk of dynamic problems; because specified path velocity becomes more of a constraint than a command, reached only when other dynamic limits do not prevent it.
Calculations can be performed on Linear and Circle mode moves. The coordinate system must be put in a segmentation mode to enable look-ahead calculations, even if only Linear-mode moves are used. (The coordinate system must be in segmentation mode anyway to execute Circle mode moves or cutter radius compensation.)
In this segmentation mode, lookahead programming splits moves into small segments automatically, which are executed as a series of smooth splines to recreate programmed moves. Then the controller stores data on these segments in a specially defined look-ahead buffer for the coordinate system. Each segment takes the number of counts to the software position limit, times one millisecond, when it is put into the buffer. (This can be extended if it or some other segment in the buffer violates a velocity or acceleration limit.)
The technique allows the controller to create deceleration slopes in the middle of programmed moves, at the boundaries of programmed moves, or over multiple programmed moves — whichever is required to create the fastest possible motion. If a controller’s inverse kinematic calculations are used, the conversion from tip coordinates to joint coordinates takes place before look-ahead calculations, and segment by segment for Linear and Circle-mode moves. Therefore, some controllers can execute the look-ahead calculations in joint space, motor by motor, even if the system has been programmed in tip coordinates.
Follow these 15 simple steps to set up a look-ahead function.
- 1. Assign all motors to the coordinate system with axis definition statements.
- 2. Set the positive and negative position limits, plus the desired position- limit band (measured in counts, usually referenced to a home or motor Zero position) for each motor in the coordinate system. Then enable your position limits.
- 3. Set the maximum velocity (in counts/msec) for each motor in the coordinate system.
- 4. Set the maximum acceleration (in counts/msec2) for each motor in the coordinate system.
- 5. Set the segmentation time (in msec) for the coordinate system to the minimum programmed move block time, or 10 msec — whichever is less.
- 6. Compute maximum stopping time for each motor.
- 7. Select motors with longest stopping time.
- 8. Compute the number of segments needed to look ahead — stopping time divided by twice the positive position limit.
- 9. Multiply the segments needed by 4/3 (round up if necessary) and set the look-ahead length parameter to this value.
- 10. If the application involves high block rates, set acceleration time to the minimum block time in msec; set the default S-curve time to zero.
- 11. If the application does not involve high block rates, set the default acceleration time and the default Scurve time parameters to values that give the desired blending corner size and shape at the programmed speeds.
- 12. Store these parameters to non-volatile memory with a Save command to make them part of the machine state.
- 13. After each power-up or reset, send the card a Define look-ahead command — (number of segments), (number of outputs) — for the coordinate system, where the number of segments equals the number of coming segments being tracked plus any segments for which backup capability is needed. Here, number of outputs is at least equal to the number of synchronous M-variable assignments that may need to be buffered over the lookahead length.
- 14. Load the motion program into a controller with look-ahead capabilities. The motion program defines the path to be followed.
- 15. Run the motion program, and
let the look-ahead algorithm do its
work.
For more information, visit deltatau.com or motionsystemdesign.com and click on Motion Controllers under the scrolling Component Zone bar.
|
Pros and cons Look-ahead algorithms originally appeared on high-end dedicated CNC controllers costing $50,000 or more. Now, advances in computational power and optimization of required calculations have increased their availability on inexpensive general-purpose controllers. Throughput can increase 50 to 200% on complex paths, because machines can travel quickly in some places without exceeding acceleration limits elsewhere. Any application requiring quick reaction to external conditions should not use look-ahead. Similarly, look-ahead can compromise the performance of applications that require precise synchronization to external motion. |
|
Calculating segmentation time A controller’s look-ahead function can operate on intermediate motion segments calculated from the programmed trajectory. An intermediate point for each motor is computed once per segment from the programmed path, and then a fine interpolation using a cubic spline to join these segments is executed at the servo update rate. Position limits for each coordinate system define the time for each intermediate segment in the programmed trajectory, in milliseconds. These position limits (again, measured in counts) are integer values; if a non-integer value is sent, the controller will round to the next integer. If the limit is set to zero, the coordinate system is not in segmentation mode, no intermediate segments are calculated, and the look-ahead function cannot be enabled. Several issues must be addressed in setting segmentation time: its relationship to the maximum block rate, the small interpolation errors it introduces, and its effect on the calculation load of a controller with look-ahead capabilities. |
Want to use this article? Click here for options!
© 2010 Penton Media Inc.
advertisement



