Relative positioning in ActualPositionBased operating mode
The following application example illustrates how, in "ActualPositionBased" operating mode, you can use the user interface for relative positioning of an axis.
A change to lrDistance is applied. The new target position is calculated based on the current position of the profile generation at the time of the change plus lrDistance.
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 ActualPositionBased 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 position at the time of the change (in this example: 50.0); the movement stops at 450.0.