Allen-Bradley 1756 GuardLogix, 5069 CompactLogix, 1789 SoftLogix, 1756 ControlLogix, 5069 Compact GuardLogix Reference Manual

...
Reference Manual
Logix 5000 Advanced Process Control and Drives and Equipment Phase and Sequence Instructions
1756 ControlLogix, 1756 GuardLogix, 1769 CompactLogix, 1769 Compact GuardLogix, 1789 SoftLogix, 5069 CompactLogix, Emulate 5570

Important user information

ies information about practices or circumstances that can cause an explosion in a hazardous environment, which may lead to
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: Identif 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
None for this release.
New or enhanced features
Subject Reason
Common Attributes on page 537 Added link to the Elementary Data Types topic
Immediate values on page 540 Added Integer Immediate Values and Floating Point
Immediate Values tables.
Data Conversions on page 541 Changed Optimal data types to intermediate data types and
included extended data types USINT, INT, UINT, UDINT, ULINT, LREAL. In the Convert SINT or INT to DINT section, added converting DINT to LINT. Included converting data for 32 and 64 bits.
Elementary data types on page 545 Changed the topic title from Data Types to Elementary Data
Types. Added LINT, USINT, UINT, UDINT, ULINT, REAL, and LREAL.
LINT data types on page 548 Added a list of applicable controllers that support LINT data
types used in instructions.
Floating Point Values on page 548 Added a list of applicable controllers. Added LREAL tag
description.
Index Through Arrays on page 551 Added two new tips explaining Logix Designer allows
subscripts that are extended data type tags only. Also explained using all available integer elementary data types as a subscript index.
Bit Addressing on page 552 Added new definitions.
FOR_DO on page 525 Updated the description for loop ends.
Equipment Phase Instructions on page 415
The controllers that support Equipment Phase instructions expanded to include the CompactLogix 5370 and CompactLogix 5380, ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and Compact GuardLogix 5380 controllers.
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 3

Instruction Locator

