# MC_Reset

The MC_Reset FB takes an axis from the "Errorstop" state to the "Standstill" state and discards all axis errors. Calling up MC_Reset has no influence on the outputs of the other FBs.

Blockdiagramm

Parameters of the FB

VAR_IN_OUT
Variable name | Data type | Description
axis | AXIS_REF | Axis reference

VAR_INPUT
Variable name | Data type | Description
Execute | BOOL | If the value if TRUE, a reset is executed on the assigned axis.

VAR_OUTPUT
Variable name | Data type | Description
Done | BOOL | The axis is in the "Standstill“ state.
Error | BOOL | Indicates TRUE if an error occurs in the FB.
ErrorID | WORD | Error code.

Behaviour of the FB

- Commanding a reset is permissible only if the axis is in the "Errorstop" state. If this is not the case, the "error" output is set to FALSE and "error_id" indicates an error value that indicates the current state of the axis.
- No new command can be sent when this FB is active. It cannot be retriggered.
- If the reset command cannot be sent to the axis within the number of FB invocations specified by the global datum MAX_RESET_RETRAILS, the "Error“ output is set to FALSE and “ErrorID” indicates the error P-ERR-44075 (ERR_PO_AX_DID_NOT_TAKE_ORDER). The value of MAX_RESET_RETRAILS can be adjusted to the specific application.
- If a reset command was successfully acknowledged after a specific number of FB invocations, this is indicated by the error P-ERR-44002 (ERR_PO_AX_ANSWER_TIME_OUT) at the “ErrorID” output and the “Error” output becomes TRUE. The number of FB calls can be specified for the specific application in the global data item MAX_RESET_WAIT_CYCLES.
- If the axis is in the TorqueControl and then assumes an error state, this state is restored after a successful reset. In all other cases, the axis assumes the "StandStill" state.