Relative positioning in StartPositionBased operating mode
The following application example illustrates how, in "StartPositionBased" operating mode, you can use the user interface for relative positioning of an axis.
A change to lrDistance is applied. The new target position results from the start position plus lrDistance. A change to lrDistance is applied as long as xStart is present.
Control
Control the axis in the PositioningRelative structure as follows:
- To activate the operating mode, set xActivate to "TRUE".
- Define the setpoints for lrDistance, lrVelocity, lrAcceleration, lrDeceleration, and lrJerk.
- Set eMode to StartPositionBased in the CONFIG structure.
- To start the operating mode, set xStart to "TRUE".
Interface in the IEC Editor
Trace recording
[1] | SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.In.xActivate |
[2] | SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.In.xStart |
[3] | SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.In.lrDistance |
[4] | SEW_GVL_Internal.Axis1._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrPosition |
[5] | SEW_GVL_Internal.Axis1._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrVelocity |
[6] | SEW_GVL_Internal.Axis1._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrAcceleration |
[7] | SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.Out.xInPosition |
[8] | SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.Out.xStopped |
Note:
During ongoing movement, lrDistance is changed from 200.0 to 400.0. The change is in relation to the start position; the movement stops at 400.0.