From the IEC program

 

The following application example shows how to control the "Positioning" operating mode from the IEC program.

Control

Control the axis in the Positioning structure as follows:

  • To activate the operating mode, set xActivate to "TRUE".
  • Define the setpoints forlrPosition, lrVelocity, lrAcceleration, and lrDeceleration.
  • To start the operating mode, set xStart to "TRUE".

Interface in the IEC Editor

Note:

When xStart has a value of "TRUE", the system accelerates with lrAcceleration. When the target position is reached, you will receive the feedback xInPosition = "TRUE" in the OUT structure. When xStart has a value of "FALSE", the system stops with lrDeceleration. The speed curve is trapezoidal as the drive was moved without jerk time.

Trace recording

[1]

Positioning.In.xActivate

[2]

Positioning.In.xStart

[3]

Positioning.In.lrPosition

[4]

Positioning.In.lrVelocity

[5]

Positioning.Out.xInPosition