Motion Axis Fault Reset (MAFR)
This information applies to the
CompactLogix
5370, ControlLogix
5570, Compact GuardLogix
5370, GuardLogix
5570, Compact GuardLogix
5380, CompactLogix
5380, CompactLogix
5480, ControlLogix
5580, and GuardLogix
5580 controllers. Controller differences are noted where applicable.Use the Motion Axis Fault Reset (MAFR) instruction to clear all motion faults for an axis. This is the only method for clearing axis motion faults.
IMPORTANT:
The MAFR instruction removes the fault status, but does not perform any other recovery, such as enabling servo action. In addition, when the controller removes the fault status, the condition that generated the fault(s) may still exist. If the condition is not corrected before using the MAFR instruction, the axis immediately faults again.
Architecture | Standard | Safety |
---|---|---|
CompactLogix 5370, ControlLogix 5570, Compact GuardLogix 5370, and GuardLogix 5570 controllers | Yes | No |
Compact GuardLogix 5380, CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix 5580 controllers | Yes | No |
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
MAFR(Axis,MotionControl);
The operands are the same as those for the relay ladder MAFR instruction.
Operands
Ladder Diagram and Structured Text
Operand | Type CompactLogix 5370, Compact GuardLogix 5370, Compact GuardLogix 5380, CompactLogix 5380, CompactLogix 5480 | Type ControlLogix 5570, GuardLogix 5570, ControlLogix 5580, and GuardLogix 5580 controllers | Format | Description |
---|---|---|---|---|
Axis | AXIS_CIP_DRIVE | AXIS_CIP_DRIVE AXIS_GENERIC AXIS_GENERIC_DRIVE AXIS_SERVO AXIS_SERVO_DRIVE Tip: AXIS_GENERIC is supported by the ControlLogix 5570 and the GuardLogix 5570 controllers only. | Tag | Name of the axis on which to perform the operation. For controllers that support the REF_TO motion data types, the supported axis operand type can be replaced by an equivalent REF_TO type. |
REF_TO_AXIS_CIP_DRIVE REF_TO_AXIS_VIRTUAL REF_TO_AXIS_GENERIC REF_TO_AXIS_GENERIC_DRIVE REF_TO_AXIS_SERVO REF_TO_AXIS_SERVO_DRIVE | Reference to the axis on which to perform the operation. | |||
Motion Control | MOTION_INSTRUCTION | MOTION_INSTRUCTION | Tag | Structure used to access instruction status parameters. |
MOTION_INSTRUCTION Structure
Mnemonic | Description |
---|---|
.EN (Enable) Bit 31 | It is set when the rung makes a false-to-true transition and remains set until the servo message transaction is completed and the rung goes false. |
.DN (Done) Bit 29 | It is set when the axis’ servo action has been successfully disabled and the drive enable and servo active status bits have been cleared. |
.ER (Error) Bit 28 | It is set to indicate that the instruction detected an error, such as if you specified an unconfigured axis. |
Description
The MAFR instruction directly clears the specified fault status on the specified axis. It does not correct the condition that caused the error. If the condition is not corrected prior to executing the MAFR instruction the axis could immediately fault again giving the appearance that the fault status was not reset.
This instruction is most commonly used as part of a fault handler program, which provides application specific fault action in response to various potential motion control faults. Once the appropriate fault action is taken, the MAFR instruction can be used to clear all active fault status bits.
IMPORTANT:
The .DN bit is not set immediately. It is set once the appropriate Motion module or drive completes its required resets, which could take up to several seconds. Once set the axis is in the Ready state, but only after the request is completed.
In this transitional instruction, the relay ladder, toggle the Rung-condition-in from cleared to set each time the instruction should execute.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. A major fault can occur if an uninitialized reference or a reference of the incorrect type is passed to the Axis operand. See
Common Attributes
for operand-related faults. Execution
Ladder Diagram
Condition/State | Action Taken |
---|---|
Prescan | The .EN, .DN, and .ER are cleared to false. |
Rung-condition-in is false | The .EN bit is cleared to false if the .DN or .ER bit is true. |
Rung-condition-in is true | The .EN bit is set to true and the instruction executes. If the EN bit is set to false, then there is no action taken. |
Postscan | N/A |
Structured Text
Condition/State | Action Taken |
---|---|
Prescan | See Prescan in Ladder Diagram table. |
Normal execution | See Rung-condition-in is false, followed by rung is true in the Ladder Diagram table. |
Postscan | See Postscan in Ladder Diagram table. |
Error Codes
See
Motion Error Codes (.ERR)
for Motion Instructions.Extended Error Codes
Extended Error Codes provide additional instruction specific information for the error codes that are generic to many instructions. See
Motion Error Codes (.ERR)
for Motion Instructions.MAFR Changes to Status Bits
None
Example
When the input conditions are true, the controller clears all motion faults for myAxis.
Ladder Diagram
Structured Text
MAFR(myAxis,myMotionControl);
Example
When the input conditions are true, the controller clears all motion faults for Axis3.
Relay Ladder
Structured Text
MAFR(Axis3,MAFR_3);
Provide Feedback