Motion Group Strobe Position (MGSP)

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 Strobe Position (MGSP) instruction to latch the current Command and Actual Position of all axes in the specified group at a single point in time. The latched positions are available in the StrobeActualPosition and StrobeCommandPosition parameters in the Motion Axis Object for each axis configured in the group.
Available Languages
Ladder Diagram
MGSP_LD_avail_v31
Function Block
This instruction is not available in function block.
Structured Text
MGSP(Group,MotionControl);
Operands
Ladder Diagram and 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
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 group of axes have been successfully set to Shutdown state.
.ER (Error) Bit 28
It is set to indicate that the instruction detected an error, such as if you specified an unconfigured group.
Description
The MGSP instruction synchronously latches all command and actual position values of all axes in the specified group at the time of execution. The MGSP instruction takes only one parameter; simply select or enter the desired axis to strobe.
If the targeted group does not appear in the list of available groups, the group has not been configured for operation. Use the Tag Editor to create and configure a new groups.
The MGSP instruction may be used at any time to capture a complete set of command and actual position information for all axes in the specified group. This operation is often required as a precursor to computations involving position values of different axes within the group.
To successfully execute a MGSP instruction, the targeted group must be configured.
IMPORTANT:
The MGSP instruction execution completes in a single scan, setting the Done .DN bit immediately.
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.
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 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.
Status Bits
MGSP Changes to Status Bits
The MGSP instruction does not make any changes to the status bits.
Examples
When the input conditions are true, the controller latches the current command and the actual position of all axes in group1.
Ladder Diagram
MGSP_LD_ex_v31
Structured Text
MGSP(Motion,MGSP_2);
Provide Feedback
Have questions or feedback about this documentation? Please submit your feedback here.