MC_ReadAxisError

MC_ReadAxisError 1:

This function block reads the current axis error identifier.

Syntax

Definition:

FUNCTION_BLOCK MC_ReadAxisError
VAR_IN_OUT
    Axis        : Reference To AXIS_REF;
END_VAR
VAR_INPUT
    Enable      : BOOL;
END_VAR
VAR_OUTPUT
    Valid       : BOOL;
    Busy        : BOOL;
    Error       : BOOL;
    ErrorId     : UDINT;
    AxisErrorId : UDINT;
END_VAR

MC_ReadAxisError 2: Inputs

Name

Type

Description

Enable

BOOL

Read the axis error identifier continuously while Enable = TRUE.

MC_ReadAxisError 3: In/Outputs

Name

Type

Description

Axis

Reference To AXIS_REF

Reference to the axis

MC_ReadAxisError 4: Outputs

Name

Type

Description

Valid

BOOL

Valid output available at function block

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

AxisErrorId

UDINT

Axis error identifier

Further information

Alternatively, the axis status can be read from the PLC using the AXIS_REF structure.

myAxis.McToPlc.Std.AxisState
myAxis.McToPlc.Std.HasError
myAxis.McToPlc.Std.ErrorId

Information about the individual states is summarized in the section State diagram.

Version information

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