Motion Axis Stop (MAS)

CompactLogix
5380,
CompactLogix
5480,
ControlLogix
5580,
Compact GuardLogix
5380, and
GuardLogix
5580 controllers
Use the Motion Axis Stop (MAS) instruction to stop a specific motion process on an axis or to stop the axis completely.
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
L5K_MAS_LD_avail_v31.png
Function Block
This instruction is not available for function block.
Structured Text
MAS(Axis,MotionControl,StopType,ChangeDecel,DecelRate,DecelUnits,ChangeDecelJerk,DecelJerk,Jerk Units)
Operands
Ladder Diagram
Operand
Type
Tip:
AXIS_CONSUMED is supported by
Compact GuardLogix
5580,
CompactLogix
5380, and
CompactLogix
5480 controllers only.
Type
Tip:
AXIS_GENERIC is supported by the
ControlLogix
5570 and the
GuardLogix
5570 controllers only.
Format
Description
Axis
AXIS_CIP_DRIVE
AXIS_VIRTUAL
AXIS_CIP_DRIVE
AXIS_VIRTUAL
AXIS_GENERIC
AXIS_GENERIC_DRIVE
AXIS_SERVO
AXIS_SERVO_DRIVE
ControlLogix
5570,
GuardLogix
5570,
ControlLogix
5580, and
GuardLogix
5580 controllers
Tag
Name of the axis. 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
Control tag for the instruction.
Stop Type
DINT
Immediate
To Stop
Choose this Stop Type
All motion in process for this axis.
All = 0
With this selection, the instruction stops all motion on an axis. The stops takes any coordinated motion on the axis into account when it computes the Decel rate and stops that component of the coordinated motion. The other axes components of the coordinated motion are unaffected and continue.
If this instruction stops a Motion Drive Start (MDS) instruction, the Direct Control Feature is disabled and the affected axis is decelerated to a stop using the instruction parameters.
Only a certain type of motion but leave other motion processes running.
Choose the type of motion that you want to stop:
Jog = 1
Move = 2
Gear = 3
Home = 4
Tune = 5
Test = 6
Time Cam = 7
Position Cam = 8
Master Offset Move = 9
Direct Control = 10
(1)
The axis could still be moving when the MAS instruction is complete.
Change Decel
DINT
Immediate
If you want to
Then Choose
Use the Maximum Deceleration rate of the axis.
No = 0
Specify the deceleration rate.
Yes = 1
Decel Rate
REAL
Immediate or Tag
Important:
The axis could overshoot its target position if you reduce the deceleration while a move is in process.
Deceleration rate of the axis. The instruction uses this value only if Change Decel is Yes.
Decel Units
DINT
Immediate
Which units do you want to use for the Decel Rate?
  • Units per sec
    2
    (0)
  • % of Maximum (1)
Change Decel Jerk
DINT
Immediate
If you want to
Then Choose
Use the Maximum Deceleration Jerk rate of the axis.
No (0)
Program the deceleration jerk rate.
Yes (1)
Decel Jerk
REAL
Immediate or Tag
Important:
The axis could overshoot its target position if you reduce the deceleration jerk while a move is in process.
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 of the axis.
Use these values to get started.
Decel Jerk = 100 (% of Time)
0 = Units per sec
3
1 = % of Maximum
2 = % of Time (use this value to get started)
Jerk Units
DINT
Immediate
(1)
When the MAS instruction is used to with either an All or DirectVelocityControlStatus Command Stop Type, the selection also clears the MDS In Process (.IP) bit, and clears the Axis DirectVelocityControlStatus bit in the Motion Status attribute
Structured Text
This Operand
Has These Options Which You
Enter as Text
Or Enter as a Number
Stop Type
all
jog
move
gear
home
tune
test
timecam
positioncam
masteroffsetmove
directcontrol
0
1
2
3
4
5
6
7
8
9
10
Change Decel
no
yes
0
1
Decel Units
Units per sec
2
%ofmaximum
0
1
Change Decel Jerk
no
yes
0
1
Decel Jerk
no enumeration
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 of the axis.
Use this value to get started.
Decel Jerk = 100 % of Time (2)
Jerk Units
unitspersec
3
% of Maximum
% of Time
0
1
2
See Structured Text Syntax for more information on the syntax of expressions within structured text.
MOTION_INSTRUCTION Structure
To See If
Check To See If This Bit Is Set To
Data Type
Notes
A false-to-true transition caused the instruction to execute.
EN
BOOL
The EN bit stays set until the process is complete and the rung goes false.
The stop was successfully initiated.
DN
BOOL
An error happened.
ER
BOOL
The axis is stopping.
IP
BOOL
Any of these actions end the MAS instruction and clear the IP bit:
  • The axis is stopped
  • Another MAS instruction supersedes this MAS instruction
  • Shutdown command
  • Fault Action
