Error behavior
Error type
TwinCAT MC3 distinguishes between execution errors and control errors.
In the event of an execution error, the MC3 retains control of the axis. Communication with the hardware and the drive itself are functioning properly. Setpoint generation is still possible. In this case, the default response to an error is a controlled deceleration ramp using the maximum dynamics configured for the axis. This stop can be canceled using MC_Reset. After the reset, a new command can be initiated in the same cycle.
In the event of a control error, the MC3 loses control of the axis, typically due to a hardware or drive-related error. In this state, the response is defined by the parameters of the axis. Currently, a hard stop with zero dynamics is possible (HardStop).
Error propagation
The function blocks for couplings offer special settings for controlling error handling between the axes. The mechanism is identical for MC_GearIn, MC_GearInPos, and MC_CamIn.
ReactionToMasterError defines the behavior of the slave axis when the master axis enters an error state. When the TriggerSlaveError setting is enabled, any master error immediately triggers an error in the slave axis as well. In addition, the coupling is released. The slave axis then follows the standard MC3 response for that specific error type (see above). When the KeepCouplingWithSetValues setting is enabled, the coupling remains active even if the master axis has an error. The slave axis continues to generate setpoints based on the setpoints from the master axis. This mode allows for coordinated stopping while maintaining the synchronous relationship.
The reverse direction of propagation is configured using ReactionToSlaveError. When the TriggerMasterError setting is enabled, the slave axis forwards its error to its master axis. This is also how the master axis transitions into its error response. When the NoReaction setting is enabled, the master axis remains unaffected. The slave axis and the coupling module signal the error condition. In both cases, the coupling for this slave axis is disabled.
With the exception of the specific case described above (KeepCouplingWithSetValues), the master and slave axes are automatically decoupled if an error occurs on either side. After the underlying error has been acknowledged with MC_Reset, the application must re-execute the desired coupling command to resume coupled operation. Based on the diagnostic information available at the function block (Error, ErrorID, and MasterHasError), it is possible to determine whether the error occurred in the master or slave axis.
A propagated error is always an execution error on the receiver side.
Error propagation – Examples
As a general rule, if there is an error on the slave axis:
- Slave axis: The coupling is released, and the response depends on the error type.
- Master Axis: The master axis reports an error and either follows the MC's stop ramp or continues its current motion without being affected.
If there is an error on the master axis:
- Master axis: The response depends on the type of error.
- Slave axis: The slave axis reports an error and follows either the MC's stop ramp or the master axis's setpoints.
Scenario 1
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
TriggerSlaveError | TriggerMasterError | Control Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|
Scenario 2
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
TriggerSlaveError | NoReaction | Control Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|
Scenario 3
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
KeepCouplingWithSetValues | TriggerMasterError | Control Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|
Scenario 4
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
KeepCouplingWithSetValues | NoReaction | Control Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|
Scenario 5
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
TriggerSlaveError | TriggerMasterError | Execution Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|
Scenario 6
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
TriggerSlaveError | NoReaction | Execution Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|
Scenario 7
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
KeepCouplingWithSetValues | TriggerMasterError | Execution Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|
Scenario 8
Settings for the function block and the error type in question:
ReactionToMasterError | ReactionToSlaveError | Error Type |
|---|---|---|
KeepCouplingWithSetValues | NoReaction | Execution Error |
Reaction to errors:
Master error | Slave error |
|---|---|
|
|