Use this locator to find the applicable Logix5000 controllers instruction manual for each instruction.
Logix5000 Controllers General Instructions Reference Manual 1756-RM003
Absolute Value (ABS) Alarm (ALM) Master Driven Coordinated Control (MDCC)
Add (ADD) Attach to Equipment Phase (PATT) Motion Apply Axis Tuning (MAAT)
Analog Alarm (ALMA) Attach to Equipment Sequence (SATT) Motion Apply Hookup Diagnostics (MAHD)
Always False (AFI) Coordinated Control (CC) Motion Arm Output Cam (MAOC)
Arc Cosine (ACS, ACOS) D Flip-Flop (DFF) Motion Arm Registration (MAR)
Arc Sine (ASN, ASIN) Deadtime (DEDT) Motion Arm Watch (MAW)
Arc Tangent (ATN, ATAN) Derivative (DERV) Motion Axis Fault Reset (MAFR)
ASCII Chars in Buffer (ACB) Detach from Equipment Phase (PDET) Motion Axis Gear (MAG)
ASCII Clear Buffer (ACL) Detach from Equipment Sequence (SDET) Motion Axis Home (MAH)
ASCII Handshake Lines (AHL) Discrete 3-State Device (D3SD) Motion Axis Jog (MAJ)
ASCII Read (ARD) Discrete 2-State Device (D2SD) Motion Axis Move (MAM)
ASCII Read Line (ARL) Enhanced PID (PIDE) Motion Axis Position Cam (MAPC)
ASCII Test for Buffer Line (ABL) Enhanced Select (ESEL) Motion Axis Stop (MAS)
ASCII Write (AWT) Equipment Phase Clear Failure (PCLF) Motion Axis Time Cam (MATC)
ASCII Write Append (AWA) Equipment Phase Command (PCMD) Motion Axis Shutdown (MASD)
Bit Field Distribute (BTD) Equipment Phase External Request (PXRQ) Motion Axis Shutdown Reset (MASR)
Bit Field Distribute with Target (BTDT) Equipment Phase Failure (PFL) Motion Calculate Cam Profile (MCCP)
Bit Shift Left (BSL) Equipment Phase New Parameters (PRNP) Motion Coordinated Path Move (MCPM)
Logix5000 Controllers Advanced Process Control and Drives and Equipment Phase and Sequence Instructions Reference Manual 1756-RM006
Logix5000 Controllers Motion Instructions Reference Manual MOTION-RM002
Bit Shift Right (BSR) Equipment Phase Override Command (POVR) Motion Calculate Slave Values (MCSV)
Bitwise And (AND) Equipment Phase Paused (PPD) Motion Coordinated Transform with Orientation
(MCTO)
Bitwise (NOT) Equipment Sequence Assign Sequence Identifier
(SASI)
Bitwise (OR) Equipment Sequence Clear Failure (SCLF) Motion Calculate Transform Position with
Boolean AND (BAND) Equipment Sequence command (SCMD) Motion Change Dynamics (MCD)
Boolean Exclusive OR (BXOR) Equipment Sequence Override (SOVR) Motion Coordinated Change Dynamics (MCCD)
Boolean NOT (BNOT) Function Generator (FGEN) Motion Coordinated Circular Move (MCCM)
Boolean OR (BOR) High Pass Filter (HPF) Motion Coordinated Linear Move (MCLM)
Break (BRK) High/Low Limit (HLL) Motion Coordinated Shutdown (MCSD)
Breakpoints (BPT) Integrator (INTG) Motion Coordinated Shutdown Reset (MCSR)
Clear (CLR) Internal Model Control (IMC) Motion Coordinated Stop (MCS)
Compare (CMP) JK Flip-Flop (JKFF) Motion Coordinated Transform (MCT)
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 5
Motion Calculate Transform Position (MCTP)
Orientation (MCTPO)
Instruction Locator
Logix5000 Controllers General Instructions Reference Manual 1756-RM003
Convert to BCD (TOD) Lead-Lag (LDLG) Motion Direct Drive Off (MDF)
Convert to Integer (FRD) Low Pass Filter (LPF) Motion Direct Drive On (MDO)
Copy File (COP), Synchronous Copy File (CPS) Maximum Capture (MAXC) Motion Direct Start (MDS)
Cosine (COS) Minimum Capture (MINC) Motion Disarm Output Cam (MDOC)
Compute (CPT) Modular Multivariable Control (MMC) Motion Disarm Registration (MDR)
Count down (CTD) Moving Average (MAVE) Motion Disarm Watch (MDW)
Count up (CTU) Moving Standard Deviation (MSTD) Motion Group Shutdown (MGSD)
Count up/down CTUD Multiplexer (MUX) Motion Group Shutdown Reset (MGSR)
Data Transition (DTR) Notch Filter (NTCH) Motion Group Stop (MGS)
Degrees (DEG) Phase State Complete (PSC) Motion Group Strobe Position (MGSP)
Diagnostic Detect (DDT) Position Proportional (POSP) Motion Redefine Position (MRP)
Digital Alarm (ALMD) Proportional + Integral (PI) Motion Run Axis Tuning (MRAT)
DINT To String (DTOS) Pulse Multiplier (PMUL) Motion Run Hookup Diagnostics (MRHD)
Divide (DIV) Ramp/Soak (RMPS) Motion Servo Off (MSF)
End of Transition (EOT) Rate Limiter (RLIM) Motion Servo On (MSO)
Equal to (EQU) Reset Dominant (RESD)
File Arithmetic (FAL) Scale (SCL)
File Bit Comparison (FBC) S-Curve (SCRV)
FIFO Load (FFL) Second-Order Controller (SOC)
FIFO Unload (FFU) Second-Order Lead Lag (LDL2)
Logix5000 Controllers Advanced Process Control and Drives and Equipment Phase and Sequence Instructions Reference Manual 1756-RM006
Logix5000 Controllers Motion Instructions Reference Manual MOTION-RM002
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)
6 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Instruction Locator
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
Logix5000 Controllers Motion Instructions Reference Manual MOTION-RM002
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 7
Instruction Locator
Logix5000 Controllers General Instructions Reference Manual 1756-RM003
Sequencer Load (SQL)
Sequencer Output (SQO)
Sine (SIN)
Square Roost (SQR/SQRT)
String Concatenate (CONCAT)
String Delete (DELETE)
String to DINT (STOD)
String to REAL (STOR)
Swap Byte (SWPB)
Subtract (SUB)
Tangent (TAN)
Timer Off Delay (TOF)
Timer Off Delay with Reset (TOFR)
Timer On Delay (TON)
Timer On Delay with Reset (TONR)
Temporary End (TND)
Tracepoints (TPT)
Trigger Event Task (EVENT)
Truncate (TRN)
Unknown Instruction (UNK)
Upper Case (UPPER)
User Interrupt Disable (UID)/User Interrupt Enable (UIE)
X to the Power of Y (XPY)
Examine if Closed (XIC)
Examine If Open (XIO)
Bitwise Exclusive (XOR)
Logix5000 Controllers Advanced Process Control and Drives and Equipment Phase and Sequence Instructions Reference Manual 1756-RM006
Logix5000 Controllers Motion Instructions Reference Manual MOTION-RM002
8 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Preface
Process Control Instructions