The axis is stopped.
PC
BOOL
The PC bit stays set until the rung makes a false-to-true transition.
Description
Use the MAS instruction when you want a decelerated stop for any controlled motion in process for the axis. The instruction stops the motion without disabling the servo loop. A trapezoidal profile is always used for MAS with Stop Type=ALL for the deceleration regardless of the programmed profile type. Use the instruction to:
  • stop a specific motion process such as jogging, moving, or gearing
  • stop the axis completely
  • abort a test or tune process initiated by a Motion Run Hookup Diagnostics (MRHD) instruction or Motion Run Axis Tuning (MRAT) instruction.
    If the Stop Type is
    Then the MAS Instruction Uses This Profile
    Jog
    Same type of profile as the Motion Axis Jog (MAJ) instruction that started the jog.
    Move
    Same type of profile as the Motion Axis Move (MAM) instruction that started the move.
    None of the above
    Trapezoidal.
When MAS ( Stop Type = All ) is used on any axis associated with a coordinate system and a coordinated motion instruction is running on it, Coordinate system’s maximum deceleration is used to stop remaining axes. If the coordinate system contains orientation axes, Coordinate system’s Orientation maximum deceleration is used for stopping remaining Rx, Ry or Rz axes.
Example
Suppose you use a Motion Axis Jog (MAJ) instruction with an S-curve profile to start a jog. Then you use an MAS instruction with a Stop Type of Jog to stop the jog. In that case, the MAS instruction uses an S-curve profile to stop the jog.
Programming Guidelines
WARNING:
Risk of Velocity and/or End Position Overshoot
If you change move parameters dynamically by any method, that is by changing move dynamics [Motion Change Dynamics (MCD) instruction or Motion Coordinated Change Dynamics (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.
For more information, see Troubleshooting Axis Motion.
Guidelines
Details
In ladder diagram, toggle the rung condition each time you want to execute the instruction.
This is a transitional instruction:
  • In ladder diagram, toggle the rung-condition-in from cleared to set each time you want to execute the instruction.
In structured text, condition the instruction so that it only executes on a transition.
In structured text, instructions execute each time they are scanned.
  • Condition the instruction so that it only executes on a transition. Use either of these methods:
  • Qualifier of an SFC action
  • Structured text construct
For more information, see Structured Text Syntax.
Choose whether to stop all motion or only a specific type of motion.
If You Want to Stop
Then Choose This Stop Type
All motion in process for this axis.
All
The instruction uses a trapezoidal profile and stops the axis.
Stop only a certain type of motion but leave other motion processes running.
The type of motion that you want to stop
The axis could still be moving when the MAS instruction is complete.
The instruction uses an S-curve profile to stop the axis only if:
  • The Stop Type is Jog or Move, and
  • The jog or move used an S-curve profile.
Example:
Suppose your axis is executing both a jog and a move at the same time. And suppose you want to stop only the jog but leave the move running. In that case, choose a Stop Type of Jog.
To stop gearing or camming, select the slave axis.
To stop a gearing or position camming process, enter the
slave
axis to turn off the specific process and stop the axis. If the master axis is a servo axis, you can stop the master axis which in turn stops the slave without disabling the gearing or position camming.
Tip:
If the Master axis is moved manually while the Master axis was in a disabled state, the actual position of the slave axis continues to track the Master's position, regardless whether the MasterReference of the MAPC instruction is set to Actual or Command.
To stop a Master Offset move, enter the slave axis but use master units.
To stop an Absolute or Incremental Master Offset move:
  • For Axis, enter the slave axis.
  • For Deceleration and Jerk, enter the values and units for the master axis.
Be careful if the instruction changes motion parameters.
When you execute an MAS instruction, the axis uses the new deceleration and jerk rates for the motion that’s already in process. This can cause an axis to overshoot its speed, overshoot its end position, or reverse direction. S-curve profiles are more sensitive to parameter changes.
For more information, see
Troubleshoot Axis Motion
.
Use the jerk operands for S-curve profiles.
Use the jerk operands when
  • The Stop Type is Jog or Move.
  • The jog or move uses an S-curve profile.
Under those conditions, the instruction uses an S-curve profile to stop the axis. The instruction uses a constant deceleration rate for all other types of stops. You must fill in the jerk operands regardless of the type of stop.
Use % of Time for the easiest programming and tuning of jerk.
For an easy way to program and tune jerk, enter it as a % of the acceleration or deceleration time.
For more information, see
Tune an S-curve Profile
.
Master Driven Speed Control (MDSC) and the MAS Instruction
If the MAS is executed (goes IP) on the Slave Axis in Master Driven Mode, the MDSC link is immediately broken. The Slave always stops in Time Driven Mode, regardless if the active mode is Time Driven or Master Driven.
Stop Type for MAS
The behavior of the MAS instruction depends on the Stop Type parameter:
  • Time CAM, stop type moves, and jogs - When you invoke an MAS with Stop Type = Time Cam on an axis that is running in Master Driven Mode, the axis terminates Master Driven Mode, changes to Time Driven Mode, and stops as specified.
  • Master Offset Move - When you invoke an MAS with Stop Type = Master Offset Move on an axis that is running in Master Driven Mode and controlling a Position Cam, the offset axis terminates Master Driven Mode, changes to Time Driven Mode, and stops at the specified deceleration and deceleration jerk.
  • All - When you invoke an MAS with Stop Type = All, the MDSC link is broken immediately. All motion planners on the specified axis terminate Master Driven Mode and axes are stopped at the specified deceleration and deceleration jerk in Time Driven Mode.
If the axes are involved in any coordinated motion (in Master Driven Mode), then the axes break from the coordinate motion planner and the other axes in the coordinate system continue. The IP bit is cleared on the Master Driven Axis Control (MDAC).
Note that MAS ALL on the Master axis does not break the MDSC link. For all other stop types in which you execute an MAS instruction on an axis that is being controlled in Master Driven Mode, the motion planner terminates Master Driven Mode on the requested axis for the requested Stop Type, changes to Time Driven Mode, and stops at the specified deceleration and deceleration jerk in Time Driven Mode. Other stop types do not clear the IP bit on the MDAC.
The AC bit of the MDAC instruction resets when the axis is stopped.
MAS All reset the IP bit of the MDAC. Other stop types do not reset the IP bit.
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.
The status bit CalculatedDataAvailable in an active motion instruction status word for an MAS instruction resets when an MAS is executed (goes IP). The CalculatedData is not recomputed.
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 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 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 Ladder Diagram table.
Error Codes
See Motion Error Codes (.ERR).
Extended Error Codes
Use Extended Error Codes (.EXERR) for more instructions about an error. See Motion Error Codes (.ERR).
If ERR is
And EXERR is
Then
Cause
Corrective Action
13
Varies
An operand is outside its range.
The EXERR is the number of the operand that is out of range. The first operand is 0.
For example, if EXERR = 4, then check the Decel Rate.
EXERR
MAS Operand
0
Axis
1
Motion Control
2
Stop Type
3
Change Decel
4
Decel Rate
MAS Changes to Single Axis Status Bits
Motion Status Bits
If the Stop Type Is
Then
NOT All
The instruction clears the Motion Status bit for the motion process that you stopped.
All
The instruction clears all Motion Status bits.
Bit Name
State
Meaning
MoveStatus
FALSE
Axis is not Moving.
JogStatus
FALSE
Axis is not Jogging.
GearingStatus
FALSE
Axis is not Gearing.
HomingStatus
FALSE
Axis is not Homing.
StoppingStatus
TRUE
Axis is Stopping.
PositionCamStatus
FALSE
Axis is not Position Camming.
TimeCamStatus
FALSE
Axis is not Time Camming.
PositionCamPendingStatus
FALSE
Axis does not have a Position Cam Pending.
TimeCamPendingStatus
FALSE
Axis does not have a Time Cam Pending.
GearingLockStatus
FALSE
Axis is not in a Gear Locked condition.
PositionCamLockStatus
FALSE
Axis is not in a Cam Locked condition.
DirectVelocityControlStatus
FALSE
Axis is not under Direct Velocity Control.
DirectTorqueControlStatus
FALSE
Axis is not under Direct Torque Control.
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.