MC_ReadAxisError
In the case of an axis error the FB MC_ReadAxisError returns error code 40001 (axis error occurred within motion controller) at its ErrorID output. At output AxisErrorID the error code of the motion controller is displayed. The associated motion controller error message texts are placed with text or XML files. All other error codes notifying internal FB-errors.
Descriptions of the values at outputs ErrorID and AxisErrorID you can find in [DIAG].
Block diagram
![MC_ReadAxisError 1:](Images/png/15306329867__Web.png)
Parameters of the FB
VAR_IN_OUT | |||
| Axis | AXIS_REF | Axis reference |
VAR_INPUT | |||
| Enable | BOOL | While enabled, the error information is displayed at the output pins. |
VAR_OUTPUT | |||
| Valid | BOOL | If the output is TRUE, the error codes are valid. |
| Error | BOOL | Indicates if an error has occurred. |
| ErrorID | WORD | Error identification. |
| AxisErrorID | UDINT | Error code of the error of the motion controller. |
Behavior of the FB
- If the axis is in state Errorstop, the output Error becomes TRUE and output ErrorID displays error code 40001 (axis error within motion controller). Then output AxisErrorID shows the error code of the motion controller.