Motion Disarm Output Cam (MDOC)

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.
The Motion Disarm Output Cam (MDOC) instruction initiates the disarming of one or more Output Cams connected to the specified axis. Based on the disarm type, the MDOC instruction disarms either all Output Cams or only a specific Output Cam. The corresponding outputs maintain the last state after the disarming.
Architecture and safety support
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
MDOC_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
MDOC(Axis, ExecutionTarget, MotionControl, DisarmType);
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_VIRTUAL
AXIS_CONSUMED
Tip:
AXIS_CONSUMED is supported by
Compact GuardLogix
5580,
CompactLogix
5380, and
CompactLogix
5480 controllers only.
AXIS_CIP_DRIVE
AXIS_VIRTUAL
AXIS CONSUMED
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 that provides the position input to the Output Cam. Ellipsis launches Axis Properties dialog.
For controllers that support the REF_TO motion data types, the supported axis operand type can be replaced by an equivalent REF_TO type.
Execution Target
SINT, INT, or DINT
SINT, INT, or DINT
Immediate or Tag
The execution target defines the specific Output Cam from the set connected to the named axis. Behavior is determined by the following:
0...7 – Output Cams executed in the Logix controller.
8...31 – Reserved for future use.
Motion Control
MOTION_INSTRUCTION
MOTION_INSTRUCTION
Tag
Structure used to access instruction status parameters.
Disarm Type
SINT, INT, or DINT
SINT, INT, or DINT
Immediate
Selects one or all Output Cams to be disarmed for a specified axis. Select either:
0 = All – Disarms all Output Cams connected to the specified axis.
1 = Specific – Disarms the Output Cam that is connected to the specified axis and defined by the Execution Target.
Structured Text
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
Disarm Type
all
specific
0
1
MOTION_INSTRUCTION Structure
Mnemonic
Description
.DN (Done) Bit 29
It is set to true when Output Cam(s) have been successfully disarmed.
.ER (Error) Bit 28
It is set to true to indicate that the instruction detected an error.
Description
The MDOC instruction disarms a specific or all output cams for a specified axis depending on the selected disarm type. The axis provides the position input to the Output Cam. The execution target defines a specific Output Cam from the set that is connected to the specified axis.
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)
.
Extended Error Codes
Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions. Extended Error codes for the Parameter Out of Range (13) error code lists a number that refers to the number of the operand as they are listed in the faceplate from top to bottom with the first operand being counted as zero. Therefore for the MDOC instruction, an extended error code of 4 would refer to the Disarm Type operand's value. You would then have to check your value with the accepted range of values for the instruction.
Execution
If ERR is
And EXERR is
Then
Corrective Action
Cause
36
Varies
The size of the Output Cam array is not supported or the value of at least one member is out of range:
Output bit less than 0 or greater than 31.
Latch type less than 0 or greater than 3.
Unlatch type less than 0 or greater than 5.
Left or right position is out of cam range and the latch or unlatch type is set to "Position" or "Position and Enable".
Duration less than or equal to 0 and the unlatch type is set to "Duration" or "Duration and Enable".
Enable type less than 0 or greater than 3 and the latch or unlatch type is set to "Enable", "Position and Enable", or "Duration and Enable".
Enable bit less than 0 or greater than 31 and the latch or unlatch type is set to "Enable", "Position and Enable", or "Duration and Enable".
Latch type is set to "Inactive" and unlatch type is set to either "Duration" or "Duration and Enable".
Illegal Output Cam
37
Varies
Either the size of the Output Compensation array is not supported or the value of one of its members is out of range.
Illegal Output Compensation
The array index associated with errors 36 and 37 are stored in .SEGMENT of the Motion Instruction data type. Only the first of multiple errors are stored. The specific error detected is stored in Extended Error Code.
With the ability to dynamically modify the Output Cam table, the Illegal Output Cam error 36 may occur while the MAOC is in-process. In general, the cam elements in which an error was detected will be skipped. The following are exceptions, and will continue to be processed.
Error 2, Latch Type Invalid. Latch Type defaults to Inactive.
Error 3, Unlatch Type Invalid. Unlatch Type defaults to Inactive.
Error 8, with Unlatch Type of Duration and Enable. Will behave as an Enable Unlatch type.
Status Bits
MDOC Effects Status Bits
The MDOC instruction affects the following status words in the Motion Axis Structure:
  • OutputCamStatus
  • OutputCamPendingStatus
  • OutputCamLockStatus
  • OutputCamTransitionStatus
Each above is a DINT with bits 0 to 7 corresponding to the 8 execution targets. Bit 0 is execution target 0; bit 1 is execution target 1, etc.
Example
Ladder Diagram
MDOC_LD_ex_v31
Structured Text
MDOC(Axis1, ExecutionTarget1, MDOC_2, All);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.