Master Driven Coordinated Control (MDCC)
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 Master Driven Coordinated Control (MDCC) instruction defines a Master:Slave relationship between a Master Axis and a Slave Coordinate System.
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
MDCC (SlaveCoordinateSystem, MasterAxis, MotionControl, MasterReference, NominalMasterVelocity);
Operands
Ladder Diagram and Structured Text
Operand | Type CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers | Type CompactLogix 5370, ControlLogix 5570, Compact GuardLogix 5370, and GuardLogix 5570 controllers | Format | Description |
---|---|---|---|---|
Slave System | COORDINATE_SYSTEM REF_TO_COORDINATE_SYSTEM | COORDINATE_SYSTEM | tag | The Coordinate System that the Master Axis controls when the motion planner is in Master Driven mode. Ellipsis launches the Coordinate System properties dialog. Upon verification, you receive a verification error if the Slave is a non-Cartesian Coordinate System or if the Master Axis is in the Slave Coordinate System. The MDCC link is broken when the following instructions are executed: On any axis in the Slave Coordinate System or the Slave Coordinate System: MAS (All), MCS (All), MGS, MASD, MCSD, MGSD, a mode change. Note that MAS (anything other than All) and MCS do NOT break the MDCC link. The Shutdown instructions (MGSD, MASD, MCSD) never go IP. On the Master Axis: MASD, MCSD, and MGSD. Note that MAS and MCS for any Stop Type, including All, do NOT break the MDCC link. A mode change (Rem Run to Rem Prog or Rem Prog to Rem Run) or an axis fault also breaks the MDCC link. For controllers that support the REF_TO motion data types, the coordinate system operand type can be replaced by the REF_TO_COORDINATE_SYSTEM type. |
Master Axis | AXIS_CONSUMED AXIS_CIP_DRIVE AXIS_VIRTUAL REF_TO_AXIS_CONSUMED REF_TO_AXIS_CIP_DRIVE REF_TO_AXIS_VIRTUAL Tip: AXIS_CONSUMED is supported by Compact GuardLogix 5580, CompactLogix 5380, and CompactLogix 5480 controllers only. | AXIS_CONSUMED AXIS_SERVO AXIS_SERVO_DRIVE AXIS_GENERIC AXIS_GENERIC_DRIVE AXIS_CIP_DRIVE AXIS_VIRTUAL | tag | Any configured Single Axis that the Slave Coordinate System follows. The Master Axis can be any axis that was configured. |
Motion Control | MOTION_INSTRUCTION | MOTION_INSTRUCTION | tag | Control tag for the instruction. |
Master Reference | UNIT32 | UNIT32 | immediate tag | Selects the Master position source as either Actual Position (0) or Command Position (1). |
Nominal Master Velocity | REAL | REAL | immediate tag | Used as an additional conversion constant for master driven MCPM moves programmed in percentage of maximum. |
Master Reference
The Master Reference for an MDCC instruction selects the Master Axis position source.
The enumerations for Master Reference Axis are:
Actual – Slave motion is generated from the actual (current) position of the Master Axis as measured by its encoder or other feedback device.
Command – Slave motion is generated from the command (desired) position of the Master Axis. Because there is no Command Position for a Feedback Only Axis, if you select either Actual or Command for Master Reference, the Actual Position of the Master Axis is used. The Actual and Command Position are always the same for this case. No error is generated. Because there is no Actual Position for a Virtual axis, if you select either Actual or Command for Master Reference, the Command Position is used. No error is generated.
An error is generated if a MDCC instruction is executed that changes the Master Reference of a Slave Coordinate System that is in motion. The new MDCC instruction errors and the original one remains active.
Nominal Master Velocity
If master driven coordinated move is programmed to run at a speed that equals 100% of maximum and master axis runs at its Nominal Master Velocity, then the coordinated move will run at the configured maximum speed of the coordinate system.
Calculate actual master axis velocity in percentage of the maximum as a percentage of actual master velocity with respect to nominal master velocity. For example, nominal master vel =50 ips therefore actual vel = 40 ips = (40/50) * 100 = 80%.
Calculate actual slave velocity in a percentage of the maximum as a product of programmed slave velocity in the percentage of the maximum and actual master axis velocity percentage of the maximum. For example, programmed slave velocity = 50% of the maximum, master velocity = 80% of the maximum, final slave velocity = 80 * 50 = 40% of the maximum.
Convert final slave velocity in a percentage of maximum to Units/sec as usual. For example, final velocity = 40%, coordinate system maximum is speed 200 Units/sec, final velocity limit is 200 * (40/100) = 80 Units/sec.
Structured Text
See Structured Text Syntax for more information on the syntax of expressions within structured text.
You have the option to browse for enumerations in the Structured Text Editor as shown.
Outputs
Mnemonic | Description |
---|---|
.EN (Enable) Bit 31 | The enable bit is set when the rung transitions from false-to-true and stays set until the rung goes false. |
.DN (Done) Bit 29 | The done bit is set when the coordinate MDCC instruction is successfully initiated. |
.ER (Error) Bit 28 | The error bit is set when there is an invalid combination of parameters in the MDCC instruction. |
.IP (In Process) Bit 26 | The in process bit is set when the MDCC instruction is activated and reset by an instruction (for example, the MCSD instruction). |
.AC (Active) Bit 23 | The active bit is set when an MCLM or MCCM is activated (that is, when the AC bit of the MCLM or MCCM instruction is set) on a Coordinate System that is selected as the Slave Coordinate System of the MDCC instruction. |
Description
MDCC is a transitional instruction:
In relay ladder, toggle the Rung-condition-in from false to true each time the instruction should execute.
In structured text, condition the instruction so that it only executes on a transition.
The Motion Master Driven Coordinate Control instruction (MDCC) is used by the Master Driven Speed Control (MDSC) to synchronize one or more motion axes or Coordinate System to a common Master Axis when the Slave System is a Coordinate System.
The MDCC instruction defines the relationship between the external Master Axis and the Slave Coordinate System for the MCLM and the MCCM Instructions. When an MDCC is executed (goes IP), the specified Slave Coordinate System in the MDCC instruction is logically geared with the designated Master Axis. After motion on the Master Axis is initiated, all the axes in the Coordinate System specified as the Slave Coordinate System follow the Master Axis motion at the programmed dynamics of the programmed instruction.
There are no changes in any active motion when a new MDCC instruction is activated. Activating an MDCC instruction just puts the parameters programmed in the MDCC instruction into a pending state. The parameters in the pending MDCC instruction are changed if you execute a succeeding MDCC instruction before a new MCLM or MCCM instruction is activated. The MDCC becomes active (AC bit is set) only when all queued motion is complete and the motion queue is empty.
All motion in the queue keeps using the same Master Axis even if there is a pending MDCC with a different master. The values in the pending MDCC instruction are only used when the next MCLM or MCCM instruction is activated on the Slave Coordinate System when the queue is empty, or a MCLM or MCCM is executed (goes IP) with a Merge type of All or Coordinate. (Note that this is because the merge empties the queue.)
Motion Direct Command and the MDCC Instruction
To obtain Motion Direct support for the MDCC instruction, you must first program an MDCC in one of the supporting program languages before you execute an MCLM or MCCM in Master driven Mode.
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 Coordinate System or Axis operands. See Index Through Arrays for array-indexing 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 either the .DN or .ER bit is true. |
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 and rung-condition-in 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.
Verification Errors
An invalid or No Master Axis will cause new errors to be generated when verified by the programming software. The following conditions may cause this error:
- The Master Axis is a member of the Slave Coordinate System.
- The Master Axis or the Slave Coordinate System is not configured.
- The Master Axis or an axis in the Slave Coordinate System is inhibited.
- A redefine position is in progress.
- Home of the Master axis or an axis in the Slave Coordinate System is in progress.
Example
Ladder Diagram
Structured Text
MDCC(myMdccSlaveSystem,myMdccMasterAxis,myMdccMotionControl,Command,myMdccNominalMasterVelocity);
Provide Feedback