PLCopen State Machine

This diagram normatively defines according to PLCopenClosed A vendor -and product- independent worldwide association active in Industrial Control and aiming at standardizing PLC file formats based on XML the behavior of the axis at a high-level when multiple motion controlClosed Motion control is a sub-field of automation, in which the position and/or velocity of machines are controlled using some type of device such as a hydraulic pump, linear actuator, or an electric motor, generally a servo. Motion control is an important part of robotics and CNC machine tools; however, it is more complex than in the use of specialized machines, where the kinematics is usually simpler. The latter is often called General Motion Control (GMC). Motion control is widely used in the packaging, printing, textile and assembly industries function blocks are simultaneously activated.

The defined seven states are:

Motion State Machine (PLCopen)

Figure 9-51: Motion State Machine (PLCopen)


  • Note 1: In the ErrorStop or Stopping state, all function blocks can be called, although they are not executed.
    The exceptions are MC_Reset and Error which generate the transition to StandStill or ErrorStop respectively.
    Note 2: MC_Power FB is called with Enable=TRUE and there is an error in the Axis.
    Note 3: MC_Power FB is called with Enable=TRUE and there is no error in the Axis.
    Note 4: MC_Stop.Done and not MC_Stop.Execute.

A normal procedure starts in StandStill.

  • In this state the power can be switched on per axis (via the MC_Power command).
    • Access the Homing state (via the issue of the command Home per axis).
      This returns to StandStill after normal completion.
    • From here, transfer an axis to either Discrete Motion or Continuous Motion.
    • Via the Stopping state you can return to StandStill.
    • ErrorStop is a state to which the axis transfers in case of error.
    • Via a (manual) MC_ResetError command, return to StandStill.
      • From this state, the machine can be moved to an operational state again.

The States define the functionality of the function blocks.

Disabled State

The Disabled state describes the initial state of the axis.

Disable means power off without error.

  • In this state, the movement of the axis is not influenced by the FBs.
    • The axis feedback is operational.
    • If the MC_Power FB is called with Enable=TRUE while being in Disabled, this leads to either:
      • Standstill if there is no error inside the axis.
      • ErrorStop if an error exists.
    • Calling MC_Power with Enable=FALSE in any state, the axis goes to the state Disabled, either directly or via any other state.
    • If a motion generating FB controls an axis while the MC_Power FB with Enable=FALSE is called, the motion generating FB is aborted (CommandAborted).

ErrorStop State

The ErrorStop state is the axis goes to a stop, if possible.

  • No further FBs are accepted until a reset has been done from the ErrorStop state.
  • The transition Error refers to errors from the axis and axis control, and not from the function block instances.
  • These axis' errors are reflected in the output of the function blocks FB instances errors.
  • Issuing MC_Home in any other state than StandStill goes to ErrorStop, even if MC_Home is issued from the Homing state itself.
  • ErrorStop is valid as highest priority and applicable in case of an error.
    • The axis can have either power enabled or disabled, and can be changed via MC_Power.
    • However, as long as the error is pending, the state remains ErrorStop.

From StandStill to Stopping

StandStill is power on without an error.

  • Calling the FB MC_Stop in state StandStill changes the state to Stopping and back to Standstill when Execute = FALSE.
  • The Stopping state is kept as long as the input Execute = TRUE.
  • The Done output is set when the stop ramp is finished.