On-the-fly changeover from velocity to positioning with linear axis
The following application example illustrates how you can implement an on-the-fly changeover of the operating mode, where one operating mode replaces all others. The original operation mode is deactivated at the same time as the new operation mode is activated. For an on-the-fly changeover within the same cycle, set control signals xActivate and xStart in "Velocity" operating mode to "FALSE" and set control signals xActivate and xStart in "Positioning" operating mode to "TRUE".
Control
Control the axis in the Velocity structure as follows:
- To activate the operating mode, set xActivate to "TRUE".
- Define the setpoints for lrVelocity, lrAcceleration, lrDeceleration, and lrJerk.
- To start the operating mode, set xStart to "TRUE".
Control the axis in the Positioning structure as follows:
- Define the setpoints for lrPosition, lrVelocity, lrAcceleration, lrDeceleration, and lrJerk in the Positioning structure.
- Set ePresetMode to "ACTPOS_MOVING" in the CONFIG structure.
Control the axis for an on-the-fly changeover in the same cycle as follows:
- Set xActivate and xStart to "FALSE" in the Velocity structure, and set xActivate and xStart to "TRUE" in the Positioning structure.
Interface in the IEC Editor
Trace recording
[1] | SEW_GVL.Interface_Axis2.ProfileGeneration.Velocity.In.xActivate |
[2] | SEW_GVL.Interface_Axis2.ProfileGeneration.Velocity.In.xStart |
[3] | SEW_GVL.Interface_Axis2.ProfileGeneration.Positioning.In.xActivate |
[4] | SEW_GVL.Interface_Axis2.ProfileGeneration.Positioning.In.xStart |
[5] | SEW_GVL_Internal.Axis2._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrPosition |
[6] | SEW_GVL_Internal.Axis2._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrVelocity |
[7] | SEW_GVL_Internal.Axis2._fbProfileGenerationControl._stOUTInterpolation.stSetpointsUserUnits.lrAcceleration |
[8] | SEW_GVL.Interface_Axis2.ProfileGeneration.Velocity.Out.xInVelocity |
[9] | SEW_GVL.Interface_Axis2.ProfileGeneration.Positioning.Out.xInPosition |
Note:
For changeover on the fly, it is important that the change to the control signals is detected by a PLC cycle of "TaskHighPrio". When controlling via the Interface_AxisName structure, make sure to integrate the mapping methods in "TaskHighPrio".