Motion Group Shutdown (MGSD)

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.
Use the Motion Group Shutdown (MGSD) instruction to force all axes in the designated group into a Shutdown state. The Shutdown state of an axis is Servo Off, drive output is deactivated, and the motion module’s OK solid-state relay contacts, if applicable, are opened. The group of axes remains in the Shutdown state until either Group Shutdown Reset is executed or each axis is individually reset via the Motion Axis Shutdown (MASD) instruction.
Available Languages
Ladder Diagram
MGSD_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
MGSD(Group,MotionControl);
Operands
Ladder Diagram
Operand
Type
Format
Description
Group
MOTION_GROUP
Tag
Name of the group of axes to perform operation on
Motion Control
MOTION_INSTRUCTION
Tag
Structure used to access instruction status parameters.
Structured Text
Operand
Type
Format
Description
Group
MOTION_GROUP
Tag
Name of the group of axes to perform operation on
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
The enable bit indicates when the instruction is enabled. It remains set until servo messaging completes and Rung-condition-in goes false.
.DN (Done) Bit 29
The done bit indicates when the instruction sets the group of axes to the shutdown operating state.
.ER (Error) Bit 28
The error bit indicates when the instruction detects an error, such as if messaging to the servo module failed.
Description
The MGSD instruction turns drive output off, disables the servo loops of all axes in the specified group, and opens any associated OK contacts for all applicable motion modules in the group. This action places all group axes into the Shutdown state. The MGSD instruction takes only one parameter; simply select or enter the desired group to shutdown.
Another action initiated by the MGSD instruction is the clearing of all motion processes in progress and a clearing of all the motion status bits. Associated with this action, the command also clears all motion instruction .IP bits that may currently be set for each axis in the group.
The MGSD instruction forces the targeted group of axes into the Shutdown state. One of the unique characteristics of the Shutdown state is that the OK solid state relay contact for all of the group’s motion modules Open. This feature can be used to open up the E-Stop string(s) that control main power to the various drive systems.
Another characteristic of the Shutdown state is that any instruction that initiates axis motion for an axis within the group is blocked from execution. Attempts to do so results in an execution error. Only by executing one of the Shutdown Reset instructions can motion then be successfully initiated.
To successfully execute a MGSD instruction, the targeted group must be created and configured.
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 MGSD 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.
This is a transitional instruction:
  • In relay ladder, toggle 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.
Master Driven Speed Control (MDSC) and the MGSD Instruction
When the group shuts down:
  • The IP bit of the Master Driven Axis Control (MDAC) and Master Driven Coordinate Control (MDCC) instructions reset as the group is shutdown.
  • The AC bit of the MDAC and MDCC instructions are reset when the axis is stopped as the group is shutdown.
  • The MGS instruction clears the pending Master Axis for all future single and coordinated motion instructions.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. 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
Extended Error Codes provide additional instruction specific information for the Error Codes that are generic to many instructions. See Motion Error Codes (ERR) for Motion Instructions.
Status Bits
MGSD Changes to Single 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 inactive.
ShutdownStatus
TRUE
Axis is in Shutdown state.
AccelStatus
FALSE
Axis is not Accelerating.
DecelStatus
FALSE
Axis is not Deceleratin.
GearingLockStatus
FALSE
Axis is not locked.
JogStatus
FALSE
Axis is not Jogging.
MoveStatus
FALSE
Axis is not Moving.
GearingStatus
FALSE
Axis is not Gearing.
HomingStatus
FALSE
Axis is not Homing
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 forces all axes in group1 into a shutdown operating state.
Ladder Diagram
MGSD_LD_ex_v31
Structured Text
MGSD(Motion,MGSD_2);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.