Table of contents

Studio 5000 environment................................................................................................. 15
Additional resources .......................................................................................................... 16
Purpose of this manual ...................................................................................................... 16
Legal Notices ....................................................................................................................... 16
Chapter 1
Process Control Instructions ........................................................................................... 19
Alarm (ALM) ...................................................................................................................... 20
Discrete 3-State Device (D3SD) ..................................................................................... 26
Discrete 2-State Device (D2SD) ..................................................................................... 41
Deadtime (DEDT) ............................................................................................................ 51
Function Generator (FGEN) .......................................................................................... 56
Lead-Lag (LDLG) .............................................................................................................. 62
Enhanced PID (PIDE) ...................................................................................................... 67
Position Proportional (POSP) ...................................................................................... 102
Ramp/Soak (RMPS) ....................................................................................................... 111
Scale (SCL) ........................................................................................................................ 125
Split Range Time Proportional (SRTP) ...................................................................... 130
Totalizer (TOT) .............................................................................................................. 137
Coordinated Control (CC) ........................................................................................... 147
CC Function Block Configuration ...................................................................... 181
CC Function Block Model Initialization ............................................................ 182
CC Function Block Tuning ................................................................................... 183
CC Function Block Tuning Errors ...................................................................... 183
CC Function Block Tuning Procedure ............................................................... 184
Internal Model Control (IMC) .................................................................................... 184
IMC Fun
IMC Function Block Model Initialization ......................................................... 202
IMC Function Block Tuning ................................................................................ 202
IMC Function Block Tuning Errors .................................................................... 203
IMC Function Block Tuning Procedure ............................................................. 204
Modular Multivariable Control (MMC) .................................................................... 204
MMC Function Block Configuration ................................................................. 243
MMC Function Block Model Initialization....................................................... 245
MMC Function Block Tuning .............................................................................. 245
Use an MMC Function Block for Splitter Control .......................................... 246
MMC Function Block Tuning Errors ................................................................. 246
MMC Function Block Tuning Procedure .......................................................... 247
Current SP
Use the Coordinated Control Function Block to Control ............................. 248
CV High/Low Limiting ................................................................................................. 250
CV Percent Limiting ....................................................................................................... 251
CV Rate-of-Change Limiting ........................................................................................ 252
ction Block Configuration .................................................................... 201
......................................................................................................................... 248
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 9
Table of contents
Drives
Filter
Select_Limit Instructions
CV Windup Limiting ..................................................................................................... 253
Execution ........................................................................................................................... 254
Switch Between Program Control and Operator Control .............................. 254
Operating Modes ...................................................................................................... 255
Convert the PV and SP Values to Percent .......................................................... 257
Primary Loop Control ............................................................................................ 257
Processing Faults ....................................................................................................... 259
Select the Control Variable .................................................................................... 259
Update the CVOper and CVProg Values ........................................................... 260
Select the Setpoint .................................................................................................... 260
SP High/Low Limiting ........................................................................................... 261
Chapter 2
Drives Instructions .......................................................................................................... 263
Integrator (INTG) ........................................................................................................... 264
Proportional + Integral (PI) .......................................................................................... 270
Pulse Multiplier (PMUL) ............................................................................................... 281
S-Curve (SCRV) .............................................................................................................. 289
Second-Order Controller (SOC) ................................................................................. 298
Up/Down Accumulator (UPDN) ............................................................................... 308
HMI Button Control (HMIBC) ................................................................................. 312
Chapter 3
Filter Instructions ............................................................................................................ 319
Derivative (DERV) .......................................................................................................... 320
High Pass Filter (HPF) ................................................................................................... 324
Low Pass Filter (LPF) ...................................................................................................... 330
Notch Filter (NTCH) .................................................................................................... 336
Second-Order Lead Lag (LDL2) ................................................................................... 341
Chapter 4
Select/Limit Instructions ............................................................................................... 349
Enhanced Select (ESEL) ................................................................................................. 350
High/Low Limit (HLL) ................................................................................................. 357
Multiplexer (MUX) ......................................................................................................... 362
Rate Limiter (RLIM) ....................................................................................................... 365
Select (SEL) ....................................................................................................................... 370
Selected Negate (SNEG) ................................................................................................ 373
Selected Summer (SSUM) ............................................................................................. 376
10 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Table of contents
Statistical Instructions
Logical and Move
Equipment Phase Equipment Sequence
Chapter 5
Instructions
Statistical Instructions ..................................................................................................... 381
Moving Average (MAVE) .............................................................................................. 382
Maximum Capture (MAXC) ........................................................................................ 388
Minimum Capture (MINC) ......................................................................................... 392
Moving Standard Deviation (MSTD) ......................................................................... 395
Chapter 6
Logical and Move Instructions ...................................................................................... 401
D Flip-Flop (DFF) ........................................................................................................... 401
JK Flip-Flop (JKFF) ......................................................................................................... 404
Reset Dominant (RESD) ................................................................................................ 407
Set Dominant (SETD) .................................................................................................... 411
Chapter 7
Equipment Phase Instructions ...................................................................................... 415
Attach to Equipment Phase (PATT) ........................................................................... 416
Detach from Equipment Phase (PDET) ..................................................................... 421
Equipment Phase Clear Failure (PCLF) ..................................................................... 424
Equipment Phase Command (PCMD) ...................................................................... 427
Equipment Phase External Request (PXRQ)............................................................. 433
Equipment Phase Failure (PFL) .................................................................................... 443
Equipment Phase New Parameters (PRNP) .............................................................. 448
Equipment Phase Override Command (POVR) ...................................................... 451
Equipment Phase Paused (PPD) ................................................................................... 455
Phase State Complete (PSC) ......................................................................................... 460
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 11
Chapter 8
Equipment Sequence instructions ................................................................................ 465
Attach to Equipment Sequence (SATT) .................................................................... 465
Detach from Equipment Sequence (SDET)............................................................... 468
Equipment Sequence Assign Sequence Identifier (SASI) ........................................ 470
Equipment Sequence Clear Failure (SCLF) ............................................................... 471
Equip
ment Sequence command (SCMD) .................................................................. 473
Equipment Sequence Diagram instructions ............................................................... 476
Equipment Sequence Override (SOVR) ..................................................................... 476
Guidelines for SATT instructions ................................................................................ 479
Guidelines for SCMD instructions .............................................................................. 480
Guidelines for SOVR instructions ................................................................................ 480
Result codes for SATT instructions ............................................................................. 481
Result codes for SCLF instructions .............................................................................. 482
Table of contents
Function Block Attributes
Structured Text
Result codes for SCMD instructions ........................................................................... 483
Result codes for SOVR instructions ............................................................................. 484
SASI instruction examples ............................................................................................. 485
SATT instruction examples ........................................................................................... 486
SCLF instruction examples ............................................................................................ 486
SCMD instruction examples ......................................................................................... 487
SDET instruction examples ........................................................................................... 487
SOVR instruction examples ........................................................................................... 488
When should I use an SOVR instruction instead of an SCMD instruction? ...... 489
Chapter 9
Programming
Choose the Function Block Elements.......................................................................... 492
Latching Data.................................................................................................................... 493
Function Block Responses to Overflow Conditions ................................................ 494
Order of Execution .......................................................................................................... 495
Timing Modes .................................................................................................................. 499
Program/Operator Control ........................................................................................... 502
Function Block States ...................................................................................................... 505
Chapter 10
Structured Text Syntax ................................................................................................... 508
Structured Text Components: Comments ................................................................ 509
Structured Text Components: Assignments .............................................................. 510
Specify a non-retentive assignment ....................................................................... 511
Assign an ASCII character to a string data member ......................................... 512
Structured Text Components: Expressions ................................................................ 513
Use arithmetic operators and functions .............................................................. 514
Use bitwise operators ............................................................................................... 516
Use logical operators ................................................................................................ 516
Use relational operators .......................................................................................... 517
Structured Text Components: Instructions ............................................................... 519
ured Text Components: Constructs ................................................................. 520
Struct
Character string literals ................................................................................................... 521
String Types ............................................................................................................... 522
CASE_OF ......................................................................................................................... 523
FOR_DO ........................................................................................................................... 525
IF_THEN .......................................................................................................................... 527
REPEAT_UNTIL ........................................................................................................... 530
WHILE_DO .................................................................................................................... 533
Structured Text Attributes............................................................................................. 535
12 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Common Attributes for
Index
Advanced Process Control and Drives Instructions
Table of contents
Chapter 11
Common Attributes ........................................................................................................ 537
Math Status Flags ............................................................................................................. 537
Immediate values .............................................................................................................. 540
Data Conversions ............................................................................................................. 541
Elementary data types ...................................................................................................... 545
LINT data types ............................................................................................................... 548
Floating Point Values ...................................................................................................... 548
Index Through Arrays ..................................................................................................... 551
Bit Addressing ................................................................................................................... 552
Function Block Faceplate Controls .............................................................................. 552
Faceplate Control Properties Dialog - General Tab ................................................. 553
Faceplate Control Properties Dialog - Display Tab .................................................. 554
Faceplate Control Properties Dialog - Font Tab ....................................................... 555
Faceplate Control Properties Dialog - LocaleTab ..................................................... 556
ASCII Character Codes .................................................................................................. 557
ASCII character codes ..................................................................................................... 557
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 13

