Motion Coordinated Stop (MCS)

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.
The Motion Coordinated Stop (MCS) instruction initiates a controlled stop of coordinated motion. Any pending motion profiles are canceled.
IMPORTANT:
Tags used for the motion control attribute of instructions should only be used once. Re-use of the motion control tag in other instructions can cause unintended operation. This may result in damage to equipment or personal injury.
IMPORTANT:
Risk of Velocity and/or End Position Overshoot
If you change move parameters dynamically by any method, that is by changing move dynamics (MCD or MCCD) or by starting a new instruction before the last one has completed, be aware of the risk of velocity and/or end position overshoot.
A Trapezoidal velocity profile can overshoot if maximum deceleration is decreased while the move is decelerating or is close to the deceleration point.
An S-curve velocity profile can overshoot if:
  • maximum deceleration is decreased while the move is decelerating or close to the deceleration point; or
  • maximum acceleration jerk is decreased and the axis is accelerating. Keep in mind, however, that jerk can be changed indirectly if it is specified in % of time.
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
MCS_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
MCS(CoordinateSystem, MotionControl,StopType, ChangeDecel, DecelRate,DecelUnits, ChangeDecelJerk,DecelJerk, JerkUnits);
Operands
There are data conversion rules for mixed data types within an instruction. See Data Conversion.
Ladder Diagram and Structured Text
Operand
Type
Format
Description
Coordinate System
COORDINATE_SYSTEM
Tag
Name of the coordinate system.
Reference to the coordinate system. 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.
Motion Control
MOTION_INSTRUCTION
Tag
Control tag for the instruction.
Stop Type
DINT
Immediate
If you want to
Choose this Stop Type
Stop all motion for the axes of the coordinate system and stop any transform that the coordinate system is a part of.
All (0) - For each axis, all motion generators, including the coordinated motion, are taken into account when computing the initial dynamics (i.e., acceleration rate and velocity) to be used in the Decel. Every axis in the coordinated system is stopped independently using the computed initial dynamics.
Stop only coordinated moves.
Coordinated Move (2)
Cancel any transform that the coordinate system is a part of.
Coordinated Transform (3)
Change Decel(1)
DINT
Immediate
If you want to
Then Choose
Use the maximum deceleration rate of the coordinate system.
No (0)
Specify the deceleration rate.
Yes (1)
Decel Rate
REAL
Immediate or Tag
Important:
An axis could overshoot its target position if you reduce the deceleration while a move is in process.
Deceleration along the path of the coordinated move. The instruction uses this value:
  • Only if Change Decel is Yes.
  • Only for coordinated moves.
Enter a value greater than 0.
Decel Units
DINT
Immediate
0 = Units per Sec
2
1 = % of Maximum
Only "% of Maximum" is allowed on Cartesian geometries with coordinate definition = XYZRxRyRz.
% of Cartesian max is used for XYZ and "% of orientation max" is used for Rx, Ry and Rz.
Change Decel Jerk
SINT, INT, or DINT
Immediate
0 = No
1 = Yes
Decel Jerk
SINT, INT, DINT, or REAL
Immediate or Tag
You must always enter a value for the Decel Jerk operand. This instruction only uses the value if the Profile is configured as S-curve.
Decel Jerk is the deceleration jerk rate for the coordinate system.
Use these values to get started.
  • Decel Jerk = 100 (% of Time )
  • Jerk Units = 2
Jerk Units
SINT, INT, or DINT
Immediate
0 = Units per sec
3
1 = % of Maximum
2 = % of Time (use this value to get started)
Only "% of Time" is allowed on Cartesian geometries with coordinate definition = XYZRxRyRz.
(1) Overshoot may occur if MCS is executed close to or beyond the deceleration point and the deceleration limit is decreased. Keep in mind that deceleration may be decreased indirectly by setting ChageDecel to NO if configured maximum deceleration rate is less than the active deceleration rate.
Structured Text
Enter the stop type and decel units without spaces.
See Structured Text Syntax for more information on the syntax of expressions within structured text.
For example, enter the Coordinate System operand as CoordinateSystem.
How Stop Types Affect Transforms
This table describes how the stop types affect coordinate systems that are a part of a transform.
This Operand
Description
All
This stop type:
  • stops the axes in the specified coordinate system. It also stops the axes of any coordinate system that shares axes with this coordinate system.
  • cancels any transforms that the coordinate system is a part of.
