Motion Apply Axis Tuning (MAAT)
This information applies to the
CompactLogix
5370, ControlLogix
5570, Compact GuardLogix
5370, GuardLogix
5570, and ControlLogix
5580 controllers.The Motion Apply Axis Tuning (MAAT) instruction is used to compute a complete set of servo gains and dynamic limits based on the results of a previously run Motion Run Axis Tuning (MRAT) instruction and update the motion module with these new gain parameters. While this instruction takes no explicit parameters, input is derived from the Axis Tuning Configuration parameters as described in Tune Status Parameter. After execution of the MAAT instruction, the corresponding axis should be ready for servo activation.
Available Languages
Ladder Diagram
Function Block
This instruction is not available in function block.
Structured Text
MAAT(Axis,MotionControl);
Operands
There are data conversion rules for mixed data types within an instruction. See
Data Conversions
.Ladder Diagram and Structured Text
Operand | Type | Format | Description |
Axis | AXIS_SERV0 AXIS_SERV0_DRIVE REF_TO_AXIS_SERVO REF_TO_AXIS_SERVO_DRIVE | Tag | Name of the axis on which to perform 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. |
Motion Control | MOTION_INSTRUCTION | Tag | Structure used to access instruction status parameters. |
See Structured Text Syntax for more information on the syntax of expressions within structured text.
MOTION_INSTRUCTION Structure
Mnemonic | Description |
.EN (Enable) Bit 31 | The enable bit indicates when the instruction is enabled. It remains set until servo messaging completes and the EnableIn goes false. |
.DN (Done) Bit 29 | The done bit indicates when the instruction completes an apply axis-tuning process. |
.ER (Error) Bit 28 | The error bit indicates when the instruction detects an error, such as if the axis is not configured. |
Description
The MAAT instruction is used to execute a series of computations resulting in values for gain and dynamic configuration parameters on the specified axis. As part of the work performed by MAAT, these resultant configuration parameters are applied so that the axis is ready for full servo operation. This instruction is designed to follow execution of the Motion Run Axis Tuning (MRAT) which generates axis input configuration values for the MAAT instruction. See the Motion Run Axis Tuning (MRAT) description for more information. MAAT requires no explicit input parameters; simply enter or select the desired physical axis.
If the targeted axis does not appear in the list of available axes, the axis has not been configured for operation. Use the Tag Editor to create and configure a new axis.
The MAAT instruction uses axis configuration parameters as input and output. The input configuration parameters that MAAT uses are shown in the table below. Refer to the Motion Axis Object specification for a detailed description of these parameters.
The axis configuration parameters that MAAT uses as input depends on the External Drive configuration. If the External Vel Servo Drive configuration bit parameter is TRUE, indicating interface to an external velocity servo drive, these input parameters are required.
Axis Parameter | Data Type | Units | Meaning |
Tuning Velocity | Real | pos units/sec | Top Speed of Tuning Profile. |
Tune Accel | Real | pos units/sec 2 | Calculated Acceleration Time of Tuning Profile. |
Tune Decel | Real | pos units/sec 2 | Calculated Deceleration Time of Tuning Profile. |
Tune Velocity Scaling | Real | mV/KCPS | Measured Velocity Scaling factor of axis Drive/Motor/Encoder system. |
Tune Velocity Bandwidth | Real | Hertz | Bandwidth of External Velocity Servo Drive. |
If the External Vel Servo Drive configuration bit parameter is FALSE, indicating interface to an external torque servo drive, these input parameters are required.
Axis Parameter | Data Type | Units | Meaning |
Damping Factor | Real | - | Damping Factor used to calculate the gains. |
Tuning Velocity | Real | pos units/sec | Top Speed of Tuning Profile. |
Tune Accel | Real | pos units/sec 2 | Calculated Acceleration Time of Tuning Profile. |
Tune Decel | Real | pos units/sec 2 | Calculated Deceleration Time of Tuning Profile. |
Effective Inertia | Real | mV/KCPS 2 | Computed Effective Inertia of Drive/Motor system. |
Position Servo Bandwidth | Real | Hertz | Maximum Position Servo Loop Bandwidth. |
The axis configuration parameters that MAAT generates as output depend on the External Drive configuration. If the External Vel Servo Drive configuration bit parameter is TRUE, indicating interface to an external velocity servo drive, these output parameters are generated.
Axis Parameter | Data Type | Units | Meaning |
Pos Proportional Gain | Real | 1/msec | Position Servo Loop Proportional Gain. |
Pos Integral Gain | Real | 1/msec 2 | Position Servo Loop Integral Gain -- Set to Zero. |
Velocity Feedforward | Real | - | Position Servo Loop Proportional Gain. |
Acceleration Feedforward | Real | - | Velocity Command Feedforward -- Set to Zero. |
Max Speed | Real | pos units/sec | Maximum Speed for Motion Profiles – Set to Tuning Velocity |
Max Acceleration | Real | pos units/sec 2 | Maximum Acceleration for Motion Profiles |
Max Deceleration | Real | pos units/sec 2 | Maximum Deceleration for Motion Profiles |
Output Filter Bandwidth | Real | Hertz | Bandwidth of Low Pass Servo Output Filter |
Output Scaling | Real | mV/ KCPS | Scale Factor applied to output of the Position Servo Loop to the DAC. |
Position Error Tolerance | Real | pos units | Maximum Servo Loop Position Error allowed without Fault. |
If the External Vel Servo Drive configuration bit parameter is FALSE, indicating interface to an external torque servo drive, these output parameters are generated.
Axis Parameter | Data Type | Units | Meaning |
Pos Proportional Gain | Real | 1/msec | Position Servo Loop Proportional Gain. |
Pos Integral Gain | Real | 1/msec 2 | Position Servo Loop Integral Gain. |
Vel Proportional Gain | Real | 1/msec | Velocity Servo Loop Proportional Gain. |
Vel Integral Gain | Real | 1/msec 2 | Velocity Servo Loop Integral Gain. |
Velocity Feedforward | Real | - | Position Servo Loop Proportional Gain. |
Acceleration Feedforward | Real | - | Velocity Command Feedforward. |
Max Speed | Real | pos units/sec | Maximum Speed for Motion Profiles – Set to Tuning Velocity |
Max Acceleration | Real | pos units/sec 2 | Maximum Acceleration for Motion Profiles. |
Maximum Deceleration | Real | pos units/sec 2 | Maximum Deceleration for Motion Profiles. |
Output Filter Bandwidth | Real | Hertz | Bandwidth of Low Pass Servo Output Filter. |
Output Scaling | Real | mV/KCPS 2 | Scale Factor applied to output of the Velocity Servo Loop to the DAC. |
Position Error Tolerance | Real | pos units | Maximum Servo Loop Position Error allowed without Fault. |
The output parameters generated by the MAAT instruction are immediately applied to the specified axis so that subsequent motion can be performed.
For more information about tuning configuration parameters see Tune Status Parameter.
To successfully execute a MAAT instruction, the targeted axis must be configured as a Servo axis and be in the Axis Ready state, with servo action off. If these conditions are not met, the instruction errors.
IMPORTANT:
The instruction execution may take multiple scans to execute because it requires multiple coarse updates to complete the request. The Done (.DN) bit is only set after the request is completed.
This is a transitional instruction:
- In relay ladder, toggle EnableIn from false to true each time the instruction should execute.
- In structured text, condition the instruction so that it only executes on a transition.
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 incorrect type is passed to the Axis operand. See
Common Attributes
for operand-related faults.Condition/StateExecution Ladder Diagram | Action Taken |
Prescan | The .EN, .DN, .ER, and .IP bits are cleared to false. |
Rung-condition-in is false | The .EN bit is cleared to false if the .DN or .ER bit is set to true. Otherwise, the .EN bit is not affected. The .DN,.ER ,.IP and .PC bits are not affected. |
Rung-condition-in is true | The .EN bit is set to true and the instruction executes. |
Postscan | N/A |
Structured Text
Condition/State | Action Taken |
Prescan | See Prescan in the 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 the 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. The following Extended Error codes help to pinpoint the problem when the MAAT instruction receives a Servo Message Failure (12) error message.
Associated Error Code (decimal) | Extended Error Code (decimal) | Meaning |
SERVO_MESSAGE_FAILURE (12) | No resource (2) | Not enough memory resources to complete request. (SERCOS) |
SERVO_MESSAGE_FAILURE (12) | Object Mode conflict (12) | Axis is in shutdown. |
SERVO_MESSAGE_FAILURE (12) | Permission denied (15) | Enable input switch error. (SERCOS) |
SERVO_MESSAGE_FAILURE (12) | Device in wrong state (16) | Redefine Position, Home, and Registration 2 are mutually exclusive (SERCOS), device state not correct for action. (SERCOS) |
Status Bits
MAAT Changes to Status Bits
The MAAT instruction does not make any changes to the status bits.
Example 1
When the input conditions are true, the controller computes a complete set of servo gains and dynamic limits for Axis1 based on the results of the previously executed Motion Run Axis Tuning (MRAT) instruction.
Ladder Diagram
Neutral Text for Ladder Diagram Normal Scan
MAAT(Axis1, MAAT_2);
Structured Text
MAAT(Axis1, MAAT_2);
Example 2
When the input conditions are true, the controller computes a complete set of servo gains and dynamic limits for a reference to Axis1 based on the results of the previously executed Motion Run Axis Tuning (MRAT) instruction.
Ladder Diagram
Neutral Text for Ladder Diagram Normal Scan
MAAT(Ref_Axis1, MAAT_2);
Structured Text
MAAT(Ref_Axis1, MAAT_2);
Provide Feedback