MC_TriggerError

MC_TriggerError 1:

This function block triggers an error in the target motion object.

Syntax

Definition:

FUNCTION_BLOCK MC_TriggerError
VAR_INPUT
    MotionObject : Type_ErrorTriggerable;
    Execute      : BOOL;
    ErrorCode    : UDINT;
    ControlError : BOOL;
END_VAR
VAR_OUTPUT
    Done         : BOOL;
    Busy         : BOOL;
    Error        : BOOL;
    ErrorId      : UDINT;
END_VAR

MC_TriggerError 2: Inputs

Name

Type

Description

MotionObject

Type_ErrorTriggerable

Interface pointer to the object on which the error should be triggered (e.g. Axis).

Execute

BOOL

Trigger the command with rising edge.

ErrorCode

UDINT

Error code to be triggered

ControlError

BOOL

Trigger a ControlError (MC has no control over the axis, i.e. hardware or communication fault).

MC_TriggerError 3: Outputs

Name

Type

Description

Done

BOOL

Error has been successfully triggered.

Busy

BOOL

Function block is not finished and new output values are to be expected.

Error

BOOL

Error occurred within function block.

ErrorId

UDINT

Error identifier

Possible error codes

For this function block, the following values, among others, are possible for the ErrorId output:

Error(Hex)

Error(Dec)

Error type

Description

0x8145

33093

Function Block

Mapping of cyclic interface between NC and PLC is missing (e.g., AXIS_REF, AXES_GROUP_REF, ...). A reference used by the function block (e.g., to an axis, group, mover or other motion object) is not linked to the corresponding NC object, or its cyclic mapping is incomplete.

0x8151

33105

State

Command is not allowed in current axis state. If the axis has no controller enable, is in error or has been added to a group, some commands are not permitted.

An overview of all NC error codes can be found here:

Version information

  • TwinCAT Standard >= v3.1.4026.23.1
  • TF5500 MC3 Base >= v4.0.6