Motion Servo Off (MSF)
Use the Motion Servo Off (MSF) instruction to deactivate the drive output for the
specified axis and to deactivate the axis's servo loop.
IMPORTANT:
If you execute an MSF instruction while the
axis is moving, the axis coasts to an uncontrolled stop.
Available Languages
Ladder Diagram

Structured Text
MSF (Axis,MotionControl);
Operands
Ladder Diagram and Structured Text
Operand | Type | Format | Description |
|---|---|---|---|
Axis | AXIS | Tag | Name of the axis on which to perform operation. |
Motion Control | 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. 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.
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, 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.
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
Ladder Diagram

Provide Feedback