Relative positioning in TargetPositionBased operating mode

The following application example illustrates how, in "TargetPositionBased" operating mode, you can use the user interface for relative positioning of an axis.

lrDistance is added to the original target position with the rising edge at xAcceptNewDistance. The advantage of this operating mode is that the target position can be changed without changing 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 TargetPositionBased 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.xAcceptNewDistance

[4]

SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.In.lrDistance

[5]

SEW_GVL_Internal.Axis1._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrPosition

[6]

SEW_GVL_Internal.Axis1._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrVelocity

[7]

SEW_GVL_Internal.Axis1._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrAcceleration

[8]

SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.Out.xInPosition

[9]

SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.Out.xNewDistanceAccepted

[10]

SEW_GVL.Interface_Axis1.ProfileGeneration.PositioningRelative.Out.xStopped

Note:

During ongoing movement and with the rising edge of xAcceptNewDistance, the value of lrDistance (in this example: "200.0") is added to the original target position (in this example: "200.0"). The movement stops at 400.0. xNewDistanceAcccepted = "TRUE" indicates that the new target position has been applied.