Motion Servo Off (MSF)

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 Servo Off (MSF) instruction to deactivate the drive output for the specified axis and to deactivate the axis' servo loop.
IMPORTANT:
If you execute an MSF instruction while the axis is moving, the axis coasts to an uncontrolled stop.
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 controller
Yes
No
Available Languages
Ladder Diagram
MSF_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
MSF (Axis,MotionControl);
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_GENERIC
AXIS_GENERIC_DRIVE
AXIS_SERVO
AXIS_SERVO_DRIVE
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.
See
Structured Text Syntax
for more information on the syntax of expressions within structured text.
MOTION_INSTRUCTION Structure
Mnemonic
Description
.EN (Enable) Bit 31
It is set when the rung makes a false-to-true transition and remains set until the servo message transaction is completed and the rung goes false.
.DN (Done) Bit 29
It is set when the axis’ servo action has been successfully disabled and the drive enable and servo active status bits have been cleared.
.ER (Done) Bit 28
It is set to indicate that the instruction detected an error, such as if you specified an unconfigured axis.
Description
The MSF instruction directly and immediately turns off drive output and disables the servo loop on any physical servo axis. With non-CIP motion, this places the axis in the Axis Ready state described in Motion State Instructions. With CIP motion, this places the axis in the Stopped state described in Motion State Instructions. The MSF instruction also disables any motion planners that may be active at the time of execution. The MSF instruction requires no parameters – simply enter or select the desired axis.
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.
You can use the MSF instruction to turn servo action off when you must move the axis by hand. Since the position continues to be tracked even with servo action off. When the servo loop is turned on again, by the Motion Servo On (MSO) instruction, the axis is again under closed-loop control, at the new position.
The axis stopping behavior varies depending upon the type of drive. In some cases the axis coasts to a stop and in other cases the axis decelerates to a stop using the drive’s available stopping torque.
For non-CIP motion, to execute an MSF instruction successfully, the targeted axis must be configured as a Servo axis. If this condition is not met, the instruction errs. If you have an Axis Type of Virtual the instructions errors because with a Virtual Axis the servo action and drive enable status are forced to always be true. A Consumed axis data type also errors because only the producing controller can change the state of a consumed axis.
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.
Additionally, for CIP motion, the MSF instruction supports canceling the Motion Drive Start (MDS) instruction. This includes clearing the MDS In Process (.IP) bit, and clearing the DirectVelocityControlStatus bit and the DirectTorqueControlStatus bit in the Motion Status attribute.
In this transitional instruction, the relay ladder, toggle the Rung-condition-in from cleared to set each time the instruction should execute.
Master Driven Speed Control (MDSC) and the MSF Instruction
If an MSF is issued in Master Driven Mode, the system shuts the servo off.
The IP bit of the Master Driven Axis Control (MDAC) instruction does not change on an axis that has its servos turned off.
The AC bit of the MDAC instruction resets when the axis stops as the servos are turned off.
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 Axis operand. See
Common Attributes
for operand-related faults.
Execution
Ladder Diagram
Condition
Ladder Diagram Action
Prescan
The .EN, .DN, and .ER bits are cleared.
The rung-condition-out is set to false.
Rung-condition-in is false
The .EN bit is cleared if the .DN or .ER bit is true.
Rung-condition-in is true
The .EN bit is cleared to false if the .DN or .ER bit is true
Postscan
The rung-condition-out is set to false.
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.
MSF Changes to Status Bits
Axis Status Bits
Bit Name
State
Meaning
ServoActionStatus
FALSE
Axis is in Servo Off state with the servo loop inactive.
DriveEnableStatus
FALSE
Axis Drive Enable output is active.
Motion Status Bits
Bit Name
State
Meaning
AccelStatus
FALSE
Axis is not Accelerating.
DecelStatus
FALSE
Axis is not Decelerating.
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
FALSE
Axis is not 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.
Example
When the input conditions are true, the controller disables the servo drive and the axis servo loop configured by Axis0.
Ladder Diagram
MSF_LD_ex_v31
Structured Text
MSF(myAxis, myMotionControl);
Relay Ladder
MSF_RL_ex_v36
Structured Text
MSF(Axis_01,MSF_1);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.