Studio 5000 environment

Preface

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 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.
Logix 5000
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 15
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

Purpose of this manual

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.
View or download publications at http://www.rockwellautomation.com/literature
. To order paper copies of technical documentation, contact the local Rockwell Automation distributor or sales representative.
This manual provides a programmer with details about each available instruction
for a Logix-based controller. This manual also gives you guidance and examples to use equipment phase instructions to transition to different state, handle faults, set up break points, and so forth.
Copyright Notice
Copyright © 2019 Rockwell Automation Technologies, Inc. All Rights Reserved. Printed in USA.
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.
16 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
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.
Open source licenses
The software included in this product contains copyrighted software that is licensed under one or more open source licenses. Copies of those licenses are included with the software. Corresponding Source code for open source packages included in this product are located at their respective web site(s).
Alternately, obtain complete Corresponding Source code by contacting Rockwell Automation via the Contact form on the Rockwell Automation website:
http://www.rockwellautomation.com/global/about-
Preface
us/contact/contact.page
Please include "Open Source" as part of the request text.
A full list of all open source software used in this product and their corresponding licenses can be found in the OPENSOURCE folder
included with the Release Notes. The default installed location of these licenses is C:\Program Files (x86)\Common Files\Rockwell\Help\
<Product>\ReleaseNotes\OPENSOURCE\index.htm.
Trademark Notices
Allen-Bradley, ControlBus, ControlFLASH, Compact GuardLogix, Compact I/O, ControlLogix, CompactLogix, DCM, DH+, Data Highway Plus, DriveLogix, DPI, DriveTools, Explorer, FactoryTalk, FactoryTalk Administration Console, FactoryTalk Alarms and Events, FactoryTalk Batch, FactoryTalk Directory, FactoryTalk Security, FactoryTalk Services Platform, FactoryTalk View, FactoryTalk View SE, FLEX Ex, FlexLogix, FLEX I/O, Guard I/O, High 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, CmStick, CodeMeter, CodeMeter Control Center, and WIBU are trademarks of WIBU-SYSTEMS AG in the United States and/or other countries.
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,
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 17
Preface
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.
Environmental Compliance
Rockwell Automation maintains current product environmental information on its website at
http://www.rockwellautomation.com/rockwellautomation/about-
us/sustainability-ethics/product-environmental-compliance.page
Contact Rockwell
Customer Support Telephone — 1.440.646.3434
Online Support — http://www.rockwellautomation.com/support/
18 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Process
Process Control
The Process Control instructions include these instructions:
Chapter 1
Instructions
Available Instructions
Ladder Diagram
Not available
Function Block and Structured Text
ALM SCL PIDE RMPS POSP SRTP LDLG FGEN
TOT DEDT D2SD D3SD IMC CC MMC
If you want to Use this instruction
Provide alarming for any analog signal. ALM
Control discrete devices, such as solenoid valves, pumps, and motors, that have only two possible states (e.g., on/off, open/closed, etc.).
D2SD
Control discrete devices, such as high/low/off feeders that have three possible states (e.g., fast/slow/off, forward/stop/reverse, etc.).
Perform a delay of a single input. You select the amount of deadtime delay.
Convert an input based on a piece-wise linear function. FGEN
Provide a phase lead-lag compensation for an input signal. LDLG
Regulate an analog output to maintain a process variable at a certain setpoint, using a PID algorithm.
Raise/lower or open/close a device, such as a motor-operated valve, by pulsing open or close contacts.
Provide for alternating ramp and soak periods to follow a temperature profile.
Convert an unscaled input value to a floating point value in engineering units.
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 19
D3SD
DEDT
PIDE
POSP
RMPS
SCL
Chapter 1
Process Control Instructions
Take the 0-100% output of a PID loop and drive heating and cooling