Coordinate Move
This stop type stops only the coordinated moves. Any transforms stay active.
Coordinated Transform
This stop type cancels the transforms associated with the specified coordinate system. All transform-related motion stops on all associated target coordinate systems. However, source coordinate axes will continue to move as instructed.
Example
If four coordinate systems are linked via three transforms. And the first coordinate system (CS1) is the source and is processing commanded motion.
MCS Coordinate Systems
Executing an MCS instruction on CS2 and using a stop type of coordinated transform results in:
  • Transforms T1 and T2 are canceled.
  • Transform T3 stays active.
  • the axes in CS1 stay in motion.
  • the axes in Coordinate Systems CS2 and CS3 stop via the deceleration rate selected in the MCS instruction or the maximum coordinate deceleration rate.
  • the axes in CS4 follow the respective CS3 axes.
In an Motion Axis Stop (MAS) instruction, a stop type of all also cancels transforms.
MOTION_INSTRUCTION Data Type
To see if
Check if this bit is on
Data Type
Notes
The rung is true
EN
BOOL
Sometimes the EN bit stays on even if the rung goes false. This happens if the rung goes false before the instruction is done or an error has occurred.
Motion Calculate Transform (MCT) (3)
The stop was successfully initiated
DN
BOOL
An error happened
ER
BOOL
The axis is stopping
IP
BOOL
Any of these actions ends the MCS instruction and turns off the IP bit:
  • The coordinate system is stopped.
  • Another MCS instruction supersedes this MCS instruction.
  • Shutdown instruction.
  • Fault Action.
The axis is stopped
PC
BOOL
The PC bit stays on until the rung makes a false-to-true transition.
Master Driven Speed Control (MDSC) and the MCS Instruction
If an MCS is issued when in Master Driven Mode, a switch is made to Time Driven Mode and the axes are stopped in Time Driven Mode. MCS All resets the IP bit of the Master Driven Coordinate Control (MDCC) instruction. Other stop types do not reset the IP bit.
The MCS All instruction clears the pending Master Axis for all future coordinated motion instructions. However, MCS ALL on the Master axis does not break the MDSC link.
The AC bit of the MDCC instruction is reset when the axis is stopped.
The instruction queue is cleared when an MCS All or MCS Coordinated is executed (goes IP).
The status bit CalculatedDataAvailable in an active motion instruction status word for an MCLM or MCCM instruction clears when an MCS is executed (goes IP). The CalculatedData is not recomputed.
Note that if a stop is issued very close to the programmed endpoint, the actual stop may be beyond the programmed endpoint, especially if run in Master Driven Mode.
MCS 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.
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 operands. 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 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, 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
See Extended Error Codes for Motion Instructions. It has information about how to use the extended error codes. See Motion Error Codes (.ERR) for motion instructions.
Changes to Status Bits
The instruction changes these status bits when it executes.
In the tag for the
This bit
When the stop type is
Turns
Axis
CoordinatedMotionStatus
MCS Motion Coordinated Stop
Off when the coordinated move stops
TransformStatus
Coordinated Move
Unchanged
  • All
  • Coordinated Transform
Off
ControlledByTransformStatus
Coordinated Move
Off when the axes stop and the PC bit of the MCS instruction turns on
  • All
  • Coordinated Transform
