MC_Reset
This function block resets all motion object-related errors and transitions the motion object out of state ErrorStop.
The resulting state is Disabled, if no Enable is requested for the motion object (e.g. via MC_Power).
It results in DiscreteMotion, if the motion object has a closed control loop and a controlled error reaction is still ongoing.
Otherwise, Standstill is the resulting state. This function block does not affect the output of motion function block instances.
Syntax
Definition:
FUNCTION_BLOCK MC_Reset
VAR_INPUT
Axis : Type_PtpErrorResettable;
Execute : BOOL;
END_VAR
VAR_OUTPUT
Done : BOOL;
Busy : BOOL;
Error : BOOL;
ErrorId : UDINT;
END_VAR
Inputs
|
Name |
Type |
Description |
|---|---|---|
|
Axis |
Interface pointer to the object on which the command should be performed (e.g. Axis, Linear Mover). | |
|
Execute |
BOOL |
Trigger the command with rising edge. |
Outputs
|
Name |
Type |
Description |
|---|---|---|
|
Done |
BOOL |
Potential axis and/or drive error has been reset. State Standstill, Disabled or DiscreteMotion is reached. |
|
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 |
Notes on the migration from NC2 to MC3
The MC3 function block MC_Reset is active only when an error occurs and resets any position lag only when an error occurs.
If the connected drive hardware is also in an error state, a reset command is automatically sent to the hardware when the MC3 is reset. It is not necessary to perform a manual FB_SoEReset.
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. |
0x81a2 | 33186 | Environment | I/O data for more than n consecutive MC cycles invalid. Hardware process data was invalid for several consecutive MC cycles (e.g. EtherCAT slave not in OP, WcState error). |
0x8124 | 33060 | Function Block | Command execution does not terminate (e.g., MC_Reset does not signal DONE). A command did not deliver its Done signal within the expected time window. Typically occurs for reset, file or hardware operations when the peer does not respond. |
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