Alarm (ALM)

digital output contacts with a periodic pulse.
SRTP
Provide a time-scaled accumulation of an analog input value, such as a volumetric flow.
Control a single process variable by maintaining a single controller output. IMC
Control a single process variable by manipulating as many as three different control variables.
Control two process variables to their setpoints using up to three control variables.
TOT
CC
MMC
See also
Filter Instructions on page 319
Logical and Move Instructions on page 401
Drives Instructions on page 263
Select/Limit Instructions on page 349
Statistical Instructions on page 381
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.
The ALM instruction provides alarming for any analog signal.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram logic.
20 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Process Control Instructions
Chapter 1
Function Block
Structured Text
ALM(ALM_tag)
Operands
Function Block
Operand Type Format Description
ALM tag ALARM structure ALM structure
Structured Text
Operand Type Format Description
ALM tag ALARM structure ALM structure
See Structured Text Syntax for more information on the syntax of expressions within structured text.
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 21
Chapter 1
Process Control Instructions
ROC negative alarming. If invalid, the instruction assumes a value of
ALARM Structure
Input Parameter Data Type Description
EnableIn BOOL Enable input. If false, the instruction does not execute and outputs
are not updated. Default is true.
In REAL The analog signal input.
Valid = any float Default = 0.0
HHLimit REAL The high-high alarm limit for the input.
Valid = any real value Default = maximum positive value
HLimit REAL The high alarm limit for the input.
Valid = any real value Default = maximum positive value
LLimit REAL The low alarm limit for the input.
Valid = any real value Default = maximum negative value
LLLimit REAL The low-low alarm limit for the input.
Valid = any real value Default = maximum negative value
Deadband REAL The alarm deadband for the high-high to low-low limits
Valid = any real value 0.0 Default = 0.0
ROCPosLimit REAL The rate-of-change alarm limit in units per second for a positive
(increasing) change in the input. Set ROCPosLimit = 0 to disable ROC positive alarming. If invalid, the instruction assumes a value of
0.0 and sets the appropriate bit in Status. Valid = any real value 0.0 Default = 0.0
ROCNegLimit REAL The rate-of-change alarm limit in units per second for a negative
(decreasing) change in the input. Set ROCNegLimit = 0 to disable
ROCPeriod REAL Time period in seconds for calculation (sampling interval) of the
22 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
0.0 and sets the appropriate bit in Status. Valid = any real value 0.0 Default = 0.0
rate of change value. Each time the sampling interval expires, a new sample of In is stored, and ROC is re-calculated. Instead of an enable bit like other conditions in the analog alarm, the rate-of­change detection is enabled by putting any non-zero value in the ROCPeriod.
Valid = 0.0 to 32767.0 Default = 0.0.
Process Control Instructions
Chapter 1
Output Parameter Data Type Description
EnableOut BOOL Indicates if instruction is enabled. Cleared to false if ROC
overflows.
HHAlarm BOOL The high-high alarm indicator.
Default = false
HAlarm BOOL The high alarm indicator.
Default = false
LAlarm BOOL The low alarm indicator.
Default = false
LLAlarm BOOL The low-low alarm indicator.
Default = false
ROCPosAlarm BOOL The rate-of-change positive alarm indicator.
Default = false
ROCNegAlarm BOOL The rate-of-change negative alarm indicator.
Default = false
ROC REAL The rate-of-change output.
Status DINT Status of the function block.
InstructFault (Status.0) BOOL The instruction detected one of the following execution errors.
This is not a minor or major controller error. Check the remaining status bits to determine what occurred.
DeadbandInv (Status.1) BOOL Invalid Deadband value.
ROCPosLimitInv (Status.2) BOOL Invalid ROCPosLimit value.
ROCNegLimitInv (Status.3) BOOL Invalid ROCNegLimit value.
ROCPeriodInv (Status.4) BOOL Invalid ROCPeriod value.
Description
The ALM instruction provides alarm indicators for high-high, high, low, low-low, rate-of-change positive, and rate-of-change negative. An alarm deadband is available for the high-high to low-low alarms. A user-defined period for performing rate-of-change alarming is also available.
High-high to Low-low Alarm
The high-high and low-low alarm algorithms compare the input to the alarm limit and the alarm limit plus or minus the deadband.
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 23
Chapter 1
Process Control Instructions
Rate-of-change Alarm
The rate-of-change (ROC) alarm compares the change of the input over the ROCPeriod to the rate-of-change limits. The ROCPeriod provides a type of deadband for the rate-of-change alarm. For example, define an ROC alarm limit of
O
F/second with a period of execution of 100 ms. If you use an analog input
2 module with a resolution of 1
O
F, every time the input value changes, an ROC alarm is generated because the instruction calculates an effective rate of 10°F/second. However, enter an ROCPeriod of 1 sec and the instruction only
O
generates an alarm if the rate truly exceeds the 2
F/second limit.
The ROC alarm calculates the rate-of-change as:
The instruction performs this calculation when the ROCPeriod expires. Once the instruction calculates the ROC, it determines alarms as:
Monitoring the ALM Instruction
There is an operator faceplate available for the ALM instruction.
Affects Math Status Flags
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for operand-related faults.
24 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Process Control Instructions
Chapter 1
Execution
Function Block
Condition/State Action Taken
Prescan Rung-condition-in bits are cleared to false.
Rung-condition-in is false Rung-condition-in bits are cleared to false.
Rung-condition-in is true Rung-condition-in bits are set to true.
The instruction executes.
Postscan Rung-condition-in bits are cleared to false.
Structured Text
Condition/State Action Taken
Prescan See Prescan in the Function Block table.
Normal Execution See Rung-condition-in is true in the Function Block table.
Postscan See Postscan in the Function Block table.
Example
The ALM instruction is typically used either with analog input modules (such as 1771 I/O modules) that do not support on-board alarming, or to generate alarms on a calculated variable. In this example, an analog input from a 1771-IFE module is first scaled to engineering units using the SCL instruction. The Out of the SCL instruction is an input to the ALM instruction to determine whether to set an alarm. The resulting alarm output parameters could then be used in your program and/or viewed on an operator interface display.
Function Block
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 25
Structured Text
SCL_01.IN := Input0From1771IFE;
Chapter 1
Process Control Instructions
SCL(SCL_01);
Discrete 3-State Device
ALM_01.IN := SCL_01.Out;
ALM(ALM_01);
See also
(D3SD)
Common Attributes on page 537
Structured Text Syntax on page 508
Function Block Faceplate Controls on page 552
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.
The D3SD instruction controls a discrete device having three possible states, such as fast/slow/off or forward/stop/reverse.
Available Languages
Ladder Diagram
This instruction is not available in ladder diagram logic.
26 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Process Control Instructions
Chapter 1
Function Block
Structured Text
D3SD(D3SD_tag)
Operands
Structured Text
Operand Type Format Description
D3SD tag DISCRETE_3STATE structure D3SD structure
See Structured Text Syntax for more information on the syntax of expressions within structured text.
Function Block
Operand Type Format Description
D3SD tag DISCRETE_3STATE structure D3SD structure
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 27
Chapter 1
Process Control Instructions
DISCRETE_3STATE Structure
Input Parameter Data
Type
EnableIn BOOL Enable input. If false, the instruction does not execute and outputs are not
Prog0Command BOOL Program state 0 command. This input determines the device state when the
Prog1Command BOOL Program state 1 command. This input determines the device state when the
Prog2Command BOOL Program state 2 command. This input determines the device state when the
Oper0Req BOOL Operator state 0 request. Set to true by the operator interface to place the device
Oper1Req BOOL Operator state 1 request. Set true by the operator interface to place the device into
Oper2Req BOOL Operator state 2 request. Set to true by the operator interface to place the device
State0Perm BOOL State 0 permissive. Unless in Hand or Override mode, this input must be true for
State1Perm BOOL State 1 permissive. Unless in Hand or Override mode, this input must be true for
State2Perm BOOL State 2 permissive. Unless in Hand or Override mode, this input must be true for
FB0 BOOL The first feedback input available to the instruction.
FB1 BOOL The second feedback input available to the instruction.
FB2 BOOL The third feedback input available to the instruction.
FB3 BOOL The fourth feedback input available to the instruction.
HandFB0 BOOL Hand feedback state 0. This input from a field hand/off/auto station shows the
Description
updated. Default is true.
device is in Program control. If true, the device is commanded to the 0 state. Default is false.
device is in Program control. If true, the device is commanded to the 1 state. Default is false.
device is in Program control. If true, the device is commanded to the 2 state. Default is false.
into the 0 state when the device is in Operator control. Default is false.
the 1 state when the device is in Operator control. Default is false.
into the 2 state when the device is in Operator control. Default is false.
the device to enter the 0 state. This input has no effect if the device is already in the 0 state. Default is true.
the device to enter the 1 state. This input has no effect if the device is already in the 1 state. Default is true.
the device to enter the 2 state. This input has no effect if the device is already in the 2 state. Default is true.
Default is false.
Default is false.
Default is false.
Default is false.
requested state of the field device. True indicates the field device is being requested to enter the 0 state; false indicates the field device is being requested to enter some other state. Default is false.
28 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Process Control Instructions
Chapter 1
Input Parameter Data
Type
HandFB1 BOOL Hand feedback state 1. This input from a field hand/off/auto station shows the
HandFB2 BOOL Hand feedback state 2. This input from a field hand/off/auto station shows the
FaultTime REAL Fault time value. Configure the value in seconds of the time to allow the device to
FaultAlarmLatch BOOL Fault alarm latch input. When true and FaultAlarm is true, latch FaultAlarm. To
FaultAlmUnLatch BOOL Fault alarm unlatch input. Set this input to true when FaultAlarmLatch is set to
OverrideOnInit BOOL Override on initialization request. If this bit is true, then during instruction first
OverrideOnFault BOOL Override on fault request. Set this value to true if the device should go to Override
Out0State0 BOOL Output 0 state 0 input. This value determines the value of Output0 when the
Out0State1 BOOL Output 0 state 1 input. This value determines the value of Output0 when the
Out0State2 BOOL Output 0 state 2 input. This value determines the value of Output0 when the
Out1State0 BOOL Output 1 state 0 input. This value determines the value of Output1 when the
Out1State1 BOOL Output 1 state 1 input. This value determines the value of Output1 when the
Out1State2 BOOL Output 1 state 2 input. This value determines the value of Output1 when the
Description
requested state of the field device. True indicates the field device is being requested to enter the 1 state; false indicates the field device is being requested to enter some other state. Default is false.
requested state of the field device. True indicates the field device is being requested to enter the 2 state; false indicates the field device is being requested to enter some other state. Default is false.
reach a newly commanded state. Set FaultTime = 0 to disable the fault timer. If this value is invalid, the instruction assumes a value of zero and sets the appropriate bit in Status. Valid = any float 0.0 Default = 0.0
unlatch FaultAlarm, set FaultAlmUnlatch to true or clear FaultAlarmLatch to false. Default is false.
unlatch FaultAlarm. The instruction clears this input to false. Default is false.
scan, the instruction is placed in Operator control with Override true and Hand false. If ProgHandReq is true, then Override is cleared to false and Hand is set to true. Default is false.
mode and enter the Override State on a fault alarm. After the fault alarm is removed, the instruction is placed in Operator control. Default is false.
device is in the 0 state. Default is false.
device is in the 1 state. Default is false.
device is in the 2 state. Default is false.
device is in the 0 state. Default is false.
device is in the 1 state. Default is false.
device is in the 2 state. Default is false.
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 29
Chapter 1
Process Control Instructions
Input Parameter Data
Type
Out2State0 BOOL Output 2 state 0 input. This value determines the value of Output2 when the
Out2State1 BOOL Output 2 state 1 input. This value determines the value of Output2 when the
Out2State2 BOOL Output 2 state 2 input. This value determines the value of Output2 when the
OverrideState DINT Override state input. Set this input to indicate the state of the device when in
FB0State0 BOOL Feedback 0 state 0 input. This value determines the expected value of FB0 when
FB0State1 BOOL Feedback 0 state 1 input. This value determines the expected value of FB0 when
FB0State2 BOOL Feedback 0 state 2 input. This value determines the expected value of FB0 when
FB1State0 BOOL Feedback 1 state 0 input. This value determines the expected value of FB1 when
FB1State1 BOOL Feedback 1 state 1 input. This value determines the expected value of FB1 when
FB1State2 BOOL Feedback 1 state 2 input. This value determines the expected value of FB1 when
FB2State0 BOOL Feedback 2 state 0 input. This value determines the expected value of FB2 when
FB2State1 BOOL Feedback 2 state 1 input. This value determines the expected value of FB2 when
FB2State2 BOOL Feedback 2 state 2 input. This value determines the expected value of FB2 when
FB3State0 BOOL Feedback 3 state 0 input. This value determines the expected value of FB3 when
FB3State1 BOOL Feedback 3 state 1 input. This value determines the expected value of FB3 when
Description
device is in the 0 state. Default is false.
device is in the 1 state. Default is false.
device is in the 2 state. Default is false.
Override mode. 2 = Device should go to the 2 state 1 = Device should go to the 1 state 0 = Device should go to the 0 state An invalid value sets the appropriate bit in Status.
Valid = 0 to 2 Default = 0
the device is in the 0 state. Default is false.
the device is in the 1 state. Default is false.
the device is in the 2 state. Default is false.
the device is in the 0 state. Default is false.
the device is in the 1 state. Default is false.
the device is in the 2 state. Default is false.
the device is in the 0 state. Default is false.
the device is in the 1 state. Default is false.
the device is in the 2 state. Default is false.
the device is in the 0 state. Default is false.
the device is in the 1 state. Default is false.
30 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Loading...
+ 531 hidden pages