Off
Coordinate System
MotionStatus
MCS Motion Coordinated Stop
Off when the coordinated move stops
AccelStatus
MCS Motion Coordinated Stop
Off
DecelStatus
MCS Motion Coordinated Stop
On during the stop and then off when the stop completes
StoppingStatus
MCS Motion Coordinated Stop
On during the stop and then off when the PC bit turns on
MoveStatus
MCS Motion Coordinated Stop
Off
MoveTransitionStatus
MCS Motion Coordinated Stop
Off
TransformSourceStatus
Coordinated Move
Unchanged
  • All
  • Coordinated Transform
Off
TransformTargetStatus
Coordinated Move
Unchanged
  • All
  • Coordinated Transform
Off
How Stop Types Affect Transforms an Axis Motion Example
Suppose you have this situation.
MCS Situation
Where:
  • Coordinate system 1 (CS1) contains the X, Y, and Z axes.
  • Coordinate system 2 (CS2) contains the Y, Z, and S axes.
  • Coordinate system 3 (CS3) contains the A, B, and C axes.
  • Transform (T1) links source coordinate CS2 to target CS3.
  • CS2 (XYS) axes are mapped to CS3 (ABC) axes.
  • MAM instructions executed on the Y, Z, and S axes.
  • MCLM instruction executed on CS2.
  • MCT instruction executed with CS2 as the source and CS3 as the target.
  • No coordinate instructions were executed on CS2 or CS3.
This table shows the results of executing various MCS and MAS instructions with different stop types.
Instruction
Stop Type
Result
MCS on CS1
All
The MCLM instruction on CS2 will stop.
The MAM on Y will stop.
The MAM on Z will stop.
The MAM on S will continue.
T1 is canceled.
Axes ABC will stop due to canceling the transform.
MCS on CS2
All
The MCLM instruction on CS2 will stop.
The MAM on Y will stop.
The MAM on S will stop.
The MAM on Z will continue.
T1 is canceled.
Axes ABC will stop due to canceling the transform.
MCS on CS3
All
The MCLM instruction on CS2 will continue.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will continue.
T1 is canceled.
Axes ABC will stop due to canceling the transform.
MCS on CS1
Coordinated Move
The MCLM instruction on CS2 will continue.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will continue.
T1 stays active.
Axes ABC will follow the respective CS2 axes.
MCS on CS2
Coordinated Move
The MCLM instruction on CS2 will stop.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will continue.
T1 stays active.
Axes ABC will follow the respective CS2 axes.
MCS on CS3
Coordinated Move
The MCLM instruction on CS3 will stop.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will continue.
T1 stays active.
Axes ABC will follow the respective CS2 axes.
MAS on Y
All
The MCLM instruction on CS2 will stop.
The MAM on Y will stop.
The MAM on S will continue.
The MAM on Z will continue.
T1 is canceled.
Axes ABC will stop due to canceling the transform.
MAS on Y
Move
The MCLM instruction on CS2 will continue.
The MAM on Y will  stop.
The MAM on S will continue.
The MAM on Z will continue.
T1 stays active.
Axes ABC will follow the respective CS2 axes.
MAS on Z
All
The MCLM instruction on CS2 will continue.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will stop.
T1 stays active.
Axes ABC will follow the respective CS2 axes.
MAS on Z
Move
The MCLM instruction on CS2 will continue.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will stop.
T1 stays active.
Axes ABC will follow the respective CS2 axes.
MCS on CS1
Coordinated Transform
The MCLM instruction on CS2 will continue
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will continue.
T1 stays active.
Axes ABC will follow the respective CS2 axes.
MCS on CS2
Coordinated Transform
T1 is canceled.
The MCLM instruction on CS2 will continue.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will continue.
Axes ABC will stop due to canceling the transform.
MCS on CS3
Coordinated Transform
T1 is canceled.
The MCLM instruction on CS2 will continue.
The MAM on Y will continue.
The MAM on S will continue.
The MAM on Z will continue.
Axes ABC will stop due to canceling the transform.
Example
Ladder Diagram
MCS_LD_ex_v31
Structured Text
MCS(myMcsCoordinateSystem,myMcsMotionControl,All,Yes,myMcsDecelRate,Unitspersec2,Yes,100.0,%ofTime);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.