Buffering and Blending of Movements
Movement commands can be buffered with CODESYS SoftMotion. Blending of the path between the buffered movements is possible. The commanded path is adjusted by rounding the corners so that the path can be traveled without stopping. Whether or not a movement is buffered, and how it is done, can be configured by means of the BufferMode
input of the movement block (for example, MC_MoveDirectAbsolute
or MC_MoveCircularRelative
). The TransitionMode
and TransitionParameter
inputs determine how corners are rounded.
Tip
Blending between two movements starts at the earliest halfway through the first movement and ends at the latest halfway through the second movement.
If the first movement has already been planned too far, then blending may no longer be possible with the set parameters. Then the blending area is reduced or blending is not possible anymore. In order to guarantee a successful blending, both movements should be commanded in the same cycle.
Supported values for BufferMode
:
| The movement is executed immediately and is not buffered. All previously commanded movements are aborted. |
| The function block starts as soon as the last commanded movement is finished. The Movements with the |
| In the blending range between the two movements, the smaller value of the velocity, acceleration, and jerk limits of both movements is used. |
| In the blending range between the two movements, the velocity, acceleration, and jerk limits of the first movement are used. |
| In the blending range between the two movements, the velocity, acceleration, and jerk limits of the second movement are used. |
| In the blending range between the two movements, the larger value of the velocity, acceleration, and jerk limits of both movements is used. |
In blending modes, the TransitionMode
must not be equal to TMNone
.
Supports the following values for TransitionMode
and TransitionParameter
:
| No blending; corners in the path are not rounded. The movement is stopped at the corners, even if |
| Velocity-based blending. The blending path is defined by both points A' and B'. ![]() The calculation of the blending points is based on an idealized velocity curve, which can deviate from the actual velocity curve. At this time, a deceleration ramp is simulated on the original path towards the blending point and an acceleration ramp and away from the blending point. The minimum from both the programmed path velocity and the estimated maximum path velocity resulting from the axis limits is used as the target velocity. In addition, when blending between straight lines, the angle between them is taken into account. A minimum curvature radius for the blending element results from the desired path velocity and the estimated dynamics limits. The points A' and B' result in turn from this radius and the angle between the straight lines. ![]()
|
| Position-based blending. The ![]() |
For more information, see: Function Blocks for Movements
Path dynamics when blending
If blending is performed between CP movements (between linear and circular segments), then it should be noted that the maximum path acceleration and the maximum path jerk may be exceeded during the blending. The shorter the blending range is, the more prominent this effect will be. However, the limits of the axes (the maximum axis acceleration and the maximum axis jerk) are always maintained.
Therefore, if the maximum path acceleration is low and the maximum axis acceleration is high, then accelerations which are too high can occur when blending. This can be counteracted by means of the AccFactor
input of the motion blocks, for example, by reducing the maximum axis acceleration for a movement.