Exception Handling When Function Block Signals Error

Introduction

If a function block cannot start as intended, for example, because it is not properly parameterized or its execution is not permitted in the current state, the function block signals a detected error (output Error = TRUE). This does not typically imply that the affected axis transitions to the ErrorStop state, nor that it stops automatically.

Instead, the axis typically stays in whichever state it was before and continues to execute its current job as if the command with the detected error had not been issued. The controller application must respond to this detected error in an appropriate way.

Depending on the purpose of the function block that cannot be started (for example, starting synchronized movements with another axis, or moving to a different target position or with a different target velocity), the system behavior may entail severe consequences for the process. You must therefore implement appropriate application-specific and function block-specific error responses such as an asynchronous stop (by calling MC_Stop on the affected axis), or a synchronous stop (by calling MC_Stop on the master axis), or any other response that is appropriate for the specific situation.

 WARNING
UNINTENDED EQUIPMENT OPERATION
  • Implement appropriate error responses to all potential error conditions.
  • Verify the correct operation and effectiveness of all error responses by performing comprehensive tests, including commissioning tests, for all operating states, and all potential error situations.
Failure to follow these instructions can result in death, serious injury, or equipment damage.

Operating State Transitions

The following cases cause a function block to signal a detected error (output Error = TRUE), without impacting the state or job of the affected axis:

  • Invalid values for acceleration, deceleration, jerk

  • Invalid axis, master, or slave

  • Interruption of running function block not permitted (for example, while MC_Stop running)

  • Execution attempt in invalid Sercos phase

  • Axis, slave, or master not homed (for a function block which requires absolute positions)

If MC_Power is disabled while a motion function block is active, the axis goes to Disabled and the active motion function block signals Aborted.

There are a few exceptional cases in which a function block signals a detected error (output Error - TRUE) and the affected axis transitions to ErrorStop and performs an ErrorStop movement at the same time. This typically occurs when the situation that causes the error to occur and to be detected occurs while the job is already active. These situations are:

  • Interruption of communication with master axis (MC_CamIn, MC_GearIn, MC_CustomJob)

  • Homing not completed successfully (MC_Home)

  • If a drive reports a detected error while a motion function block is active, MC_Power signals a detected error, the axis transitions to ErrorStop, and the active motion function block signals a detected error.

  • Blended movement which would result in a position overshoot because blending is started while already in deceleration phase with unfavorable acceleration ramp

  • Invalid LREAL value or state generated by the user code running in a custom job (MC_CustomJob)

  • In the case of a Sercos phase-down while a motion function block is active, MC_Power signals a detected error, the axis transitions to ErrorStop, and the active motion function block signals a detected error.