Motion Arm Watch (MAW)
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 Arm Watch (MAW) instruction to arm motion module watch position event checking for the specified axis. When this instruction is called, a watch position event is enabled using the watch Position for the Axis and specified Forward or Reverse event condition. After the arming is complete the Actual Position for the Axis is monitored against the Watch Position and when the specified watch event condition is met, the Event (PC) bit is set, and the Watch Event Status bit in the Axis data structure is set.
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
MAW(Axis,MotionControl, TriggerCondition,Position);
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_SERVO AXIS_SERVO_DRIVE AXIS_GENERIC_DRIVE AXIS_GENERIC Tip: AXIS_GENERIC is supported by the ControlLogix 5570 and the GuardLogix 5570 controllers only. | 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 | MOTION_INSTRUCTION | Tag | Structure used to access instruction status parameters. |
Trigger Condition | BOOLEAN | BOOLEAN | Immediate | Select the watch-event trigger condition: 0 = forward – the servo module looks for the actual position to change from less than the watch position to greater than the watch position. 1 = reverse – the servo module looks for the actual position to change from greater than the watch position to less than the watch position. |
Position | REAL | REAL | Immediate or Tag | The new value for the watch position. |
See
Structured Text Syntax
for more information on the syntax of expressions within structured text. For the operands that require you to select from available options, enter your selection as:
This Operand | Has These Options Which You | |
Enter as Text | Or Enter as a Number | |
TriggerCondition | forward reverse | 0 1 |
MOTION_INSTRUCTION Structure
Mnemonic | Description |
.EN (Enable) Bit 31 | It is set to true when the rung makes a false-to-true transition and remains set to true until the servo message transaction is completed and the rung goes false. |
.DN (Done) Bit 29 | It is set to true when the axis watch event checking has been successfully armed. |
.ER (Error) Bit 28 | It is set to true to indicate that the instruction detected an error, such as if you specified an unconfigured axis. |
.IP (In Process) Bit 26 | It is set to true on positive rung transition and cleared to false after the watch event has occurred, or has been superseded by another Motion Arm Watch, or terminated by a Motion Disarm Watch command. |
.PC (Process Complete) Bit 27 | It is set to true when a watch event occurs. |
Description
The MAW instruction sets up a Watch Position event to occur when the specified physical axis reaches the specified Set-point position.
Set Point Position
Watch Position events are useful for synchronizing an operation to a specified axis position while the axis is moving, such as activating a solenoid to push a carton off a conveyor at a certain axis position. Select or enter the desired physical axis, the desired Trigger Condition, and enter a value or tag variable for the desired Watch Position.
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.
When an Arm Watch Position instruction is executed, the WatchEventStatus bit is set to 0 (FALSE) and the actual position of a physical axis is monitored (at the servo loop update rate) until it reaches the specified Watch Position. After the watch position event occurs, the WatchEventStatus bit for the axis is set to 1 (TRUE).
Multiple watch position events may be active at a given time, however only one may be active at a time for any given physical axis. Each event is monitored independently and may be checked using the appropriate WatchEventStatus bit.
IMPORTANT:
In large I/O connections, force values can slow down the rate at which the controller processes repetitive watch positions.
To successfully execute a MAW instruction, the targeted axis must be configured as either a Servo or Feedback Only axis. Otherwise, the instruction errs.
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 not set immediately, 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 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, .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. The following Extended Error codes help to pinpoint the problem when the MAW instruction receives a Servo Message Failure (12) error message. See
Motion Error Codes (.ERR)
for Motion Instructions.Associated Error Code (decimal) | Extended Error Code (decimal) | Meaning |
SERVO_MESSAGE_FAILURE (12) | No Response (2) | Not enough memory resources to complete request. (SERCOS) |
Status Bits
MAW Changes to Status Bits
Bit Name | State | Meaning |
WatchEventArmedStatus | TRUE | The axis is looking for a watch position event. |
WatchEventStatus | FALSE | The previous watch event is cleared. |
Example
Ladder Diagram
Structured Text
MAW(Axis1,MAW_1,Forward,fwdmvpos_1);
Provide Feedback