Read this document and the documents listed in the additional resources section about installation, configuration, and operation of this equipment
before you install, configure, operate, or maintain this product. Users are required to familiarize themselves with installation and wiring instructions
in addition to requirements of all applicable codes, laws, and standards.
Activities including installation, adjustments, putting into service, use, assembly, disassembly, and maintenance are required to be carried out by
suitably trained personnel in accordance with applicable code of practice. If this equipment is used in a manner not specified by the manufacturer,
the protection provided by the equipment may be impaired.
In no event will Rockwell Automation, Inc. be responsible or liable for indirect or consequential damages resulting from the use or application of this
equipment.
The examples and diagrams in this manual are included solely for illustrative purposes. Because of the many variables and requirements associated
with any particular installation, Rockwell Automation, Inc. cannot assume responsibility or liability for actual use based on the examples and
diagrams.
No patent liability is assumed by Rockwell Automation, Inc. with respect to use of information, circuits, equipment, or software described in this
manual.
Reproduction of the contents of this manual, in whole or in part, without written permission of Rockwell Automation, Inc., is prohibited.
Throughout this manual, when necessary, we use notes to make you aware of safety considerations.
WARNING: Identifies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to
personal injury or death, property damage, or economic loss.
ATTENTION: Identifies information about practices or circumstances that can lead to personal injury or death, property damage, or economic
loss. Attentions help you identify a hazard, avoid a hazard, and recognize the consequence
Important:
Labels may also be on or inside the equipment to provide specific precautions.
Identifies information that is critical for successful application and understanding of the product.
SHOCK HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that dangerous voltage may be
present.
BURN HAZARD: Labels may be on or inside the equipment, for example, a drive or motor, to alert people that surfaces may reach dangerous
temperatures.
ARC FLASH HAZARD: Labels may be on or inside the equipment, for example, a motor control center, to alert people to potential Arc Flash. Arc
Flash will cause severe injury or death. Wear proper Personal Protective Equipment (PPE). Follow ALL Regulatory requirements for safe work
practices and for Personal Protective Equipment (PPE).
Allen-Bradley, Rockwell Software, Rockwell Automation, and TechConnect are trademarks of Rockwell Automation, Inc.
Trademarks not belonging to Rockwell Automation are property of their resp ective companies.
Summary of changes
This manual includes new and updated information. Use these reference tables to
locate changed information.
Global changes
This table identifies changes that apply to all information about a subject in the
manual and the reason for the change. For example, the addition of new supported
hardware, a software design change, or additional reference material would result
in changes to all of the topics that deal with that subject.
Subject Reason
All instruction topics. Added new safety controllers 5580 and 5380 to the list of
applicable controllers.
All instruction topics Updated the Ladder Diagram, Reset Signal, and Example
images to reflect the updated user interface.
All instruction topics In the Major/Minor Faults and See also section, replaced the
Common Attributes cross reference with a new cross
reference to the Index Through Arrays topic.
All instruction chapter title topics Added new link table with links to each instruction in the
chapter.
Topic Name Reason
Motion Axis Stop (MAS) on page 84Updated the programming guidelines section with new
paragraph explaining using MAS on any axis associated
with a coordinate system.
Motion Direct Drive Off (MDF) on page 51Updated the programming guidelines section with new
paragraph explaining using MAS on any axis associated
with a coordinate system.
Motion Axis Jog (MAJ) on page 101Updated the programming guidelines section with new
paragraph explaining using MAS on any axis associated
with a coordinate system.
Motion Axis Move (MAM) on page 112Updated the programming guidelines section with new
paragraph explaining using MAS on any axis associated
with a coordinate system.
Motion Run Hookup Diagnostic (MRHD) on page
330
Master Driven Coordinated Control (MDCC) on page
354
Motion Coordinated Stop (MCS) on page 465Updated the descriptions for the Decel Units and Jerk Units
Motion Coordinated Transform with Orientation
(MCTO) on page 367
Updated the flow chart
Updated the description for the Nominal Master Velocity
operand.
File Average (AVE) Select (SEL)
File Standard Deviation (STD) Selected Negate (SNEG)
File Fill (FLL) Selected Summer (SSUM)
File Sort (SRT) Set Dominant (SETD)
Find String (FIND) Split Range Time Proportional (SRTP)
For (FOR) Totalizer (TOT)
File Search and Compare (FSC) Up/Down Accumulator (UPDN)
Get System Value (GSV) and Set System Value
(SST)
Greater Than or Equal to (GEQ)
Greater than (GRT)
Insert String (INSERT)
Immediate Output (IOT)
Jump to Label (JMP) and Label (LBL)
Jump to Subroutine (JSR), Subroutine (SBR), and
Return (RET)
Jump to External Routine (JXR)
Less Than (LES)
Logix5000 Controllers General Instructions
Reference Manual 1756-RM003
Less Than or Equal to (LEQ)
LIFO Load (LFL)
LIFO Unload (LFU)
License Validation (LV)
Limit (LIM)
Log Base (LOG)
Lower to Case (LOWER)
Masked Move (MVM)
Masked Move with Target (MVMT)
Master Control Reset (MCR)
Masked Equal to (MEQ)
Message (MSG)
Middle String (MID)
Modulo (MOD)
Move (MOV)
Multiply (MUL)
Natural Log (LN)
Negate (NEG)
Not Equal to (NEQ)
No Operation (NOP)
One Shot (ONS)
One Shot Falling (OSF)
One Shot Falling with Input (OSFI)
One Shot Rising (OSR)
One Shot Rising with Input (OSRI)
Output Energize (OTE)
Output Latch (OTL)
Output Unlatch (OTU)
Proportional Integral Derivative (PID)
Radian (RAD)
Real to String (RTOS)
Reset (RES)
Reset SFC (SFR)
Return (RET)
Retentive Timer On (RTO)
Retentive Timer On with Reset (RTOR)
Pause SFC (SFP)
Size In Elements (SIZE)
Sequencer Input (SQI)
Logix5000 Controllers Advanced Process
Control and Drives and Equipment Phase
and Sequence Instructions Reference
Manual 1756-RM006
This manual provides a programmer with details about the available General,
Motion, Process, and Drives instruction set for a Logix-based controller.
If you design, program, or troubleshoot safety applications that use GuardLogix
controllers, refer to the
Reference Manual, publication 1756-RM095 .
This manual is one of a set of related manuals that show common procedures for
programming and operating Logix 5000™ controllers.
GuardLogix Safety Application Instruction Set Safety
For a complete list of common procedures manuals, refer to the
Controllers Common Procedures Programming Manual , publication
1756-PM001 .
The term Logix 5000 controller refers to any controller that is based on the Logix
5000 operating system.
The Studio 5000 Automation Engineering & Design Environment® combines
engineering and design elements into a common environment. The first element is
the Studio 5000 Logix Designer® application. The Logix Designer application is
the rebranding of RSLogix 5000® software and will continue to be the product to
program Logix 5000™ controllers for discrete, process, batch, motion, safety, and
drive-based solutions.
The Studio 5000® environment is the foundation for the future of
Rockwell Automation® engineering design tools and capabilities. The Studio 5000
environment is the one place for design engineers to develop all elements of their
control system.
Preface
Additional resources
Legal Notices
These documents contain additional information concerning related Rockwell
Automation products.
Resource Description
Industrial Automation Wiring and Grounding Guidelines ,
publication 1770-4.1
Provides general guidelines for installing a Rockwell
Automation industrial system.
Product Certifications webpage, available at
http://ab.rockwellautomation.com
Provides declarations of conformity, certificates, and other
certification details.
You can view or download publications at
http://www.rockwellautomation.com/literature
. To order paper copies of
technical documentation, contact your local Rockwell Automation distributor or
sales representative.
This document and any accompanying Rockwell Software products are
copyrighted by Rockwell Automation Technologies, Inc. Any reproduction
and/or distribution without prior written consent from Rockwell Automation
Technologies, Inc. is strictly prohibited. Please refer to the license agreement for
details.
End User License Agreement (EULA)
You can view the Rockwell Automation End-User License Agreement ("EULA")
by opening the License.rtf file located in your product's install folder on your hard
drive.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions, and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions, and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
The package GNU Compiler Collection (GCC) is licensed under the following
licenses:
GNU General Public License v3.0, the text of which is available at
Boost Software License 1.0, and BSD 3-clause (University of California Regents),
the text of which is available at http://www.boost.org/LICENSE_1_0.txt
.
The package Newlib is licensed under the following licenses:
GNU General Public License v2.0 w/Autoconf exception, the text of which is
available at http://spdx.org/licenses/GPL-2.0-with-autoconf-exception
.
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
GNU General Public License v3.0 w/Autoconf exception, the text of which is
available at http://spdx.org/licenses/GPL-3.0-with-autoconf-exception
Copyright (c) 1998-2017 The OpenSSL Project. All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must
display the following acknowledgment: "This product includes software
developed by the OpenSSL Project for use in the OpenSSL Toolkit.
(http://www.openssl.org/)"
4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
endorse or promote products derived from this software without prior
written permission. For written permission, please contact
openssl-core@openssl.org.
5. Products derived from this software may not be called "OpenSSL" nor may
"OpenSSL" appear in their names without prior written permission of the
OpenSSL Project.
6. Redistributions of any form whatsoever must retain the following
acknowledgment: "This product includes software developed by the
OpenSSL Project for use in the OpenSSL Toolkit
(http://www.openssl.org/)"
THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT "AS IS''
AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This product includes cryptographic software written by Eric Young
(eay@cryptsoft.com). This product includes software written by Tim Hudson
(tjh@cryptsoft.com).
/
Original SSLeay License
-----------------------
/Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
All rights reserved.
This package is an SSL implementation written by Eric Young
(eay@cryptsoft.com).
The implementation was written so as to conform with Netscapes SSL.
This library is free for commercial and non-commercial use as long as the
following conditions are adhered to. The following conditions apply to all code
found in this distribution, be it the RC4, RSA, lhash, DES, etc., code; not just the
SSL code. The SSL documentation included with this distribution is covered by
the same copyright terms except that the holder is Tim Hudson
(tjh@cryptsoft.com).
Copyright remains Eric Young's, and as such any Copyright notices in the code are
not to be removed.
If this package is used in a product, Eric Young should be given attribution as the
author of the parts of the library used. This can be in the form of a textual message
at program startup or in documentation (online or textual) provided with the
package.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the copyright notice, this list of
conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software must
display the following acknowledgment: "This product includes
cryptographic software written by Eric Young (eay@cryptsoft.com)" The
word 'cryptographic' can be left out if the routines from the library being
used are not cryptographic related :-).
4. If you include any Windows specific code (or a derivative thereof) from the
apps directory (application code) you must include an acknowledgment:
"This product includes software written by Tim Hudson
(tjh@cryptsoft.com)"
THIS SOFTWARE IS PROVIDED BY ERIC YOUNG "AS IS'' AND ANY
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
The licence and distribution terms for any publicly available version or derivative
of this code cannot be changed. [i.e., this code cannot simply be copied and put
under another distribution licence (including the GNU Public Licence.)]
Performance Drive, Integrated Architecture, Kinetix, Logix5000, Logix 5000,
Logix5550, MicroLogix, DeviceNet, EtherNet/IP, PLC-2, PLC-3, PLC-5,
PanelBuilder, PowerFlex, PhaseManager, POINT I/O, PowerFlex, Rockwell
Automation, RSBizWare, Rockwell Software, RSEmulate, Historian,
RSFieldbus, RSLinx, RSLogix, RSNetWorx for DeviceNet, RSNetWorx for
EtherNet/IP, RSMACC, RSView, RSView32, Rockwell Software Studio 5000
Automation Engineering & Design Environment, Studio 5000 View Designer,
SCANport, SLC, SoftLogix, SMC Flex, Studio 5000, Ultra 100, Ultra 200,
VersaView, WINtelligent, XM, SequenceManager are trademarks of Rockwell
Automation, Inc.
Any Rockwell Automation logo, software or hardware product not mentioned
herein is also a trademark, registered or otherwise, of Rockwell Automation, Inc.
Other Trademarks
CmFAS Assistant, CmDongle, CodeMeter, CodeMeter Control Center, and
WIBU are trademarks of WIBU-SYSTEMS AG in the United States and/or
other countries. Microsoft is a registered trademark of Microsoft Corporation in
the United States and/or other countries. ControlNet is a trademark of
ControlNet International. DeviceNet is a trademark of the Open DeviceNet
Vendors Association (ODVA). Ethernet/IP is a trademark of ControlNet
International under license by ODVA.
All other trademarks are the property of their respective holders and are hereby
acknowledged.
Warranty
This product is warranted in accordance with the product license. The product’s
performance may be affected by system configuration, the application being
performed, operator control, maintenance, and other related factors. Rockwell
Automation is not responsible for these intervening factors. The instructions in
this document do not cover all the details or variations in the equipment,
procedure, or process described, nor do they provide directions for meeting every
possible contingency during installation, operation, or maintenance. This
product’s implementation may vary among users.
This document is current as of the time of release of the product; however, the
accompanying software may have changed since the release. Rockwell Automation,
Inc. reserves the right to change any information contained in this document or
the software at any time without prior notice. It is your responsibility to obtain the
most current information available from Rockwell when installing or using this
product.
Online Support — http://www.rockwellautomation.com/support/
Motion instructions use three types of timing sequences:
Description Timing Type
The instruction completes in one scan. immediate on page 23
The instruction completes over several
scans because the instruction sends
messages to the servo module.
The instruction could take an indefinite
amount of time to complete.
message on page 24
process on page 25
Immediate type motion instructions execute to completion in one scan. If the
controller detects an error during the execution of these instructions, the error
status bit sets and the operation ends.
Examples of immediate type instructions include the:
5. When the rung becomes true, the instruction can execute again.
Application Program
To write a motion application program, you can insert motion instructions
directly into the ladder diagram application program. The motion instruction set
consists of five groups of motion instructions:
• Motion state instructions on page 29
• Motion move instructions on page 83
• Motion group instructions on page 211
• Motion event instructions on page 235
• Motion configuration instructions on page 305
These instructions operate on one or more axes. You must identify and configure
axes before you can use them. For more information about configuring axes, see
the ControlLogix Motion Module User Manual, publication 1756-6.5.16.
See also
Understand Motion Status and Configuration Parameters on page 608
Motion state control instructions directly control or change the operating states
of an axis. These are the motion state instructions.
Available Instructions
Ladder Diagram and Structured Text
MSOMSFMASDMASRMDOMDFMDSMAFR
Function Block
Not available
Important:
Tags used for the motion control attribute of instructions should only be used once. Re-use of the motion
control tag in other instructions can cause unintended operation. This may result in damage to equipment
or personal injury.
Motion state control instructions directly control or change the operating states of
an axis. The motion state instructions are:
If you want to: Use this instruction:
Enable the servo drive and activate the axis servo loop. MSO
Disable the servo drive and deactivate the axis servo
loop.
Force an axis into the shutdown operating state. Once
the axis is in the shutdown operating state, the
controller will block any instructions that initiate axis
motion.
Change an axis from an existing shutdown operating
state to an axis ready operating state. If all of the axes
of a servo module are removed from the shutdown
state as a result of this instruction, the OK relay
contacts for the module will close.
Enable the servo drive and set the servo output voltage
of an axis.
Deactivate the servo drive and set the servo output
voltage to the output offset voltage.
Activate the drive control loops for the specified axis
and run the motor at the specified speed.
Axis Ready This is the normal power-up state of the axis. In this state:
• The servo module drive enable output is inactive.
• Servo action is disabled.
• No servo faults are present.
Direct Drive Control This operating state allows the servo module DAC to directly
control an external drive. In this state:
• The servo module drive enable output is active.
• Position servo action is disabled.
Servo Control This operating state allows the servo module to perform closed
loop motion. In this state:
• The servo module drive enable output is active.
• Servo action is enabled.
• The axis is forced to maintain the commanded servo position.
Axis Faulted In this operating state, a servo fault is present, and the status of
the drive enable output, the action of the servo, and the
condition of the OK contact depend on the faults and fault
actions that are present.
Shutdown This operating state allows the OK relay contacts to open a set of
contacts in the E- string of the drive power supply. In this state:
• The servo module drive enable output is inactive.
• Servo action is disabled.
• The OK contact is open.
The 16 operating states of a CIP axis are:
As Shown in the Logix Designer
Operating State
Initializing 0 During the Initializing State, the drive first initializes
Programming Application Description
all attributes to their factory default values, that is,
resets all active faults. The drive then waits for the
controller to establish connections to it. Once
connections are established, the controller sets
configuration attributes in the drive to values stored
in the controller. If the drive supports synchronous
operation, the controller then synchronizes with the
drive. Once this process has been completed
successfully, the drive and all its associated axis
instances transition to the Pre-charge state. If a
problem is found during the initializing process, an
Initialization Fault is generated. An Initialization
Fault is an unrecoverable fault. You can only clear the
fault can via a power cycle or a drive reset. If the
connection to the drive closes for any reason during
operation, the drive returns to the Initializing State