Aaa2 PDF
Aaa2 PDF
Aaa2 PDF
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: 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 respective companies.
Summary of changes
This manual includes new and updated information. Use these reference tables to
locate changed information.
Global changes
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.
The controllers that support Equipment Phase instructions
Equipment Phase Instructions on page 415 expanded to include the CompactLogix 5370 and
CompactLogix 5380, ControlLogix 5570 and ControlLogix
5580, and Compact GuardLogix 5370 and Compact
GuardLogix 5380 controllers.
Use this locator to find the applicable Logix5000 controllers instruction manual
for each instruction.
Logix5000 Controllers General Instructions Logix5000 Controllers Advanced Process Logix5000 Controllers Motion Instructions
Reference Manual 1756-RM003 Control and Drives and Equipment Phase Reference Manual MOTION-RM002
and Sequence Instructions Reference
Manual 1756-RM006
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)
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 Motion Calculate Transform Position (MCTP)
(SASI)
Bitwise (OR) Equipment Sequence Clear Failure (SCLF) Motion Calculate Transform Position with
Orientation (MCTPO)
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)
Logix5000 Controllers General Instructions Logix5000 Controllers Advanced Process Logix5000 Controllers Motion Instructions
Reference Manual 1756-RM003 Control and Drives and Equipment Phase Reference Manual MOTION-RM002
and Sequence Instructions Reference
Manual 1756-RM006
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 General Instructions Logix5000 Controllers Advanced Process Logix5000 Controllers Motion Instructions
Reference Manual 1756-RM003 Control and Drives and Equipment Phase Reference Manual MOTION-RM002
and Sequence Instructions Reference
Manual 1756-RM006
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 General Instructions Logix5000 Controllers Advanced Process Logix5000 Controllers Motion Instructions
Reference Manual 1756-RM003 Control and Drives and Equipment Phase Reference Manual MOTION-RM002
and Sequence Instructions Reference
Manual 1756-RM006
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)
Chapter 1
Chapter 2
Chapter 3
Chapter 4
Chapter 5
Chapter 6
Chapter 7
Chapter 8
Chapter 9
Chapter 10
Chapter 11
This manual provides a programmer with details about the available General,
Motion, Process, and Drives instruction set for a Logix-based controller.
This manual is one of a set of related manuals that show common procedures for
programming and operating Logix 5000 controllers.
For a complete list of common procedures manuals, refer to the Logix 5000
Controllers Common Procedures Programming Manual, publication 1756-
PM001 .
The term Logix 5000 controller refers to any controller based on the Logix 5000
operating system.
Studio 5000 environment 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.
Additional resources These documents contain additional information concerning related Rockwell
Automation products.
Resource Description
Industrial Automation Wiring and Grounding Guidelines , Provides general guidelines for installing a Rockwell
publication 1770-4.1 Automation industrial system.
Product Certifications webpage, available Provides declarations of conformity, certificates, and other
at http://ab.rockwellautomation.com certification details.
Purpose of this manual 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.
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.
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
Other Trademarks
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.
Environmental Compliance
Contact Rockwell
Process
Ladder Diagram
Not available
Control discrete devices, such as high/low/off feeders that have three D3SD
possible states (e.g., fast/slow/off, forward/stop/reverse, etc.).
Perform a delay of a single input. You select the amount of deadtime DEDT
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 PIDE
setpoint, using a PID algorithm.
Raise/lower or open/close a device, such as a motor-operated valve, by POSP
pulsing open or close contacts.
Provide for alternating ramp and soak periods to follow a temperature RMPS
profile.
Convert an unscaled input value to a floating point value in engineering SCL
units.
Take the 0-100% output of a PID loop and drive heating and cooling SRTP
digital output contacts with a periodic pulse.
See also
Available Languages
Ladder Diagram
Function Block
Structured Text
ALM(ALM_tag)
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
ALARM Structure
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.
The high-high and low-low alarm algorithms compare the input to the alarm limit
and the alarm limit plus or minus the deadband.
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
2OF/second with a period of execution of 100 ms. If you use an analog input
module with a resolution of 1OF, 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
generates an alarm if the rate truly exceeds the 2OF/second limit.
The instruction performs this calculation when the ROCPeriod expires. Once the
instruction calculates the ROC, it determines alarms as:
No
Major/Minor Faults
Execution
Function Block
Structured Text
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
Structured Text
SCL_01.IN := Input0From1771IFE;
SCL(SCL_01);
ALM_01.IN := SCL_01.Out;
ALM(ALM_01);
See also
Discrete 3-State Device This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
(D3SD) 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
Function Block
Structured Text
D3SD(D3SD_tag)
Operands
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Function Block
DISCRETE_3STATE Structure
HandCommandInv (Status.5) BOOL Multiple hand feedback state request bits are
set at the same time.
Description
The D3SD instruction controls a discrete device having three possible states, such
as fast/slow/off or forward/stop/reverse. Typical discrete devices of this nature
include feeder systems, and reversible motors.
No
Major/Minor Faults
Execution
Function Block
Structured Text
In Structured Text, EnableIn is always true during normal scan. Therefore, if the
instruction is in the control path activated by the logic it will execute.
Examples
Function Block
Structured Text
OilFeedController.Prog0Command := ClosedOilFeed;
OilFeedController.Prog1Command := SlowOilFeed;
OilFeedController.Prog1Command := FastOilFeed;
OilFeedController.FB0 := SmallOilValveClosed;
OilFeedController.FB1 := SmallOilValveOpened;
OilFeedController.FB2 := LargeOilValveClosed;
OilFeedController.FB3 := LargeOilValveOpened;
D3SD(OilFeedController);
SmallOilValve := OilFeedController.Out0;
LargeOilValve := OilFeedController.Out1;
The following diagram shows how the D3SD instruction changes between
Program control and Operator control.
The following table shows how the D3SD instruction operates when in Program
control.
The following table shows how the D3SD instruction operates when in Operator
control.
State1
Oper0Req Oper1Req Oper2Req State0 Perm Perm State2 Perm Description
false false true either either true Command0Status is cleared to false
Command1Status is cleared to false
Command2Status is set to true
false true false either true either Command0Status is cleared to false
Command1Status is set to true
Command2Status is cleared to false
true false false true either either Command0Status is set to true
Command1Status is cleared to false
Command2Status is cleared to false
The following table describes how the D3SD instruction determines whether to
operate in Hand or Override mode.
When Override is set, it takes precedence over Program and Operator control.
The following table describes how the Override mode affects the commanded
state.
If OverrideState is invalid, the instruction sets the appropriate bit in Status and
does not enter the override state.
When Hand is true, it takes precedence over Program and Operator control. The
following table describes how the Hand mode affects the commanded state.
If more than one HandFB input is true, the instruction sets the appropriate bit in
Status and, if Hand is true, the instruction holds the previous state.
Output State
The D3SD output state is based on the state of the command status.
The mode alarm reminds an operator that a device has been left in Operator
control. The mode alarm only turns on when, in Operator control mode, the
program tries to change the state of the device from the operator’s commanded
state. The alarm does not turn on if an operator places a device in Operator
control mode and changes the state. The D3SD instruction checks for mode alarm
conditions, using these rules.
ModeAlarm is When
true Prog2Command Prog2Commandn-1 and
Prog2Command Command2Status or
Prog1Command Prog1Commandn-1 and
Prog1Command Command1Status or
Prog0Command Prog1Commandn-1 and
Prog0Command Command0Status
false Prog2Command = Command2Status and
Prog1Command = Command1Status and
Prog0Command = Command0Status or
The device is in Override, Hand, or Program control mode
See also
Discrete 2-State Device This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
(D2SD) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The D2SD instruction controls a discrete device which has only two possible
states (such as on/off or open/closed).
Available Languages
Ladder Diagram
Function Block
Structured Text
D2SD(D2SD_tag)
Operands
There are data conversion rules for mixed data types within an instruction. See
Data Conversion.
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Function Block
DISCRETE_2STATE Structure
FaultTime REAL Fault time value. Configure the value in seconds of the
time to allow the device to 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
FaultAlarmLatch BOOL Fault alarm latch input. When true and FaultAlarm is true,
latch FaultAlarm. To unlatch FaultAlarm set
FaultAlmUnlatch to true or clear FaultAlarmLatch to false.
Default is false.
FaultAlmUnLatch BOOL Fault alarm unlatch input. Set FaultAlmUnLatch when
FaultAlarmLatch is set to unlatch FaultAlarm. The
instruction clears this input to false.
Default is false.
OverrideOnInit BOOL Override on initialization request. If this bit is true, then
during instruction first scan, the 2-state device is placed in
Operator control, Override is set to true, and Hand is
cleared to false. If ProgHandReq is true, then Override is
cleared to false and Hand is set to true.
Default is false.
OverrideOnFault BOOL Override on fault request. Set OverrideOnFault to true if
the device should go to Override mode and enter the
OverrideState on a fault alarm. After the fault alarm is
removed, the 2-state device is placed in Operator control.
Default is false.
OutReverse BOOL Reverse default out state. The default state of Out is
cleared to false when commanded to state 0, and set to
true when commanded to state 1. When OutReverse is
true, Out is set to true when commanded to state 0, and
cleared to false when commanded to state 1.
Default is false.
OverrideState BOOL Override state input. Configure this value to specify the
state of the device when the device is in Override mode.
True indicates the device should go to the 1 state; false
indicates the device should go to the 0 state.
Default is false.
FB0State0 BOOL Feedback 0 state 0 input. Configure the state of the FB0
when the device is in the 0 state.
Default is false.
FB0State1 BOOL Feedback 0 state 1 input. Configure the state of the FB0
when the device is in the 1 state.
Default is false.
FB1State0 BOOL Feedback 1 state 0 input. Configure the state of the FB1
when the device is in the 0 state.
Default is false.
FB1State1 BOOL Feedback 1 state 1 input. Configure the state of the FB1
when the device is in the 1 state.
Default is false.
ProgProgReq BOOL Program program request. Set to true by the user
program to request Program control. Ignored if
ProgOperReq is true. Holding this true and ProgOperReq
false locks the instruction into Program control.
Default is false.
Hand BOOL Hand mode. True when the device is in the Hand mode.
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.
FaultTimeInv (Status.1) BOOL Invalid FaultTime value. The instruction sets FaultTime =
0.
OperReqInv (Status.2) BOOL Both operator state request bits are true.
Description
The D2SD instruction controls a discrete device which has only two possible
states (such as on/off or open/closed). Typical discrete devices of this nature
include motors, pumps, and solenoid valves.
No
Major/Minor Faults
Execution
Function Block
Structured Text
In Structured Text, EnableIn is always true during normal scan. Therefore, if the
instruction is in the control path activated by the logic it will execute.
Examples
Function Block
Structured Text
SyrupController.ProgCommand := AddSyrup;
SyrupController.FB0 := SyrupValveClosedLimitSwitch;
SyrupController.FB1 := SyrupValveOpenedLimitSwitch;
D2SD(SyrupController);
SyrupValve := SyrupController.Out;
The following diagram shows how the D2SD instruction changes between
Program control and Operator control.
The following diagram shows how the D2SD instruction operates when in
Program control.
The following diagram shows how the D2SD instruction operates when in
Operator control.
The following table describes how the D2SD instruction determines whether to
operate in Hand or Override mode.
FaultAlarm and
ProgHandReq ProgOverrideReq OverrideOnFault Description
true either either Hand mode
Hand is set to true
Override is cleared to false
false true either Override mode
Hand is cleared to false
Override is set to true
false either true Override mode
Hand is cleared to false
Override is set to true
Output State
The D2SD output state is based on the state of the command status.
The mode alarm reminds an operator that a device has been left in Operator
control. The mode alarm only turns on when, in Operator control mode, the
program tries to change the state of the device from the operator’s commanded
state. The alarm does not turn on if an operator places a device in Operator
control mode and changes the state. The D2SD instruction checks for mode alarm
conditions, using these rules.
ModeAlarm When
True ProgCommand n ProgCommandn-1 and
ProgCommand n CommandStatus
False ProgCommand = CommandStatus or
the device is in Override, Hand, or Program control mode
See also
Deadtime (DEDT) 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 DEDT instruction performs a delay of a single input. You select the amount
of deadtime delay.
Available Languages
Ladder Diagram
Function Block
Structured Text
DEDT(DEDT_tag,storage);
Operands
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Function Block
DEADTIME Structure
Description
The DEDT instruction uses a data buffer to store delayed data, thereby allowing
any length deadtime desired. The DEDT instruction is designed to execute in a
task where the scan rate remains constant.
To use the DEDT instruction, create a storage array to store the deadtime buffer
to hold the samples of (In x Gain) + Bias. The storage array should be large enough
to hold the largest desired deadtime, using this formula:
During runtime, the instruction checks for a valid Deadtime. Deadtime must be
between 0.0 and (StorageArray Size x DeltaT).
If the Deadtime is invalid, the instruction sets an appropriate Status bit and sets
Out = (In x Gain) + Bias.
The deadtime buffer functions as a first-in, first-out buffer. Every time the
deadtime algorithm executes, the oldest value in the deadtime buffer is moved into
Out. The remaining values in the buffer shift downward and the value ((In x
Gain) + Bias) is moved to the beginning of the deadtime buffer. A new value that
is placed in the deadtime buffer appears in the Out after Deadtime seconds.
Runtime changes to either Deadtime or DeltaT change the point in which values
are moved out of the buffer. The number of elements required to perform the
programmed delay can either increase or decrease. Prior to servicing the deadtime
buffer, the following updates occur:
If the number of required elements needs to increase, the new buffer elements are
populated with the oldest value in the current deadtime buffer.
If the number of required elements needs to decrease, the oldest elements of the
current deadtime buffer are discarded.
When InFault is true (bad), the instruction suspends execution, holds the last
output, and sets the appropriate bit in Status.
When InFault transitions from true to false, the instruction sets all values in the
deadtime buffer equal to In x Gain + Bias.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Function Block
See also
Function Generator (FGEN) 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.
Available Languages
Ladder Diagram
Function Block
Structured Text
FGEN(FGEN_tag,X1,Y1,X2,Y2);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
FUNCTION_GENERATOR Structure
Description
The following illustration shows how the FGEN instruction converts a twelve-
segment curve.
where XY<n>Size > 1 and is a number of points in the piece-wise linear curve and
where n is 1 or 2 for the table selected. You must create sorted X-axis elements in
the X arrays.
The Select input determines which table to use for the instruction. When the
instruction is executing on one table, you can modify the values in the other table.
Change the state of Select to execute with the other table.
Before calculating Out, the X axis parameters are scanned. If they are not sorted in
ascending order, the appropriate bit in Status is set and Out remains unchanged.
Also, if XY1Size or XY2Size is invalid, the instruction sets the appropriate bit in
Status and leaves Out unchanged.
No
Major/Minor Fault
Execution
Function Block
Structured Text
Examples
Example 1
In this example, the FGEN instruction characterizes a flow signal which is then
totalized using a TOT instruction. The FGEN_01X1 and FGEN_01Y1 arrays are
REAL arrays of 10 elements each to support up to a 9 segment curve. You can use
arrays of any size to support a curve of any desired number of segments.
Example 2
See also
Lead-Lag (LDLG) 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 LDLG instruction provides a phase lead-lag compensation for an input signal.
This instruction is typically used for feedforward PID control or for process
simulations.
Available Languages
Ladder Diagram
Function Block
Structured Text
LDLG(LDLG_tag);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
LEAD_LAG Structure
Description
The LDLG instruction supports one lead and lag in series. The instruction also
allows configurable gain and bias factors. The LDLG instruction is designed to
execute in a task where the scan rate remains constant.
Parameter Limitations
Lead LowLimit = 0.0
HighLimit = maximum positive float
Lag LowLimit = DeltaT/2 (DeltaT is in seconds)
HighLimit = maximum positive float
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value and sets the Math overflow status flag.
When the value computed for the output becomes valid, the instruction initializes
the internal parameters and sets Out = (In x Gain) + Bias.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Function Block
Structured Text
DEDT_01.In := SimulatedLoop.CVEU;
DEDT(DEDT_01,DEDT_01_array);
LDLG_01.In := DEDT_01.Out;
LDLG(LDLG_01);
SimulatedLoop.PV := LDLG_01.Out;
PIDE(SimulatedLoop);
See also
Enhanced PID (PIDE) 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 PIDE instruction provides enhanced capabilities over the standard PID
instruction. The instruction uses the velocity form of the PID algorithm. The gain
terms are applied to the change in the value of error or PV, not the value of error
or PV.
Available Languages
Ladder Diagram
Function Block
Structured Text
PIDE(PIDE_tag);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
PIDE Structure
SPOper REAL SP operator value, scaled in PV units. SP is set to this value when in Operator control
and not Cascade/Ratio mode. If the value of SPOper < SPLLimit or > SPHLimit, the
instruction sets the appropriate bit in Status and limits the value used for SP.
Valid = SPLLimit to SPHLimit
Default = 0.0
SPCascade REAL SP Cascade value, scaled in PV units. If CascadeRatio is true and UseRatio is false, then
SP = SPCascade. This is typically the CVEU of a primary loop. If CascadeRatio and
UseRatio are true, then SP = (SPCascade x Ratio). If the value of SPCascade < SPLLimit
or > SPHLimit, set the appropriate bit in Status and limit the value used for SP.
Valid = SPLLimit to SPHLimit
Default = 0.0
SPHLimit REAL SP high limit value, scaled in PV units. If SPHLimit > PVEUMax, the instruction sets the
appropriate bit in Status.
Valid = SPLLimit to PVEUMax
Default = 100.0
SPLLimit REAL SP low limit value, scaled in PV units. If SPLLimit < PVEUMin, the instruction sets the
appropriate bit in Status. If SPHLimit < SPLLimit, the instruction sets the appropriate
bit in Status and limits SP using the value of SPLLimit.
Valid = PVEUMin to SPHLimit
Default = 0.0
UseRatio BOOL Allow ratio control permissive. Set to true to enable ratio control when in Cascade/Ratio
mode.
Default is false.
RatioProg REAL Ratio program multiplier. Ratio and RatioOper are set equal to this value when in
Program control. If RatioProg < RatioLLimit or > RatioHLimit, the instruction sets the
appropriate bit in Status and limits the value used for Ratio.
Valid = RatioLLimit to RatioHLimit
Default = 1.0
RatioOper REAL Ratio operator multiplier. Ratio is set equal to this value when in Operator control. If
RatioOper < RatioLLimit or > RatioHLimit, the instruction sets the appropriate bit in
Status and limits the value used for Ratio.
Valid = RatioLLimit to RatioHLimit
Default = 1.0
RatioHLimit REAL Ratio high limit value. Limits the value of Ratio obtained from RatioProg or RatioOper. If
RatioHLimit < RatioLLimit, the instruction sets the appropriate bit in Status and limits
Ratio using the value of RatioLLimit.
Valid = RatioLLimit to maximum positive float
Default = 1.0
RatioLLimit REAL Ratio low limit value. Limits the value of Ratio obtained from RatioProg or RatioOper. If
RatioLLimit < 0, the instruction sets the appropriate bit in Status and limits the value to
zero. If RatioHLimit < RatioLLimit, the instruction sets the appropriate bit in Status and
limits Ratio using the value of RatioLLimit.
Valid = 0.0 to RatioHLimit
Default = 1.0
CVFault BOOL Control variable bad health indicator. If CVEU controls an analog output, then CVFault
normally comes from the analog output’s fault status. When true, CVFault indicates an
error on the output module and the instruction sets the appropriate bit in Status.
Default is false = "good health"
CVInitReq BOOL CV initialization request. This signal is normally controlled by the "In Hold" status on
the analog output module controlled by CVEU or from the InitPrimary output of a
secondary PID loop.
Default is false.
CVInitValue REAL CVEU initialization value, scaled in CVEU units. When CVInitializing is true, CVEU =
CVInitValue and CV equals the corresponding percentage value. CVInitValue comes
from the feedback of the analog output controlled by CVEU or from the setpoint of a
secondary loop. Instruction initialization is disabled when CVFaulted or CVEUSpanInv is
true.
Valid = any float
Default = 0.0
CVProg REAL CV program manual value. CV equals this value when in Program Manual mode. If
CVProg < 0 or > 100, or < CVLLimit or > CVHLimit when CVManLimiting is true, the
instruction sets the appropriate bit in Status and limits the CV value.
Valid = 0.0 to 100.0
Default = 0.0
CVOper REAL CV operator manual value. CV equals this value when in Operator Manual mode. If not
Operator Manual mode, the instruction sets CVOper = CV at the end of each instruction
execution. If CVOper < 0 or > 100, or < CVLLimit or > CVHLimit when CVManLimiting
is true, the instruction sets the appropriate bit in Status and limits the CV value.
Valid = 0.0 to 100.0
Default = 0.0
CVOverride REAL CV override value. CV equals this value when in override mode. This value should
correspond to a safe state output of the PID loop. If CVOverride < 0 or >100, the
instruction sets the appropriate bit in Status and limits the CV value.
Valid = 0.0 to 100.0
Default = 0.0
CVPrevious REAL CVn-1 value. If CVSetPrevious is set, CVn-1 equals this value. CVn-1 is the value of CV from
the previous execution. CVPrevious is ignored when in manual, override or hand mode
or when CVInitializing is set. If CVPrevious < 0 or > 100, or < CVLLimit or > CVHLimit
when in Auto or cascade/ratio mode, the instruction sets the appropriate bit in Status
and limits the CVn-1 value.
Valid = 0.0 to 100.0
Default = 0.0
CVSetPrevious BOOL Request to use CVPrevious. If true, CVn-1 = CVPrevious
Default is false.
CVManLimiting BOOL Limit CV in manual mode request. If Manual mode and CVManLimiting is true, CV is
limited by the CVHLimit and CVLLimit values.
Default is false.
CVEUMax REAL Maximum value for CVEU. The value of CVEU which corresponds to 100 percent CV. If
CVEUMax = CVEUMin, the instruction sets the appropriate bit in Status.
Valid = any float
Default = 100.0
CVEUMin REAL Minimum value of CVEU. The value of CVEU which corresponds to 0 percent CV. If
CVEUMax = CVEUMin, the instruction sets the appropriate bit in Status.
Valid = any float
Default = 0.0
CVHLimit REAL CV high limit value. This is used to set the CVHAlarm output. It is also used for limiting
CV when in Auto or Cascade/Ratio mode, or Manual mode if CVManLimiting is true. If
CVHLimit > 100 or < CVLLimit, the instruction sets the appropriate bit in Status. If
CVHLimit < CVLLimit, the instruction limits CV using the value of CVLLimit.
Valid = CVLLimit < CVHLimit 100.0
Default = 100.0
CVLLimit REAL CV low limit value. This is used to set the CVLAlarm output. It is also used for limiting CV
when in Auto or Cascade/Ratio mode, or Manual mode if CVManLimiting is true. If
CVLLimit < 0 or CVHLimit < CVLLimit, the instruction sets the appropriate bit in Status.
If CVHLimit < CVLLimit, the instruction limits CV using the value of CVLLimit.
Valid = 0.0 CVLLimit < CVHLimit
Default = 0.0
CVROCLimit REAL CV rate of change limit, in percent per second. Rate of change limiting is only used
when in Auto or Cascade/Ratio modes or Manual mode if CVManLimiting is true. Enter
0 to disable CV ROC limiting. If CVROCLimit < 0, the instruction sets the appropriate bit
in Status and disables CV ROC limiting.
Valid = 0.0 to maximum positive float
Default = 0.0
FF REAL Feed forward value. The value of feed forward is summed with CV after the zero-
crossing deadband limiting has been applied to CV. Therefore changes in FF are always
reflected in the final output value of CV. If FF < -100 or > 100, the instruction sets the
appropriate bit in Status and limits the value used for FF.
Valid = -100.0 to 100.0
Default = 0.0
FFPrevious REAL FFn-1 value. If FF SetPrevous is set, the instruction sets FFn-1 = FFPrevious. FFn-1 is the
valu eof FF from the previous execution. If FFPrevious < -100 or > 100, the instruction
sets the appropriate bit in Status and limits value used for FFn-1
Valid = -100.0 to 100.0
Default - 0.0
FFSetPrevious BOOL Request to use FFPrevious. If true, FFn-1 = FFPrevious.
Default is false.
HandFB REAL CV Hand feedback value. CV equals this value when in Hand mode and HandFBFault is
false (good health). This value typically comes from the output of a field mounted
hand/ auto station and is used to generate a bumpless transfer out of hand mode. If
HandFB < 0 or > 100, the instruction sets the appropriate bit in Status and limits the
value used for CV.
Valid = 0.0 to 100.0
Default = 0.0
HandFBFault BOOL HandFB value bad health indicator. If the HandFB value is read from an analog input,
then HandFBFault is typically controlled by the status of the analog input channel.
When true, HandFBFault indicates an error on the input module and the instruction sets
the appropriate bit in Status.
Default is false = "good health"
WindupHIn BOOL Windup high request. When true, the CV cannot integrate in a positive direction. The
signal is typically obtained from the WindupHOut output from a secondary loop.
Default is false.
WindupLIn BOOL Windup low request. When true, the CV cannot integrate in a negative direction. This
signal is typically obtained from the WindupLOut output from a secondary loop.
Default is false.
ControlAction BOOL Control action request. Set to true to calculate error as E = PV - SP; clear to false to
calculate error as E = SP - PV.
Default is false.
DependIndepend BOOL Dependent/independent control request. When true, use the dependent form of the
PID equation; when false, use the independent form of the equations.
Default is false.
PGain REAL Proportional gain. When the independent form of the PID algorithm is selected, enter
the unitless proportional gain into this value. When the dependent PID algorithm is
selected, enter the unitless controller gain into this value. Enter 0 to disable the
proportional control. If PGain < 0, the instruction sets the appropriate bit in Status and
uses a value of PGain = 0.
Valid = 0.0 to maximum positive float
Default = 0.0
IGain REAL Integral gain. When the independent form of the PID algorithm is selected, enter the
integral gain in units of 1/minutes into this value. When the dependent PID algorithm
is selected, enter the integral time constant in units of minutes/repeat into this value.
Enter 0 to disable the integral control. If IGain < 0, the instruction sets the appropriate
bit in Status and uses a value of IGain = 0.
Valid = 0.0 to maximum positive float
Default = 0.0
DGain REAL Derivative gain. When the independent form of the PID algorithm is selected, enter the
derivative gain in units of minutes into this value. When the dependent PID algorithm
is used, enter the derivative time constant in units of minutes into this value. Enter 0 to
disable the derivative control. If DGain < 0, the instruction sets the appropriate bit in
Status and uses a value of DGain = 0.
Valid = 0.0 to maximum positive float
Default = 0.0
PVEProportional BOOL Proportional PV control request. When true, calculate the proportional term
(DeltaPTerm) using the change in process variable (PVPercent). When false, use the
change in error (EPercent).
Default is false.
PVEDerivative BOOL Derivative PV control request. When true, calculate the derivative term (DeltaDTerm)
using the change in process variable (PVPercent). When false, use the change in error
(EPercent).
Default is true.
DSmoothing BOOL Derivative Smoothing request. When true, changes in the derivative term are
smoothed. Derivative smoothing causes less output "jitters" as a result of a noisy PV
signal but also limits the effectiveness of high derivative gains.
Default is false.
PVTracking BOOL SP track PV request. Set to true to cause SP to track PV when in manual mode. Ignored
when in Cascade/Ratio or Auto mode.
Default is false.
ZCDeadband REAL Zero crossing deadband range, scaled in PV units. Defines the zero crossing deadband
range. Enter 0 to disable the zero crossing deadband checking. If ZCDeadband < 0, the
instruction sets the appropriate bit in Status and disables zero crossing deadband
checking.
Valid = 0.0 to maximum positive float
Default = 0.0
ZCOff BOOL Zero crossing disable request. Set to true to disable zero crossing for the deadband
calculation.
Default is false.
PVHHLimit REAL PV high-high alarm limit value, scaled in PV units.
Valid = any float
Default = maximum positive float
PVHLimit REAL PV high alarm limit value, scaled in PV units.
Valid = any float
Default = maximum positive float
PVLLimit REAL PV low alarm limit value, scaled in PV units.
Valid = any float
Default = maximum negative float
PVLLLimit REAL PV low-low alarm limit value, scaled in PV units.
Valid = any float
Default = maximum negative float
PVDeadband REAL PV alarm limit deadband value, scaled in PV units. Deadband is the delta value
between the turn-on and turn-off value for each of the PV alarm limits. If PVDeadband
< 0.0, the instruction sets the appropriate bit in Status and limits PVDeadband to zero.
Valid = 0.0 to maximum positive float
Default = 0.0
PVROCPosLimit REAL PV positive rate of change alarm limit. The limit value for a positive (increasing) change
in PV, scaled in PV units per seconds. Enter 0.0 to disable positive PVROC alarm
checking. If PVROCPosLimit < 0.0, the instruction sets the appropriate bit in Status and
disables positive PVROC checking.
Valid = 0.0 to maximum positive float
Default = 0.0 PV/second
PVROCNegLimit REAL PV negative rate of change alarm limit. The limit value for a negative (decreasing)
change in PV, scaled in PV units per seconds. Enter 0.0 to disable negative PVROC alarm
checking. If PVROCNegLimit < 0, the instruction sets the appropriate bit in Status and
disables negative PVROC checking.
Valid = 0.0 to maximum positive float
Default = 0.0
PVROCPeriod REAL PV rate of change sample period. The time period, in seconds, over which the rate of
change for PV is evaluated. Enter 0 to disable PVROC alarm checking If PVROCPeriod <
0.0, the instruction sets the appropriate bit in Status, and disables positive and negative
PVROC checking.
Valid = any float 0.0
Default = 0.0 seconds
DevHHLimit REAL Deviation high-high alarm limit value, scaled in PV units. Deviation is the difference in
value between the process variable (PV) and the setpoint (SP). Deviation alarming
alerts the operator to a discrepancy between the process variable and the setpoint
value. If DevHHLimit < 0.0, the instruction sets the appropriate bits in Status and sets
DevHHLimit = 0.0.
Valid = 0.0 to maximum positive float
Default = maximum positive float
DevHLimit REAL Deviation high alarm limit value, scaled in PV units. Deviation is the difference in value
between the process variable (PV) and the setpoint (SP). Deviation alarming alerts the
operator to a discrepancy between the process variable and the setpoint value. If
DevHLimit < 0.0, the instruction sets the appropriate bit in Status and sets DevHLimit
= 0.0.
Valid = 0.0 to maximum positive float
Default = maximum positive float
DevLLimit REAL Deviation low alarm limit value, scaled in PV units. Deviation is the difference in value
between the process variable (PV) and the setpoint (SP). Deviation alarming alerts the
operator to a discrepancy between the process variable and the setpoint value. If
DevLLimit < 0.0, the instruction sets the appropriate bit in Status and sets DevLLimit =
0.0.
Valid = 0.0 to maximum positive float
Default = maximum positive float
DevLLLimit REAL Deviation low-low alarm limit value, scaled in PV units. Deviation is the difference in
value between the process variable (PV) and the setpoint (SP). Deviation alarming
alerts the operator to a discrepancy between the process variable and the setpoint
value. If DevLLLimit < 0.0, the instruction sets the appropriate bit in Status and sets
DevLLLimit = 0.0.
Valid = 0.0 to maximum positive float
Default = maximum positive float
DevDeadband REAL The deadband value for the Deviation alarm limits, scaled in PV units. Deadband is the
delta value between the turn-on and turn-off value for each of the Deviation alarm
limits. If DevDeadband < 0.0, the instruction sets the appropriate bit in Status and sets
DevDeadband = 0.0.
Valid = 0.0 to maximum positive float
Default = 0.0
AllowCasRat BOOL Allow cascade/ratio mode permissive. Set to true to allow Cascade/Ratio mode to be
selected using either ProgCasRatReq or OperCasRatReq.
Default is false.
ManualAfterInit BOOL Manual mode after initialization request. When true, the instruction is placed in Manual
mode when CVInitializing is true, unless the current mode is Override or Hand. When
ManualAfterInit is false, the instruction’s mode is not changed, unless requested to do
so.
Default is false.
ProgProgReq BOOL Program program request. Set to true by the user program to request Program control.
Ignored if ProgOperReq is true. Holding this true and ProgOperReq false locks the
instruction in Program control. When ProgValueReset is true, the instruction clears this
input to false at each execution.
Default is false.
ProgOperReq BOOL Program operator request. Set to true by the user program to request Operator control.
Holding this true locks the instruction in Operator control. When ProgValueReset is
true, the instruction clears this input to false at each execution.
Default is false.
ProgCasRatReq BOOL Program cascade/ratio mode request. Set to true by the user program to request
Cascade/Ratio mode. When ProgValueReset is true, the instruction clears this input to
false at each execution.
Default is false.
ProgAutoReq BOOL Program auto mode request. Set to true by the user program to request Auto mode.
When ProgValueReset is true, the instruction clears this input to false at each
execution.
Default is false.
ProgManualReq BOOL Program manual mode request. Set to true by the user program to request Manual
mode. When ProgValueReset is true, the instruction clears this input to false ateach
execution.
Default is false.
ProgOverrideReq BOOL Program override mode request. Set to true by the user program to request Override
mode. When ProgValueReset is true, the instruction clears this input to false at each
execution.
Default is false.
ProgHandReq BOOL Program hand mode request. Set to true by the user program to request Hand mode.
This value is usually read as a digital input from a hand/auto station. When
ProgValueReset is true, the instruction clears this input to false at each execution.
Default is false.
OperProgReq BOOL Operator program request. Set to true by the operator interface to request Program
control. The instruction clears this input to false at each execution.
Default is false.
OperOperReq BOOL Operator operator request. Set to true by the operator interface to request Operator
control. The instruction clears this input to false at each execution.
Default is false.
OperCasRatReq BOOL Operator cascade/ratio mode request. Set to true by the operator interface to request
Cascade/ Ratio mode. The instruction clears this input to false at each execution.
Default is false.
OperAutoReq BOOL Operator auto mode request. Set to true by the operator interface to request Auto
mode. The instruction clears this input to false at each execution.
Default is false.
OperManualReq BOOL Operator manual mode request. Set to true by the operator interface to request Manual
mode. The instruction clears this input to false at each execution.
Default is false.
ProgValueReset BOOL Reset program control values. When true, all the program request inputs are cleared to
false by the instruction at each execution. When true and in Operator control, the
instruction sets SPProgram = SP and CVProgram = CV.
Default is false.
CVROCAlarm BOOL CV rate of change alarm indicator. Set to true when the calculated rate of
change for CV exceeds CVROCLimit.
SP REAL Current setpoint value. The value of SP is used to control CV when in Auto or
Cascade/ Ratio mode.
SPPercent REAL The value of SP expressed in percent of span of PV.
SPPercent = ((SP - PVEUMin) x 100) / PVSpan
PV Span calculation: PVSpan = (PVEUMax - PVEUMin)
SPHAlarm BOOL SP high alarm indicator.
Set to true when the SP > SPHLimit.
SPLAlarm BOOL SP low alarm indicator.
Set to true when the SP < SPLLimit.
PVPercent REAL PV expressed in percent of span.
PVPercent = ((PV- PVEUMin) x 100) / PVSpan
PV Span calculation: PVSpan = (PVEUMax - PVEUMin)
E REAL Process error. Difference between SP and PV, scaled in PV units.
EPercent REAL The error expressed as a percent of span.
InitPrimary BOOL Initialize primary loop command. Set to true when not in Cascade/Ratio mode
or when CVInitializing is true. This signal is normally used by the CVInitReq
input of a primary PID loop.
WindupHOut BOOL Windup high indicator. Set to true when CV high or CV low limit (depending on
the control action) or SP high limit has been reached. This signal is typically
used by the WindupHIn input to prevent the windup of the CV output on a
primary loop.
WindupLOut BOOL Windup low indicator. Set to true when CV high or CV low limit (depending on
the control action) or SP low limit has been reached. This signal is typically used
by the WindupLIn input to prevent the windup of the CV output on a primary
loop.
Ratio REAL Current ratio multiplier.
RatioHAlarm BOOL Ratio high alarm indicator. Set to true when Ratio > RatioHLimit.
RatioLAlarm BOOL Ratio low alarm indicator. Set to true when Ratio < RatioLLimit.
ZCDeadbandOn BOOL Zero crossing deadband indicator. When true the value of CV does not change. If
ZCOff is true, then ZCDeadbandOn is set to true when | E | is within the
ZCDeadband range. If ZCOff is false, then ZCDeadbandOn is set to true when | E |
crosses zero and remains within the ZCDeadband range. ZCDeadbandOn is
cleared to false when | E | exceeds the deadband range or when ZCDeadband =
0.
PVHHAlarm BOOL PV high-high alarm indicator. Set to true when PV PVHHLimit. Cleared to
false when PV < (PVHHLimit - PVDeadband)
PVHAlarm BOOL PV high alarm indicator. Set to true when PV PVHLimit. Cleared to false
when PV < (PVHLimit - PVDeadband)
PVLAlarm BOOL PV low alarm indicator. Set to true when PV PVLLimit. Cleared to false
when PV > (PVLLimit + PVDeadband)
PVLLAlarm BOOL PV low-low alarm indicator. Set to true when PV PVLLLimit. Cleared to
false when PV > (PVLLLimit + PVDeadband)
PVROCPosAlarm BOOL PV positive rate-of-change alarm indicator. Set to true when calculated PV rate-
of-change PVROCPosLimit.
PVROCNegAlarm BOOL PV negative rate-of-change alarm indicator. Set to true when calculated PV
rate-of-change (PVROCNegLimit x -1).
DevHHAlarm BOOL Deviation high-high alarm indicator. Set to true when
PV (SP + DevHHLimit). Cleared to false when
PV < (SP + DevHHLimit - DevDeadband)
Description
The PID algorithm regulates the CV output in order to maintain the PV at the SP
when the instruction executes in Cascade/Ratio or Auto modes.
The following table describes how the instruction calculates the PID terms.
Computing CV
The PID control algorithm computes the value for CV by summing Delta PTerm,
Delta ITerm, Delta
DTerm, and CV from the previous execution of the instruction, for example CVn-
1. When CVsetPrevious is set,
CVn-1 is set equal to CVPrevious. This lets you preset CVn-1 to a specified value
before computing the value of CV.
PIDE Algorithms
The PIDE instruction uses a velocity form PID algorithm similar to that used in
most DCS systems. Some advantages to a velocity form algorithm include:
• Bumpless adaptive gain changes – You can change gains on the fly without
initializing the algorithm.
• Multi-loop control schemes – You can implement cross limiting between
loops by manipulating the CV n-1 term.
In this form of the algorithm, each term of the algorithm (proportional, integral,
and derivative) has a separate gain. Changing one gain only affects that term and
not any of the others, where:
This form of the algorithm changes the proportional gain into a controller gain.
By changing the controller gain, you change the action of all three terms
(proportional, integral, and derivative) at the same time, where:
The PIDE equations above are representative of the algorithms used by the PIDE
instruction. You can substitute the change in error values for the change in PV (in
percent of span) for the proportional and derivative terms by manipulating the
parameters PVEProportional and PVEDerivative. By default, the PIDE
instruction uses the change in error for the proportional term and the change in
PV for the derivative term. This eliminates large derivative spikes on changes in
setpoint.
You can convert the gains used between the different PIDE algorithm forms using
these equations:
Each algorithm provides identical control with the appropriate gains. Some people
prefer the independent gains style because they can manipulate individual gains
without affecting the other terms. Others prefer the dependent gains style because
they can, at least to a certain extent, change just the controller gain and cause an
overall change in the aggressiveness of the PID loop without changing each gain
separately.
The PIDE autotuner is installed with the application, but you need an activation
key to enable it. The autotuner is only supported in function block programming;
it is not available in ladder diagram or structured text programming.
Use the Autotune tab to specify and configure the autotune tag for a PIDE block.
No
Major/Minor Faults
Execution
Function Block
CVEu = CVInitValue
Structured Text
The CVInitValue normally comes from the analog output’s readback value. The
CVInitReq value normally comes from the "In Hold" status bit on the analog
output controlled by CVEU. The initialization procedure is performed to avoid a
bump at startup in the output signal being sent to the field device.
When using cascaded PID loops, the primary PID loop can be initialized when the
secondary loop is initialized or when the secondary loop leaves the Cascade/Ratio
mode. In this case, move the state of the InitPrimary output and SP output from
the secondary loop to the CVInitReq input and CVInitValue input on the
primary loop.
The instruction does not initialize and the CVEU and CV values are not updated
if CVFault or CVEUSpanInv is set.
Examples
Example 1
Optionally, you can wire the analog input’s fault indicator (if one is available) into
the PVFault parameter on the PIDE instruction. This forces the PIDE into
Manual mode when the analog input is faulted and stops the PIDE CVEU output
from winding up or down when the PV signal is not available.
Function Block
Structured Text
PIDE_01.PV := Local:1:I.Ch0Data;
PIDE_01.PVFault := Local:1:I.Ch0Fault;
PIDE(PIDE_01);
Local:2:)O.Ch0Data :=PIDE_01.CVEU;
Example 2
In this example, a cascaded loop provides better control by opening the steam valve
when the steam flow drops before the liquid temperature in the tank drops. To
implement a cascaded loop, use a PIDE instruction to control the steam valve
opening based on a process variable signal from a steam flow transmitter. This is
the secondary loop of the cascaded pair. A second PIDE instruction (called the
primary loop) uses the liquid temperature as a process variable and sends its CV
output into the setpoint of the secondary loop. In this manner, the primary
temperature loop asks for a certain amount of steam flow from the secondary
steam flow loop. The steam flow loop is then responsible for providing the amount
of steam requested by the temperature loop in order to maintain a constant liquid
temperature.
Function Block
Structured Text
PrimaryLoop.PV := Local:1:I.CH0Data;
PrimaryLoop.CVInitReq := SecondaryLoop.InitPrimary;
PrimaryLoop.CVInitValue := SecondaryLoop.SP;
PrimaryLoop.WindupHIn := SecondaryLoop.WindupHOut;
PrimaryLoop.WindupLIn := SecondaryLoop.WindupLOut;
PIDE(PrimaryLoop);
SecondaryLoop.PV := Local:1:I.Ch1Data;
SecondaryLoop.SPCascade := PrimaryLoop.CVEU;
PIDE(SecondaryLoop);
Local:2:O.Ch0Data:= SecondaryLoop.CVEU;
For a cascaded pair of loops to work correctly, the secondary loop must have a
faster process response than the primary loop. This is because the secondary loop’s
process must be able to compensate for any upsets before these upsets affect the
primary loop’s process. In this example, if steam flow drops, the steam flow must
be able to increase as a result of the secondary controller’s action before the liquid
temperature is affected.
The PIDE instruction supports several other features to more effectively support
cascade control. Wire the InitPrimary output on the secondary loop into the
CVInitReq input on the primary loop and wire the SP output of the secondary
into the CVInitValue input on the primary. This sets the CVEU value of the
primary loop equal to the SP of the secondary loop when the secondary loop leaves
Cascade/Ratio mode. This allows a bumpless transfer when you place the
secondary loop back into Cascade/Ratio mode. Also, wire the WindupHOut and
WindupLOut outputs on the secondary loop into the WindupHIn and
WindupLIn inputs on the primary loop. This causes the primary loop to stop
increasing or decreasing, as appropriate, its value of CVEU if the secondary loop
hits a SP limit or CV limit and eliminates any windup on the primary loop if these
conditions occur.
Example 3
Ratio control is typically used to add a fluid in a set proportion to another fluid.
For example, if you want to add two reactants (say A and B) to a tank in a constant
ratio, and the flow rate of reactant A may change over time because of some
upstream process upsets, you can use a ratio controller to automatically adjust the
rate of reactant B addition. In this example, reactant A is often called the
"uncontrolled" flow since it is not controlled by the PIDE instruction. Reactant B
is then called the "controlled" flow.
To perform ratio control with a PIDE instruction, set the AllowCasRat and
UseRatio input parameters. Wire the uncontrolled flow into the SPCascade input
parameter. When in Cascade/Ratio mode, the uncontrolled flow is multiplied by
either the RatioOper (when in Operator control) or the RatioProg (when in
Program control) and the resulting value is used by the PIDE instruction as the
setpoint.
Function Block
Structured Text
PIDE_01.PV := ControlledFlow;
PIDE_01.SPCascade := UncontrolledFlow;
PIDE(PIDE_01);
Local:2:O.Ch0Data := PIDE_01.CVEU;
The following diagram shows how the PIDE instruction changes between
Program control and Operator control.
(1) The instruction remains in Operator control mode when ProgOperReq is set.
Operating Modes
Hand While in Hand mode the PID algorithm does not compute the change in CV.
CV = HandFB, regardless of the control mode. Hand mode is typically used to indicate that control of the
final control element was taken over by a field hand/auto station.
Select Hand mode using ProgHandReq:
Set ProgHandReq to request hand mode. This value is usually read as a digital input from a hand/auto
station.
The Cascade/Ratio, Auto, and Manual modes can be controlled by a user program
when in Program control or by an operator interface when in Operator control.
The Override and Hand modes have a mode request input that can only be
controlled by a user program; these inputs operate in both Program and Operator
control.
Once the instruction determines program or operator control and the PID mode,
the instruction can obtain the proper SP value. You can select the cascade/ratio SP
or the current SP.
Cascade/Ratio SP
Current SP
The current SP is based on the Cascade/Ratio mode, the PVTracking value, auto
mode, and the ProgOper value.
SP High/Low Limiting
PV High/Low Alarming
(1) During instruction first scan, the instruction clears all the PV alarm outputs.
The instruction also clears the PV alarm outputs and disables the alarming
algorithm when PVFaulted is set.
PV Rate-of-Change Alarming
The ROC calculation is only performed when the PVROCPeriod has expired.
The rate-of-change is calculated as:
PVROCN-1 PVROCN-1 = PV
ElapsedROCPeriod ElapsedROCPeriod = 0
Once PVROC has been calculated, the PV ROC alarms are determined as follows:
(1) During instruction first scan, the instruction clears the PV ROC alarm
outputs. The instruction also clears the PVROC alarm outputs and disables the
PV ROC alarming algorithm when PVFaulted is set.
The instruction converts PV and SP to a percent and calculates the error before
performing the PID control algorithm. The error is the difference between the PV
and SP values. When ControlAction is set, the values of EPercent, E, and
PVPIDPercent are negated before being used by the PID algorithm.
(1) PVPIDPercent and Deviation are internal parameters used by the PID control
algorithm.
Deviation is the difference in value between the process variable (PV) and setpoint
(SP). Deviation alarming alerts the operator to a discrepancy between the process
variable and the setpoint value.
(1) During instruction first scan, the instruction clears the deviation alarm
outputs. The instruction also clears the deviation alarm outputs and disables the
alarming algorithm when PVFaulted or PVSpanInv is set.
You can limit CV such that its value does not change when error remains within
the range specified by ZCDeadband (| E | ≤ ZCDeadband).
When ZCOff is cleared, ZCDeadband > 0, error has crossed zero for the first
(1)
time, (i.e. En >= 0 and En-1 < 0 or when En <= 0 and En-1 > 0), and | En | <=
ZCDeadband, the instruction sets ZCDeadbandOn.
En.
The instruction disables the zero crossing algorithm and clears ZCDeadband
under these conditions:
Feedforward Control
Compute CV by summing CV from the zero crossing algorithm with ∆FF. The
value of ∆FF = FF – FFn-1. When FFSetPrevious is set, FFn-1=FFPrevious. This
lets you preset FFn-1 to a specified value before the instruction calculates the value
of ∆FF.
Once the PID algorithm has been executed, select the CV based on program or
operator control and the current PID mode.
CV Windup Limiting
Limit the CV such that its value cannot increase when WindupHIn is set or
decrease when WindupLIn is set. These inputs are typically the WindupHOut or
WindupLOut outputs from a secondary loop. The WindupHIn and WindupLIn
inputs are ignored if CVInitializing, CVFault, or CVEUSpanInv is set.
CV Percent Limiting
(1) During instruction first scan, the instruction clears the alarm outputs.
CV High/Low Limiting
(1) During instruction first scan, the instruction clears the alarm outputs.
CV Rate-of-Change Limiting
(1) During instruction first scan, the instruction clears the alarm output. The
instruction also clears the alarm output and disables the CV rate-of-change
algorithm when CVInitializing is set.
If not in the Operator Manual mode, the PIDE instruction sets CVOper = CV.
This obtains bumpless mode switching from any control to the Operator Manual
mode.
Primary loop control is typically used by a primary PID loop to obtain bumpless
switching and anti-reset windup when using Cascade/Ratio mode. The primary
loop control includes the initialize primary loop output and the anti-reset windup
outputs. The InitPrimary output is typically used by the CVInitReq input of a
primary PID loop. The windup outputs are typically used by the windup inputs of
a primary loop to limit the windup of its CV output.
(4) During instruction first scan, the instruction clears the windup outputs. The
instruction also clears the windup outputs and disables the CV windup algorithm
when CVInitializing is set or if either CVFaulted or CVEUSpanInv is set.
The SP and CV limits operate independently. A SP high limit does not prevent
CV from increasing in value. Likewise, a CV high or low limit does not prevent SP
from increasing in value.
(6) The instruction clears WindupHOut when SPHAlarm is cleared, and not
(ControlAction is cleared and CVHAlarm is set), and not (ControlAction is set
and CVLAlarm is set).
The SP and CV limits operate independently. A SP low limit does not prevent CV
from increasing in value. likewise a CV low or high limit does not prevent SP from
increasing in value.
(8) The instruction clears WindupLOut when SPLAlarm is cleared and not
(ControlAction is cleared and CVLAlarm is set) and not (ControlAction is set
and CVHAlarm is set).
Processing Faults
The following table describes how the instruction handles execution faults:
PVSpanInv is true or Disable the Auto and Cascade/Ratio modes. If Override or Hand is not the current mode, set to
SPLimitsInv is true Manual mode
Do not compute PV and SP percent
PID control algorithm is not executed
Set CV to value by determined by Program or Operator control and mode (Manual, Override, or
Hand).
RatioLimitsInv is true If not already in Hand or Override, set to Manual model
and Disable the Cascade/Ratio mode
CasRat is true and Set CV to value determined by Program or Operator control and mode (Manual, Override, or
UseRatio is true Hand).
TimingModeInv is true If not already in Hand or Override, set to Manual mode
or
RTSTimeStampInv is
true or
DeltaTInv is true
See also
Position Proportional This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
(POSP) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The POSP instruction opens or closes a device by pulsing open or close contacts at
a user defined cycle time with a pulse width proportional to the difference
between the desired and actual positions.
Available Languages
Ladder Diagram
Function Block
Structured Text
POSP(POSP_tag)
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
POSITION_PROP Structure
Description
The POSP instruction usually receives the desired position setpoint from a PID
instruction output.
The PositionPercent and SPPercent outputs are updated each time the instruction
is executed. If either of these values is out of range (less than 0% or greater than
100%), the appropriate bit in Status is set, but the values are not limited. The
instruction uses these formulas to calculate whether the values are in range:
The following diagram shows the three primary states of the POSP instruction.
OpenOut is pulsed whenever SP > Position feedback. When this occurs, the
instruction sets CloseTime = 0 and the duration for which OpenOut is to be
turned on is calculated as:
If any of the following conditions exist, OpenOut is not pulsed and OpenTime =
0.
CycleTime = 0
OpenRate = 0
SPPercent is invalid
The CloseOut is pulsed whenever SP < Position feedback. When this occurs, the
instruction sets OpenTime = 0 and the duration for which CloseOut is to be
turned on is calculated as:
If any of the following conditions exist, CloseOut will not be pulsed and
CloseTime will be cleared to 0.0.
CycleTime = 0
CloseRate = 0
SPPercent is invalid
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
Example 1
Function Block
Structured Text
FlowController.PV := WaterFlowRate;
PIDE(FlowController);
FlowValve.SP := FlowController.CVEU;
FlowValve.Position := FlowValvePosition;
FlowValve.OpenedFB := FlowValveOpened;
FlowValve.ClosedFB := FlowValveClosed;
POSP(FlowValve);
OpenFlowValveContact := FlowValve.OpenOut;
CloseFlowValveContact := FlowValve.CloseOut;
See also
Ramp/Soak (RMPS) 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 RMPS instruction provides for a number of segments of alternating ramp and
soak periods.
Available Languages
Ladder Diagram
Function Block
Structured Text
RMPS(RMPS_tag,RampValue,SoakValue,SoakTime);
Operands
Function Block
Structured Text
SoakTime REAL array Soak Time array. Enter a soak time for each
segment (0 to NumberOfSegs-1). Soak times
are entered in minutes. If a soak value is
invalid, the instruction sets the appropriate
bit in Status and changes to Operator Manual
or Program Hold mode. The array must be at
least as large as NumberOfSegs.
Valid = 0.0 to maximum positive float
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
RMPS Structure
Default is cleared.
RampDeadband REAL Guaranteed ramp deadband. Specify the amount in engineering units that
PV is allowed to differ from the output when GuarRamp is on. If this value
is invalid, the instruction sets RampDeadband = 0.0 and the instruction
sets the appropriate bit in Status.
Valid = any float 0.0
Default = 0.0
GuarSoak BOOL Guaranteed soak. If true and the instruction is in auto, the soak timer is
cleared if the PV differs from the Output by more than SoakDeadband.
Default is false.
SoakDeadband REAL Guaranteed soak deadband. Specify the amount in engineering units that
the PV is allowed to differ from the output when GuarSoak is on. If this
value is invalid, the instruction sets SoakDeadband = 0.0 and the
instruction sets the appropriate bit in Status.
Valid = any float 0.0
Default = 0.0
CurrentSegProg DINT Current segment program. The user program writes a requested value for
the CurrentSeg into this input. This value is used if the ramp/soak is in
Program Manual mode. If this value is invalid, the instruction sets the
appropriate bit in Status.
Valid = 0 to NumberOfSegs-1
Default = 0
OutProg REAL Output program. The user program writes a requested value for the Out
into this input. This value is used as the Out when the ramp/soak is in
Program Manual mode.
Valid = any float
Default = 0.0
SoakTimeProg REAL Soak time program. The user program writes a requested value for the
SoakTimeLeft into this input. This value is used if the ramp/soak is in
Program Manual mode. If this value is invalid, the instruction sets the
appropriate bit in Status.
Valid = 0.0 to maximum positive float
Default = 0.0
CurrentSegOper DINT Current segment operator. The operator interface writes a requested value
for the CurrentSeg into this input. This value is used if the ramp/soak is in
Operator Manual mode. If this value is invalid, the instruction sets the
appropriate bit in Status.
Valid = 0 to NumberOfSegs-1
Default = 0
OutOper REAL Output operator. The operator interface writes a requested value for the
Out into this input. This value is used as the Out when the ramp/soak is in
Operator Manual mode.
Valid = any float
Default = 0.0
SoakTimeOper REAL Soak time operator. The operator interface writes a requested value for the
SoakTimeLeft into this input. This value is used if the ramp/soak is in
Operator Manual mode. If this value is invalid, the instruction sets the
appropriate bit in Status.
Valid = 0.0 to maximum positive float
Default = 0.0
ProgProgReq BOOL Program program request. Set to true by the user program to request
Program control. Ignored if ProgOperReq is true. Holding this true and
ProgOperReq false locks the instruction in Program control.
Default is false.
ProgOperReq BOOL Program operator request. Set to true by the user program to request
Operator control. Holding this true locks the instruction in Operator control.
Default is false.
ProgAutoReq BOOL Program auto mode request. Set to true by the user program to request the
ramp/soak to enter Auto mode. Ignored if the loop is in Operator control, if
ProgManualReq is true, or if ProgHoldReq is true.
Default is false.
ProgManualReq BOOL Program manual mode request. Set to true by the user program to request
the ramp/soak to enter Manual mode. Ignored if the ramp/soak is in
Operator control or if ProgHoldReq is true.
Default is false.
ProgHoldReq BOOL Program hold mode request. Set to true by the user program to request to
stop the ramp/ soak without changing the Out, CurrentSeg, or
SoakTimeLeft. Also useful when a PID loop getting its setpoint from the
ramp/soak leaves cascade. An operator can accomplish the same thing by
placing the ramp/soak into Operator Manual mode.
Default is false.
OperProgReq BOOL Operator program request. Set to true by the operator interface to request
Program control. Ignored if ProgOperReq is true. The instruction clears this
input to false.
Default is false.
OperOperReq BOOL Operator operator request. Set to true by the operator interface to request
Operator control. Ignored if ProgProgReq is true and ProgOperReq is false.
The instruction clears this input to false.
Default is false.
OperAutoReq BOOL Operator auto mode request. Set to true by the operator interface to
request the ramp/soak to enter Auto mode. Ignored if the loop is in
Program control or if OperManualReq is true. The instruction clears this
input to false.
Default is false.
OperManualReq BOOL Operator manual mode request. Set to true by the operator interface to
request the ramp/soak to enter Manual mode. Ignored if the loop is in
Program control. The instruction clears this input to false.
Default is false.
Initialize BOOL Initialize program and operator values. When true and in manual, the
instruction sets CurrentSegProg = 0, CurrentSegOper = 0, SoakTimeProg
= SoakTime[0], and SoakTimeOper = SoakTime[0]. Initialize is ignored
when in Auto or Hold mode. The instruction clears this parameter to false.
Default is false.
ProgValueReset BOOL Reset program control values. When true, the instruction clears
ProgProgReq, ProgOperReq, ProgAutoReq, ProgHoldReq, and
ProgManualReq to false.
Default is false.
Description
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value and sets the math overflow status flag. The
internal parameters are not updated. In each subsequent scan, the output is
computed using the internal parameters from the last scan when the output was
valid.
No
Major/Minor Faults
Execution
Function Block
Structured Text
The following table shows the ending control based on the program request
inputs.
The following table shows the ending control based on the Manual, Auto, and
Hold mode requests.
Control at Oper Oper Prog Prog Prog Man Prog First Control at End
Start of First Auto Man Auto Man Hold Hold Value Run of First Scan
Scan Req Req Req Req Req AftInit Reset
Example
In this example, the RMPS instruction drives the setpoint of a PIDE instruction.
When the PIDE instruction is in Cascade/Ratio mode, the output of the RMPS
instruction is used as the setpoint. The PV to the PIDE instruction can be
optionally fed into the PV input of the RMPS instruction if you want to use
guaranteed ramping and/or guaranteed soaking.
Function Block
(1) You can lock the instruction in Operator control by leaving ProgOperReq to
true.
(2) You can lock the instruction in Program control by leaving ProgProgReq to
true while ProgOperReq is false.
If the instruction was in Operator Auto mode, then the transition is to Program
Auto mode.
If the instruction was in Operator Manual mode, then the transition is to Program
Manual mode.
If the instruction was in Program Auto mode, then the transition is to Operator
Auto mode.
If the instruction was in Program Manual or Program Hold mode, then the
transition is to Operator Manual mode.
Program Control
The following diagram shows how the RMPS instruction operates when in
Program control.
(1) In single (non-cyclic) execution, you must toggle ProgAutoReq from false to
true if one execution of the ramp/soak profile is complete and you want another
execution of the ramp/soak profile.
(2) When the instruction is configured for single execution, and the Auto mode
Ramp-Soak profile completes, the instruction transitions to Hold mode.
(3) The instruction is placed in Hold mode if PVFaulted is true or any of the
following inputs are invalid: NumberOfSegs, CurrentSegProg, or SoakTimeProg.
Mode Description
Program Auto Mode While in Auto mode, the instruction sequentially executes the ramp/ soak profile.
Program Manual Mode While in Manual mode the user program directly controls the instruction’s Out. The CurrentSegProg, SoakTimeProg,
and OutProg inputs are transferred to the CurrentSeg, SoakTimeLeft, and Out outputs. When the instruction is placed
in auto mode, the ramp/soak function resumes with the values last input from the user program. CurrentSegProg and
SoakTimeProg are not transferred if they are invalid.
To facilitate a "bumpless" transition into Manual mode, the CurrentSegProg, SoakTimeProg, and OutProg inputs are
continuously updated to the current values of CurrentSeg, SoakTimeLeft, and Out when ProgValueReset is set and the
instruction is not in Program Manual mode.
Program Hold Mode While in Hold mode, the instruction’s outputs are maintained at their current values. If in this mode when
ProgOperReq is set to change to Operator control, the instruction changes to Operator Manual mode.
Operator Control
The following diagram shows how the RMPS instruction operates when in
Operator control.
(1) When the instruction is configured for Single Execution, and the Auto mode
ramp/soak profile completes, the instruction transitions to manual mode.
(2) The instruction is placed in Manual mode if PVFaulted is true or any of the
following inputs are invalid: NumberOfSegs, CurrentSegOper, or SoakTimeOper.
Mode Description
Operator Auto Mode While in Auto mode, the instruction sequentially executes the ramp/ soak profile.
Operator Manual Mode While in Manual mode the operator directly controls the instruction’s Out. The CurrentSegOper, SoakTimeOper, and
OutOper inputs are transferred to the CurrentSeg, SoakTimeLeft, and Out outputs. When the instruction is placed in
Auto mode, the ramp/soak function resumes with the values last input from the operator. CurrentSegOper and
SoakTimeOper are not transferred if they are invalid.
To facilitate a "bumpless" transition into Manual mode, the CurrentSegOper, SoakTimeOper, and OutOper inputs are
continuously updated to the current values of CurrentSeg, SoakTimeLeft, and Out whenever the instruction is not in
Operator Manual mode.
The following diagram illustrates how the RMPS instruction executes the
ramp/soak profile.
(1) The Ramp is complete when Out = SoakValue. If, during ramp execution, Out
> SoakValue, Out is limited to SoakValue.
(2) Soaking is complete when Out is held for the amount of time specified in the
current segment’s SoakTime. If the segment executed was not the last segment,
CurrentSeg increments by one.
(3) Soaking has completed for the last programmed segment and the instruction is
configured for cyclic execution. The instruction sets CurrentSeg = 0.
(4) Soaking has completed for the last programmed segment and the instruction is
configured for single execution.
Ramping
The ramp cycle ramps Out from the previous segment’s SoakValue to the current
segment’s SoakValue. The time in which the ramp is traversed is defined by the
RampValue parameters.
Ramping is positive if Out < target SoakValue of the current segment. If the ramp
equation calculates a new Out which exceeds the target SoakValue, the Out is set
to the target SoakValue.
Ramping is negative if Out > the target SoakValue of the current segment. If the
ramp equation calculates a new Out which is less than the target SoakValue, the
Out is set to the target SoakValue.
Each segment has a ramp value. You have the option of programming the ramp in
units of time or rate. All segments must be programmed in the same units. The
following table describes the ramping options:
Parameter Description
Time-based ramping TimeRate is set to true for time-based ramping (in minutes)
The rate of change for the current segment is calculated and either added or subtracted to Out
until Out reaches the current segment’s soak value. In the following equation, DeltaT is the
elapsed time in minutes since the instruction last executed.
Where RampStart is the value of Out at the start of the Current Segment.
Rate-based ramping TimeRate is cleared to false for rate-based ramping (in units/minute)
The programmed rate of change is either added or subtracted to Out until Out reaches the current
segment’s soak value. In the following equation, DeltaT is the elapsed time in minutes since the
instruction last executed.
Guaranteed Ramping
Set the input GuarRamp to true to enable guaranteed ramping. When enabled, the
instruction monitors the difference between Out and PV. If the difference is
outside of the programmed RampDeadband, the output is left unchanged until
the difference between PV and Out are within the deadband. The output
GuarRampOn is set to true whenever Out is held due to guaranteed ramping
being in effect.
Soaking
Soaking is the amount of time the block output is to remain unchanged until the
next ramp-soak segment is started. The soak cycle holds the output at the
SoakValue for a programmed amount of time before proceeding to the next
segment. The amount of time the output is to soak is programmed in the
SoakTime parameters.
Each segment has a SoakValue and SoakTime. Soaking begins when Out is
ramped to the current segment’s SoakValue. SoakTimeLeft represents the time in
minutes remaining for the output to soak. During ramping, SoakTimeLeft is set to
the current segment’s SoakTime. Once ramping is complete, SoakTimeLeft is
decreased to reflect the time in minutes remaining for the current segment.
SoakTimeLeft = 0 when SoakTime expires.
Guaranteed Soaking
Set the input GuarSoak to true to enable guaranteed soaking. When enabled, the
instruction monitors the difference between Out and PV. If the difference is
outside of the SoakDeadband, timing of the soak cycle is suspended and the
internal soak timer is cleared. When the difference between Out and PV returns to
within the deadband, timing resumes. The output GuarSoakOn is set to true
when timing is held due to guaranteed soaking being in effect.
See also
Scale (SCL) 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 SCL instruction converts an unscaled input value to a floating point value in
engineering units.
Available Languages
Ladder Diagram
Function Block
Structured Text
SCL(SCL_tag)
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
SCALE Structure
Description
Use the SCL instruction with analog input modules that do not support scaling to
a full resolution floating point value.
For example, the 1771-IFE module is a 12-bit analog input module that supports
scaling only in integer values. If you use a 1771-IFE module to read a flow of 0-100
gallons per minute (gpm), you typically do not scale the module from 0-100
because that limits the resolution of the module. Instead, use the SCL instruction
and configure the module to return an unscaled (0-4095) value, which the SCL
instruction converts to 0-100 gpm (floating point) without a loss of resolution.
This scaled value could then be used as an input to other instructions.
The SCL instruction uses this algorithm to convert unscaled input into a scaled
value:
Alarming
Once the instruction calculates Out, the MaxAlarm and MinAlarm are
determined as follows:
Limiting
Limiting is performed on Out when Limiting is set. The instruction sets Out =
InEUMax when In > InRawMax. The instruction sets Out = InEUMin when In
< InRawMin.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The SCL instruction is typically used with analog input modules that do not
support on-board scaling to floating point engineering units. In this example, the
SCL instruction scales an analog input from a 1771-IFE module. The instruction
places the result in Out, which is used by an ALM instruction.
Function Block
Structured Text
SCL_01.In := Input0From1771IFE;
SCL(SCL_01);
ALM_01.In := SCL_01.Out;
ALM(ALM_01);
See also
Split Range Time This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
Proportional (SRTP) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The SRTP instruction takes the 0-100% output of a PID loop and drives heating
and cooling digital output contacts with a periodic pulse. This instruction controls
applications such as barrel temperature control on extrusion machines.
Available Languages
Ladder Diagram
Function Block
Structured Text
SRTP(SRTP_tag)
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
SPLIT_RANGE Structure
Description
The length of the SRTP pulse is proportional to the PID output. The instruction
parameters accommodate heating and cooling applications.
The instruction maintains a free running cycle timer that cycles from zero to the
programmed CycleTime. The internal timer is updated by DeltaT. DeltaT is the
elapsed time since the instruction last executed. This timer determines if the
outputs need to be turned on.
You can change CycleTime at any time. If CycleTime = 0, the internal timer is
cleared and HeatOut and CoolOut are cleared to false.
Heat and cool times are calculated every time the instruction is executed.
HeatTime is the amount of time within CycleTime that the heat output is to be
turned on.
CoolTime is the amount of time within CycleTime that the cool output is to be
turned on.
The instruction controls heat and cool outputs using these rules:
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
In this example, a PIDE instruction executes in a slow, lower priority task because
it is a slow, temperature loop. The output of the PIDE instruction is a controller-
scoped tag because it becomes the input to an SRTP instruction. The SRTP
instruction executes in a faster, higher priority task so that the pulse outputs are
more accurate
Function Block
Structured Text
BarrelTempLoop.PV := BarrelTemp;
PIDE(BarrelTempLoop);
LoopOutput := BarrelTempLoop.CVEU;
SRTP_02.In := LoopOutput;
SRTP(SRTP_02);
ResistiveHeater := SRTP_02.HeatOut;
CoolingSolenoid := SRTP_02.CoolOut;
See also
Totalizer (TOT) 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.
Available Languages
Ladder Diagram
Function Block
Structured Text
TOT(TOT_tag)
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
TOTALIZER Structure
LowInCutoff REAL The instruction low input cutoff input. When the
In is at or below the LowInCutoff value,
totalization ceases.
Valid = any float
Default = 0.0
ProgProgReq BOOL Program program request. Set to true to request
Program control. Ignored if ProgOperReq is true.
Holding this true and ProgOperReq false locks
the instruction in Program control.
Default is false.
ProgOperReq BOOL Program operator request. Set to true to request
Operator control. Holding this true locks the
instruction in Operator control.
Default is false.
ProgStartReq BOOL The program start request input. Set to true to
request totalization to start.
Default is false.
ProgStopReq BOOL The program stop request input. Set to true to
request totalization to stop.
Default is false.
ProgResetReq BOOL The program reset request input. Set to true to
request the Total to reset to the ResetValue.
Default is false.
OperProgReq BOOL Operator program request. Set to true by the
operator interface to request Program control.
The instruction clears this input to false.
Default is false.
OperOperReq BOOL Operator operator request. Set to true by the
operator interface to request Operator control.
The instruction clears this input to false.
Default is false.
OperStartReq BOOL The operator start request input. Set to true by
the operator interface to request totalization to
start. The instruction clears this input to false.
Default is false.
OperStopReq BOOL The operator stop request input. Set to true by
the operator interface to request totalization to
stop. The instruction clears this input to false.
Default is false.
OperResetReq BOOL The operator reset request input. Set to true by
the operator interface to request totalization to
reset. The instruction clears this input to false.
Default is false.
ProgValueReset BOOL Reset program control values. When true, clear
all the program request inputs to false at each
execution of the instruction.
Default is false.
Description
This instruction typically totals the amount of a material added over time, based
on a flow signal.
No
Major/Minor Faults
Execution
Function Block
Structured Text
If (In <= LowInCutoff), the instruction sets LowInCutoffFlag to true and makes
In(n-1) = 0.0.
Operating Modes
The following diagram shows how the TOT instruction changes between
Program control and Operator control.
(1) The instruction remains in operator control mode when ProgOperReq is true.
The following diagram shows how the TOT instruction changes between Run
and Stop modes.
(2) The first scan in run after a stop, the totalization is not evaluated, but in n-1 is
updated.
All operator request inputs are cleared to false at the end of each scan. If
ProgValueReset is true, all program request inputs are cleared to false at the end of
each scan.
• OldTotal = Total
• Total = ResetValue
• ProgResetDone is set to true
• OldTotal = Total
• Total = ResetValue
Value Condition
1 TimeBase = 0 (seconds)
60 TimeBase = 1 (minutes)
3600 TimeBase = 2 (hours)
86400 TimeBase = 3 (days)
Once the totalization has been calculated, these rules determine whether the target
or pre-target values have been reached:
Example
In this example, the TOT instruction meters a target quantity of water into a tank
and shuts off the flow once the proper amount of water has been added. When the
AddWater pushbutton is pressed, the TOT instruction resets and starts totalizing
the amount of water flowing into the tank. Once the Target value is reached, the
TOT instruction sets the TargetFlag output, which causes the solenoid valve to
close. For this example, the TOT instruction was "locked" into Program Run by
setting the ProgProgReq and ProgStartReq inputs. This is done for this example
because the operator never needs to directly control the TOT instruction.
Function Block
Structured Text
TotalWaterFlow.In := WaterFlowRate;
TotalWaterFlow.ProgProgReq := 1;
TotalWaterFlow.ProgStartReq := 1;
TotalWaterFlow.ProgResetReq := AddWater;
TOT(TotalWaterFlow);
RESD_01.Set := AddWater;
RESD_01.Reset := TotalWaterFlow.TargetFlag;
RESD(RESD_01);
WaterSolenoidValve := RESD_01.Out;
See also
Available Languages
Ladder Diagram
Function Block
Structured Text
CC(CC_tag);
Operands
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Important: Whenever an APC block detects a change in Delta Time (DeltaT), a ModelInit will
be performed. For this reason the blocks should only be run in one of the
TimingModes in which DeltaT will be constant.
The following TimingMode setting are not recommended due to jitter in DeltaT:
Function Block
Structure
SPLLimit REAL SP low limit value, scaled in PV units. Valid = PVEUMin to SPHLimit
If SPLLimit < PVEUMin, or SPHLimit < Default = 0.0
SPLLimit, set bit in Status and limit SP
by using the value of SPLLimit.
CV1Fault BOOL Control variable 1 bad health Default = FALSE
indicator. If CV1EU controls an analog FALSE = Good Health
output, then CV1Fault will normally
come from the analog output's fault
status.
If CV1Fault is TRUE, it indicates an
error on the output module, set bit in
Status.
CV2Fault BOOL Control variable 2 bad health Default = FALSE
indicator. If CV2EU controls an analog FALSE = Good Health
output, then CV2Fault will normally
come from the analog output's fault
status.
If CV2Fault is TRUE, it indicates an
error on the output module, set bit in
Status.
CV3Fault BOOL Control variable 3 bad health Default = FALSE
indicator. If CV3EU controls an analog FALSE = Good Health
output, then CV3Fault will normally
come from the analog output's fault
status.
If CV3Fault is TRUE, it indicates an
error on the output module, set bit in
Status.
CV1InitReq BOOL CV1 initialization request. While TRUE, Default = FALSE
set CV1EU to the value of CVInitValue.
This signal will normally be controlled
by the In Hold status on the analog
output module controlled by CV1EU or
from the InitPrimary output of a
secondary loop.
CV2InitReq BOOL CV2 initialization request. While TRUE, Default = FALSE
set CV2EU to the value of CVInitValue.
This signal will normally be controlled
by the In Hold status on the analog
output module controlled by CV2EU or
from the InitPrimary output of a
secondary loop.
CV3InitReq BOOL CV3 initialization request. While TRUE, Default = FALSE
set CV3EU to the value of CVInitValue.
This signal will normally be controlled
by the In Hold status on the analog
output module controlled by CV32EU
or from the InitPrimary output of a
secondary loop.
CV1HLimit REAL CV1 high limit value. This is used to Valid = CV1LLimit < CV1HLimit ≤ 100.0
set the CV1HAlarm output. It is also Default = 100.0
used for limiting CV1 when in Auto
mode or in Manual if CVManLimiting
is TRUE.
If CV1HLimit > 100, if CV1HLimit <
CV1LLimit, set bit in Status.
If CV1HLimit < CV1LLimit, limit CV1
by using the value of CV1LLimit.
CV2HLimit REAL CV2 high limit value. This is used to Valid = CV2LLimit < CV2HLimit ≤ 100.0
set the CV2HAlarm output. It is also Default = 100.0
used for limiting CV2 when in Auto
mode or in Manual if CVManLimiting
is TRUE.
If CV2HLimit > 100, if CV2HLimit <
CV2LLimit, set bit in Status.
If CV2HLimit < CV2LLimit, limit CV2
by using the value of CV2LLimit.
CV3HLimit REAL CV3 high limit value. This is used to Valid = CV3LLimit < CV3HLimit ≤ 100.0
set the CV3HAlarm output. It is also Default = 100.0
used for limiting CV3 when in Auto
mode or in Manual if CVManLimiting
is TRUE.
If CV3HLimit > 100, if CV3HLimit <
CV3LLimit, set bit in Status.
If CV3HLimit < CV3LLimit, limit CV3
by using the value of CV3LLimit.
CV1LLimit REAL CV1 low limit value. This is used to set Valid = 0.0 ≤ CV1LLimit < CV1HLimit
the CV1LAlarm output. It is also used Default = 0.0
for limiting CV1 when in Auto mode or
in Manual mode if CVManLimiting is
TRUE.
If CV1LLimit < 0 set bit in Status. If
CV1HLimit < CV1LLimit, limit CV by
using the value of CV1LLimit.
CV2LLimit REAL CV2 low limit value. This is used to set Valid = 0.0 ≤ CV2LLimit < CV1HLimit
the CV2LAlarm output. It is also used Default = 0.0
for limiting CV2 when in Auto mode or
in Manual mode if CVManLimiting is
TRUE.
If CV2LLimit < 0 set bit in Status. If
CV2HLimit < CV2LLimit, limit CV by
using the value of CV2LLimit.
CV3LLimit REAL CV3 low limit value. This is used to set Valid = 0.0 ≤ CV3LLimit < CV1HLimit
the CV3LAlarm output. It is also used Default = 0.0
for limiting CV3 when in Auto mode or
in Manual mode if CVManLimiting is
TRUE.
If CV3LLimit < 0 set bit in Status. If
CV3HLimit < CV3LLimit, limit CV by
using the value of CVLLimit.
CV1ROCPosLimit REAL CV1 rate of change limit, in percent Valid = 0.0 to maximum positive float
per second. Rate of change limiting is Default = 0.0
only used when in Auto mode or in
Manual mode if CVManLimiting is
TRUE. A value of zero disables CV1 ROC
limiting. If value of CV1ROCLimit < 0,
set bit in Status and disable CV1 ROC
limiting.
CV2ROCPosLimit REAL CV2 rate of change limit, in percent Valid = 0.0 to maximum positive float
per second. Rate of change limiting is Default = 0.0
only used when in Auto mode or in
Manual mode if CVManLimiting is
TRUE. A value of zero disables CV2 ROC
limiting. If value of CV2ROCLimit < 0,
set bit in Status and disable CV2 ROC
limiting.
CV3ROCPosLimit REAL CV3 rate of change limit, in percent Valid = 0.0 to maximum positive float
per second. Rate of change limiting is Default = 0.0
only used when in Auto mode or in
Manual mode if CVManLimiting is
TRUE. A value of zero disables CV3 ROC
limiting. If value of CV3ROCLimit < 0,
set bit in Status and disable CV3 ROC
limiting.
CV1ROCNegLimit REAL CV1 rate of change limit, in percent Valid = 0.0 to maximum positive float
per second. Rate of change limiting is Default = 0.0
only used when in Auto mode or in
Manual mode if CVManLimiting is
TRUE. A value of zero disables CV1 ROC
limiting. If value of CV1ROCLimit < 0,
set bit in Status and disable CV1 ROC
limiting.
CV2ROCNegLimit REAL CV2 rate of change limit, in percent Valid = 0.0 to maximum positive float
per second. Rate of change limiting is Default = 0.0
only used when in Auto mode or in
Manual mode if CVManLimiting is
TRUE. A value of zero disables CV2 ROC
limiting. If value of CV2ROCLimit < 0,
set bit in Status and disable CV2 ROC
limiting.
CV3ROCNegLimit REAL CV3 rate of change limit, in percent Valid = 0.0 to maximum positive float
per second. Rate of change limiting is Default = 0.0
only used when in Auto mode or in
Manual mode if CVManLimiting is
TRUE. A value of zero disables CV3 ROC
limiting. If value of CV3ROCLimit < 0,
set bit in Status and disable CV3 ROC
limiting.
CV3ProcessGainSign BOOL Used only for Autotuning. Sign of the Default = FALSE
process gain (Delta PV/Delta CV3).
Set to indicate a negative process gain
(increase in output causes a decrease
in PV).
Reset to indicate a positive process
gain (increase in output causes an
increase in PV).
ProcessType DINT Process type selection (1=Integrating, Default = 0
0=non-integrating)
CV1ModelGain REAL The internal model gain parameter for Valid = maximum negative float −>
CV1. Enter a positive or negative gain maximum positive float
depending on process direction. Default = 0.0
CV2ModelGain REAL The internal model gain parameter for Valid = maximum negative float −>
CV2. Enter a positive or negative gain maximum positive float
depending on process direction. Default = 0.0
CV3ModelGain REAL The internal model gain parameter for Valid = maximum negative float −>
CV3. Enter a positive or negative gain maximum positive float
depending on process direction. Default = 0.0
CV1ModelTC REAL The internal model time constant for Valid = 0.0 to maximum positive float
CV1 in seconds. Default = 0.0
CV2ModelTC REAL The internal model time constant for Valid = 0.0 to maximum positive float
CV2 in seconds. Default = 0.0
CV3ModelTC REAL The internal model time constant for Valid = 0.0 to maximum positive float
CV3 in seconds. Default = 0.0
CV1ModelDT REAL The internal model deadtime for Valid = 0.0 to maximum positive float
CV1 in seconds. Default = 0.0
CV2ModelDT REAL The internal model deadtime for CV2 Valid = 0.0 to maximum positive float
in seconds. Default = 0.0
CV3ModelDT REAL The internal model deadtime for CV3 Valid = 0.0 to maximum positive float
in seconds. Default = 0.0
CV1RespTC REAL The tuning parameter that determines Valid = 0.0 to maximum positive float
the speed of the control variable Default = 0.0
action for CV1 in seconds.
CV2RespTC REAL The tuning parameter that determines Valid = 0.0 to maximum positive float
the speed of the control variable Default = 0.0
action for CV2 in seconds.
CV3RespTC REAL The tuning parameter that determines Valid = 0.0 to maximum positive float
the speed of the control variable Default = 0.0
action for CV3 in seconds.
Act1stCV DINT The first CV to act to compensate for Valid = 1-3
PV-SP deviation. Default = 1
1=CV1, 2=CV2, 3=CV3
Act2ndCV DINT The second CV to act to compensate Valid = 1-3
for PV-SP deviation. Default = 2
1=CV1, 2=CV2, 3=CV3
Act3rdCV DINT The third CV to act to compensate for Valid = 1-3
PV-SP deviation. Default = 3
1=CV1, 2=CV2, 3=CV3
AtuneCV1UseModel BOOL Use Autotune model request for CV1. Default = FALSE
Set True to replace the current model
parameters with the calculated
Autotune model parameters. The
function block resets the input
parameter to FALSE.
AtuneCV2UseModel BOOL Use Autotune model request for CV2. Default = FALSE
Set True to replace the current model
parameters with the calculated
Autotune model parameters. The
function block resets the input
parameter to FALSE.
AtuneCV3UseModel BOOL Use Autotune model request for CV3. Default = FALSE
Set True to replace the current model
parameters with the calculated
Autotune model parameters. The
function block resets the input
parameter to FALSE.
AtuneCV1Abort BOOL Abort Autotune request for CV1. Set Default = FALSE
True to abort the auto tuning of CV1
output. The function block resets
input parameter to FALSE.
AtuneCV2Abort BOOL Abort Autotune request for CV2. Set Default = FALSE
True to abort the auto tuning of CV2
output. The function block resets
input parameter to FALSE.
AtuneCV3Abort BOOL Abort Autotune request for CV3. Set Default = FALSE
True to abort the auto tuning of CV3
output. The function block resets
input parameter to FALSE.
Description
In this example, CV1 is in Manual mode, CV2 is driven to its target value, and
CV3 is the active control. The following table describes this example in detail.
Name Description
CV1 Is in Manual mode
CV2 Is driven to its target value (CV2 = Target1stCV)
CV3 Is the active control (CV3 = Act1stCV)
This example could be a heat cooled system with a feed forward where:
Since CV1 is in Manual mode, CV3 target value as the lowest priority goal cannot
be accomplished. PV will be maintained at the setpoint by using CV3, and at the
same time CV2 will be driven to its target value (2nd priority goal).
If the operator changes the CV1 manual value, the control variable will take the
change into account when calculating new CV3 and CV2.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Function Block
Structured Text
ccTag.PV := ccInput1;
ccTag.SPProg := ccInput2;
ccTag.CV1Prog := ccInput3;
ccTag.CV2Prog := ccInput4;
ccTag.CV3Prog := ccInput5;
CC(ccTag);
ccOutput1 := ccTag.CV1EU;
ccOutput2 := ccTag.CV2EU;
ccOutput3 := ccTag.CV3EU;
See also
CC Function Block Starting with the default configuration, configure the following parameters:
Configuration Parameter Description
PVEUMax Maximum scaled value for PV.
PVEUMin Minimum scaled value for PV.
SPHLimit SP high limit value, scaled in PV units.
PPLLimit SP low limit value, scaled in PV units.
CV1InitValue An initial value of the control variable CV1 output.
CV2InitValue An initial value of the control variable CV2 output.
CV3InitValue An initial value of the control variable CV3 output.
If you have the process models available, you can intuitively tune the CC control
variable by entering the following parameters:
Parameter Description
ModelGains Nonzero numbers (negative for direct acting control variable, positive
for reverse acting control variable)
ModelTimeConstants Always positive numbers
ModelDeadtimes Always positive numbers
ResponseTimeConstants Always positive numbers
Active 1st, 2nd and 3rd CV Specify the order in which CV's will be used to compensate for PV - SP
error.
Target 1st, 2nd and 3rd CV Specify the priorities in which CV's will be driven to their respective
target values.
CVTargetValues Specify to which values should the control variable drive the
individual CV's
TargetRespTC Specify the speed of CV's to approach the target values
The function block behaves in a defined way for any combination of CV Active
and Target lists and CV Auto-Manual modes. The function block attempts to
accomplish these goals in the following order of priorities:
1. Control PV to SP
If any CV is put in Manual mode, the CC function block gives up the goal with
priority 3. If two CV's are in Manual mode, the CC function block is reduced to
an IMC, (single input, single output) control variable controlling the PV to its
setpoint.
In addition to this, however, the control variable reads the Manual CV values from
the CV's that are in Manual mode as feedforward signals. Then, the CC function
block predicts the influence of the Manual CV values on the PV by using the
appropriate internal models, and calculates the third CV that remains in Auto
mode.
For integrating process types (such as level control and position control), internal
nonintegrating models are used to approximate the integrating process. The
Factor parameter is used to convert the identified integrating process models to
nonintegrating internal models used for CV calculation. This is necessary to
provide for stable function block execution.
You may need to manually adjust the internal model parameters or the response
time constants. You can do so by changing the appropriate parameters and setting
the appropriate ModelInit bit. The internal states of the control variable will be
initialized, and the bit will automatically reset.
For example, modify the Model Gain for CV2 - PV model. Set the ModelInit2
parameter to TRUE to initialize the CV2 - PV internal model parameters and for
the new model gain to take effect.
CC Function Block Tuning The function block is equipped with an internal tuner (modeler). The purpose of
the tuner is to identify the process model parameters and to use these parameters
as internal model parameters (gain, time constant, and deadtime). The tuner also
calculates an optimal response time constant. Set the tuner by configuring the
following parameters for each CV - PV process.
You can copy these parameters to the ModelGain, ModelTC, and ResponseTC,
respectively, by setting the AtuneUseModel bit. The control variable will
automatically initialize the internal variables and continue normal operation. It
will automatically reset the AtuneUseModel bit.
See also
CC Function Block If an error occurs during the tuning procedure, the tuning is aborted, and an
appropriate AtuneStatus value is set. Also, a user can abort the tuning by setting
Tuning Errors
the AtuneAbort parameter.
After an abort, the CV will assume its value before the step change, and the
GainTuned, TCTuned, DTTuned, and RespTCTuned parameters are not
updated. The AtuneStatus parameter identifies the reason for the abort.
To identify models and to calculate response time constants for all three CV-PV
processes, run the tuner up to three times to obtain CV1-PV, CV2-PV, and CV3-
PV models and tuning, respectively.
Internal Model Control This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
(IMC) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
Available Languages
Ladder Diagram
Function Block
Structured Text
IMC(IMC_tag);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Important: Whenever an APC block detects a change in Delta Time (DeltaT), a ModelInit will be performed. For
this reason the blocks should only be run in one of the TimingModes in which DeltaT will be
constant.
• TimingMode = 0 (Periodic) while executing these function blocks in a Periodic Task
• TimingMode = 1 (Oversample)
In either case, if the Periodic Task time is dynamically changed, or the OversampleDT is dynamically
changed, the block will perform a ModelInit.
The following TimingMode setting are not recommended due to jitter in DeltaT:
• TimingMode = 0 (Periodic) while executing these function blocks in a Continuous or Event Task
• TimingMode = 2 (RealTimeSample)
Structure
SPHLimit REAL SP high limit value, scaled in PV units. Valid = SPLLimit to PVEUMax
If SPHLimit < SPLLimit or SPHLimit > Default = 100.0
PVEUMax, set bit in Status.
SPLLimit REAL SP low limit value, scaled in PV units. Valid = PVEUMin to SPHLimit
If SPLLimit < PVEUMin, or SPHLimit < Default = 0.0
SPLLimit, set bit in Status and limit SP by
using the value of SPLLimit.
UseRatio BOOL Allow Ratio control permissive. Set TRUE to Default = FALSE
enable ratio control when in CascadeRatio
mode.
RatioProg REAL Ratio Program multiplier, no units (for Valid = RatioLLimit to
example, scalar). Ratio and RatioOper are RatioHLimit
set to this value when in Program control. Default = 1.0
If RatioProg or RatioOper < RatioLLimit or
> RatioHLimit, set bit in Status and limit
value used for Ratio.
RatioOper REAL Ratio Operator multiplier, no units (for Valid = RatioLLimit to
example, scalar). Ratio is set to this value RatioHLimit
when in Operator control. Default = 1.0
If RatioProg or RatioOper < RatioLLimit or
> RatioHLimit, set bit in Status and limit
value used for Ratio.
RatioHLimit REAL Ratio high limit value, no units (for Valid = RatioLLimit to
example, scalar). Limits the value of Ratio maximum positive float
obtained from RatioProg or RatioOper. Default = 1.0
If RatioLLimit < 0, set bit in Status and
limit to zero. If RatioHLimit < RatioLLimit,
set bit in Status and limit Ratio by using the
value of RatioLLimit.
RatioLLimit REAL Ratio low limit value, no units (for Valid = 0.0 to RatioHLimit
example, scalar). Limits the value of Ratio Default = 1.0
obtained from RatioProg or RatioOper.
If RatioLLimit < 0, set bit in Status and
limit to zero. If RatioHLimit < RatioLLimit,
set bit in Status and limit Ratio by using the
value of RatioLLimit.
CVFault BOOL Control variable bad health indicator. If Default = FALSE
CVEU controls an analog output, then FALSE = Good Health
CVFault will normally come from the
analog output's fault status.
If CVFault is TRUE, it indicates an error on
the output module, set bit in Status.
CVInitReq BOOL CV initialization request. While TRUE, set Default = FALSE
CVEU to the value of CVInitValue. This
signal will normally be controlled by the In
Hold status on the analog output module
controlled by CVEU or from the InitPrimary
output of a secondary IMC loop.
CVInitValue REAL CVEU initialization value, scaled in CVEU Valid = any float
units. When CVInitializing is TRUE set CVEU Default = 0.0
equal to CVInitValue and CV to the
corresponding percentage value.
CVInitValue will normally come from the
feedback of the analog output controlled
by CVEU or from the setpoint of a
secondary loop. The function block
initialization is disabled when CVFaulted or
CVEUSpanInv are TRUE (bad).
CVProg REAL CV Program-Manual value. CV is set to this Valid = 0.0 to 100.0
value when in Program control and Manual Default = 0.0
mode.
If value of CVProg or CVOper < 0 or > 100,
or < CVLLimit or > CVHLimit when
CVManLimiting is TRUE, set unique Status
bit and limit value used for CV.
CVOper REAL CV Operator-Manual value. CV is set to this Valid = 0.0 to 100.0
value when in Operator control and Manual Default = 0.0
mode. If not Operator-Manual mode, set
CVOper to the value of CV at the end of
each function block execution.
If value of CVProg or CVOper < 0 or > 100,
or < CVLLimit or > CVHLimit when
CVManLimiting is TRUE, set unique Status
bit and limit value used for CV.
CVOverrideValue REAL CV Override value. CV set to this value Valid = 0.0 to 100.0
when in Override mode. Default = 0.0
This value should correspond to a safe state
output of the IMC loop. If value of
CVOverrideValue < 0 or >100, set unique
Status bit and limit value used for CV.
CVTrackValue REAL CV track value. When CVTrackReq is Valid = 0.0 to 100.0
enabled and the IMC function block is in Default = 0.0
Manual, the CVTrackValue will be ignored,
and the IMC internal model will update its
historical data with the CVOper or CVProg
value. When CVTrackReq is enabled and
the IMC function block is in Auto, the
internal model will update its historical
data based on the value of CVTrackValue.
The CV in this case will be allowed to move
as if the IMC function block was still
controlling the process. This is useful in
multiloop selection schemes where you
want the IMC function block to follow the
output of a different controlling algorithm,
where you would connect the output of the
controlling algorithm into the
CVTrackValue.
CVManLimiting BOOL Limit CV in Manual mode request. If Default = FALSE
Manual mode and CVManLimiting is TRUE,
CV will be limited by the CVHLimit and
CVLLimit values.
CVEUMax REAL Maximum value for CVEU. The value of Valid = any float
CVEU that corresponds to 100% CV. If Default = 100.0
CVEUMax = CVEUMin, set bit in Status.
CVEUMin REAL Minimum value of CVEU. The value of CVEU Valid = any float
that corresponds to 0% CV. If CVEUMax = Default = 0.0
CVEUMin, set bit in Status.
CVHLimit REAL CV high limit value. This is used to set the Valid = CVLLimit < CVHLimit
CVHAlarm output. It is also used for ≤ 100.0
limiting CV when in Auto or CascadeRatio Default = 100.0
modes or Manual mode if CVManLimiting
is TRUE.
If CVLLimit < 0, if CVHLimit > 100, if
CVHLimit < CVLLimit, set bit in Status. If
CVHLimit < CVLLimit, limit CV by using the
value of CVLLimit.
CVLLimit REAL CV low limit value. This is used to set the Valid = 0.0 ≤ CVLLimit <
CVLAlarm output. It is also used for limiting CVHLimit
CV when in Auto or CascadeRatio modes or Default = 0.0
Manual mode if CVManLimiting is TRUE.
If CVLLimit < 0, if CVHLimit > 100, if
CVHLimit < CVLLimit, set bit in Status.
If CVHLimit < CVLLimit, limit CV by using
the value of CVLLimit.
CVROCPosLimit REAL CV increasing rate of change limit, in Valid = 0.0 to maximum
percent per second. positive float
Rate of change limiting is only used when Default = 0.0
in Auto or CascadeRatio modes or Manual
mode if CVManLimiting is TRUE.
A value of zero disables CV ROC limiting.
If value of CVROCPOSLimit < 0, set bit in
Status and disable CV ROC limiting.
CVROCNegLimit REAL CV decreasing rate of change limit, in Valid = 0.0 to maximum
percent per second. positive float
Rate of change limiting is only used when Default = 0.0
in Auto or CascadeRatio modes or Manual
mode if CVManLimiting is TRUE.
A value of zero disables CV ROC limiting.
If value of CVROCNegLimit < 0, set bit in
Status and disable CV ROC limiting.
HandFB REAL CV HandFeedback value. CV set to this Valid = 0.0…100.0
value when in Hand mode and Default = 0.0
HandFBFault is FALSE (good health). This
value would typically come from the
output of a field mounted hand/auto
station and would be used to generate a
bumpless transfer out of Hand mode.
If value of HandFB < 0 or > 100, set unique
Status bit and limit value used for CV.
HandFBFault BOOL HandFB value bad health indicator. If the Default = FALSE
HandFB value is read from an analog input, FALSE = Good Health
then HandFBFault will normally be
controlled by the status of the analog input
channel.
If HandFBFault is TRUE, it indicates an error
on the input module, set bit in Status.
WindupHIn BOOL Windup high request. When TRUE, CV will Default = FALSE
not be allowed to increase in value. This
signal will typically be the WindupHOut
output from a secondary loop.
WinduplIn BOOL Windup low request. When TRUE, CV will Default = FALSE
not be allowed to decrease in value. This
signal will typically be the WindupLOut
output from a secondary loop.
GainEUSpan BOOL ModelGain units in EU or as % of span. Default = FALSE
CV ModelGain units in EU or % of span. Set TRUE = Gain in EU
to interpret ModelGain as EU, reset to FALSE = Gain in % of span
interpret ModelGain as % of Span.
ProcessGainSign BOOL Used only for Autotuning. Sign of the Default = FALSE
process gain (Delta PV/Delta CV).
Set to indicate a negative process gain
(increase in output causes a decrease in
PV).
Reset to indicate a positive process gain
(increase in output causes an increase in
PV).
ProcessType DINT Process type selection (1=Integrating, Default = 0
0=non-integrating)
ModelGain REAL The internal model gain parameter. Enter a Valid = maximum negative
positive or negative gain depending on float −> maximum positive
process direction. float
Default = 0.0
ModelTC REAL The internal model time constant in Valid = 0.0 to maximum
seconds. positive float
Default = 0.0
ModelDT REAL The internal model deadtime in seconds. Valid = 0.0 to maximum
positive float
Default = 0.0
RespTC REAL The tuning parameter that determines the Valid = 0.0 to maximum
speed of the control variable action in positive float
seconds. Default = 0.0
PVTracking BOOL SP track PV request. Set TRUE to enable SP Default = FALSE
to track PV. Ignored when in CascadeRatio
or Auto modes.
CVTrackReq BOOL CV Track request. Set true to enable CV Default = FALSE
Tracking when autotune is OFF. Ignored in
Hand and Override mode.
AllowCasRat BOOL Allow CascadeRatio mode permissive. Set Default = FALSE
TRUE to allow CascadeRatio mode to be
selected by using either ProgCasRatReq or
OperCasRatReq.
ManualAfterInit BOOL Manual mode after initialization request. Default = FALSE
When TRUE, the function block will be
placed in the Manual mode when
CVInitializing is set TRUE unless the current
mode is Override or Hand.
When ManualAfterInit is FALSE, the
function block's mode will not be changed.
Description
At each execution, the IMC function block compares the actual PV measurement
with PV prediction. The result is called disturbance estimate, which is the effect of
unmeasured process disturbances combined with the modeling imprecision. The
disturbance estimate is used as a bias for the setpoint of the control variable. In the
ideal case of no disturbances and perfect modeling, the disturbance estimate (the
feedback signal) becomes equal to zero.
The function block then calculates the CV value (CVHLimit, CVLLimit, and rate
of change limits are imposed) and the PV prediction.
The IMC function block can be used in place of a PID function block with the
advantage over the PID control variable when controlling processes with large
deadtimes.
For an integrating process type (such as level control and position control), an
internal nonintegrating model is used to approximate the integrating process. The
Factor parameter is used to convert the identified integrating-process model to a
nonintegrating internal model that is used for CV calculation. This is necessary to
provide for stable IMC execution.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
Function Block
Structured Text
imcTag.PV := imcInput1;
imcTag.SPProg := imcInput2;
imcTag.CVProg := imcInput3;
IMC(imcTag);
imcOutput1 := imcTag.CVEU;
See also
IMC Function Block Follow these steps to create a basic IMC configuration.
Configuration 1. Starting with the default configuration, configure the following parameters.
Parameter Description
PVEUMax Maximum scaled value for PV.
PVEUMin Minimum scaled value for PV.
SPHLimit SP high limit value, scaled in PV units.
SPLLimit SP low limit value, scaled in PV units.
CVInitValue An initial value of the control variable output.
2. If you have the process model available, you can intuitively tune the IMC
control variable by entering the following four parameters.
Parameter Description
Model Gain A nonzero number (negative for direct acting control variable. positive for
reverse acting control variable).
Model Time Constant Always a positive number.
Model Deadtime Always a positive number.
Response Time Constant Always a positive number - used to tune the response of the IMC control
variable. A smaller number gives a faster response.
At this point, you have completed the basic configuration. You did not
configure the built-in tuner. The control variable is ready to be put online in
either Auto or Manual mode. For tuning, use the default settings. Refer to
IMC Function Block Tuning.
3. If you do not know the process model, you need to identify the model and
tune the control variable by using the built-in tuner (modeler) for the
control variable to operate correctly in the Auto mode.
The control variable uses a first order lag with deadtime internal process
model and a first order filter (total of four tuning parameters) to calculate
the CV. The CV is calculated such that the process variable (PV) follows a
first order lag trajectory when approaching the setpoint value.
Speed of response depends on the value of the response time constant. The
smaller that the response time constant is, the faster the control variable
response will be. The response time constant should be set such that the PV
reaches the setpoint in a reasonable time based on the process dynamics.
The larger that the response time constant is, the slower the control variable
response will be, but the control variable also becomes more robust. Refer to
IMC Function Block Tuning.
In the Manual mode, the CV is set equal to the operator-entered or
program-generated CVOper or CVProg parameter.
For the Manual to Auto mode bumpless transfer and for safe operation of
the control variable, the CV rate of change limiter is implemented such that
the CV cannot change from its current state any faster than the rate of
change limit parameter specified.
Rate limiting is not imposed when the control variable is in Manual mode
unless CVManLimiting is set.
See also
You may need to manually adjust the internal model parameters or the response
time constants. You can do so by changing the appropriate parameters and setting
the appropriate ModelInit bit. The internal states of the function block will be
initialized, and the bit will automatically reset.
For example, if you modify the IMC function block Model Gain for CV - PV, set
the ModelInit parameter to TRUE to initialize the CV - PV internal model
parameters and for the new model gain to take effect.
IMC Function Block The function block is equipped with an internal tuner (modeler). The purpose of
the tuner is to identify the process model parameters and to use these parameters
Tuning
as internal model parameters (gain, time constant, and deadtime). The tuner also
calculates an optimal response-time constant.
The tuner is started by setting the AtuneStart bit. You can stop the tuning by
setting the AtuneAbort bit. After the tuning is completed successfully, the
GainTuned, TCTuned, DTTuned, and RespTCTuned parameters are updated
with the tuning results, and the AtuneStatus code is set to indicate complete.
You can copy these parameters to the ModelGain, ModelTC, and ResponseTC,
respectively, by setting the AtuneUseModel bit. The function block will
automatically initialize the internal variables and continue normal operation. It
will automatically reset the AtuneUseModel bit.
See also
IMC Function Block Tuning If an error occurs during the tuning procedure, the tuning is aborted, and the
AtuneStatus bit is set. You can abort the tuning by setting the AtuneAbort bit.
Errors
After an abort, the CV will assume its value before the step change, and the
GainTuned, TCTuned, DTTuned, and RespTCTuned parameters are not
updated. The AtuneStatus parameter identifies the reason for the abort.
IMC Function Block Tuning Follow these steps to configure the tuner.
Procedure 1. Put the CV into Manual mode.
The MMC instruction controls two process variables to their setpoints using up
to three control variables. The MMC instruction calculates the control variables
(CV1, CV2, and CV3) in the auto mode based on the PV1 -SP1, PV2 - SP2
deviation, internal model, and tuning.
Available Languages
Ladder Diagram
Function Block
Structured Text
MMC(MMC_tag);
Operands
Function Block
Structured Text
Structure
The following table describes the input parameters in the MMC function block.
CVManLimiting BOOL Limit CV(n), where (n) can be 1, 2, or 3, in Manual Default = FALSE
mode. If Manual mode and CVManLimiting is
TRUE, CV(n) will be limited by the CV(n)HLimit
and CV(n)LLimit values.
CV1EUMax REAL Maximum value for CV1EU. The value of CV1EU Valid = any float
that corresponds to 100% CV1. Default = 100.0
If CVEUMax = CVEUMin, set bit in Status.
CV2EUMax REAL Maximum value for CV2EU. The value of CV2EU Valid = any float
that corresponds to 100% CV2. Default = 100.0
If CVEUMax = CVEUMin, set bit in Status.
CV3EUMax REAL Maximum value for CV3EU. The value of CV3EU Valid = any float
that corresponds to 100% CV3. Default = 100.0
If CVEUMax = CVEUMin, set bit in Status.
CV1EUMin REAL Minimum value of CV1EU. The value of CV1EU Valid = any float
that corresponds to 0% CV1. Default = 0.0
If CVEUMax = CVEUMin, set bit in Status.
CV2EUMin REAL Minimum value of CV2EU. The value of CV2EU Valid = any float
that corresponds to 0% CV2. Default = 0.0
If CVEUMax = CVEUMin, set bit in Status.
CV3EUMin REAL Minimum value of CV3EU. The value of CV3EU Valid = any float
that corresponds to 0% CV3. Default = 0.0
If CVEUMax = CVEUMin, set bit in Status.
CV1HLimit REAL CV1 high limit value. This is used to set the Valid = CV1LLimit <
CV1HAlarm output. It is also used for limiting CV1 CV1HLimit ≤ 100.0
when in Auto mode or in Manual if Default = 100.0
CVManLimiting is TRUE.
• If CV1LLimit < 0, if CV1HLimit > 100, if
CV1HLimit < CV1LLimit, set bit in Status.
• If CV1HLimit < CV1LLimit, limit CV1 by using
the value of CV1LLimit.
CV2HLimit REAL CV2 high limit value. This is used to set the Valid = CV2LLimit <
CV2HAlarm output. It is also used for limiting CV2 CV2HLimit ≤ 100.0
when in Auto mode or in Manual if Default = 100.0
CVManLimiting is TRUE.
• If CV2LLimit < 0, if CV2HLimit > 100, if
CV2HLimit < CV2LLimit, set bit in Status.
• If CV2HLimit < CV2LLimit, limit CV2 by using
the value of CV2LLimit.
CV3PV1ModelInit BOOL Internal model initialization switch for CV3 - PV1. Default = FALSE
Refer to Function Block Attributes.
The following table describes the output parameters in the MMC function block.
Description
The MMC is a flexible model-based algorithm that can be used in two basic
configuration modes:
Item Description
M11 Internal model CV1 - PV1
M21 Internal model CV2 - PV1
M31 Internal model CV3 - PV1
M12 Internal model CV1 - PV2
M22 Internal model CV2 - PV2
M32 Internal model CV3 - PV2
T Target response
C11, C22 Model-predictive function blocks (IMC) currently controlling PV1 and
PV2 to SP1 and SP2, respectively
Y11, Y21, Y31, Y12, Y22, Model outputs of M11, M21, M31, M12, M22, M32
Y32
Y1 PV1 prediction
Y2 PV2 prediction
CV1 (Reflux ratio) Controls PV1 (Top composition) in Coordinated Control (CC1).
CV2 (Stream Flow) Controls PV2 (Bottom composition) in Coordinated Control (CC2)
CV3 Drives the Target value through a target response.
No
Major/Minor Faults
None specific to this instruction. See Index Through Arrays for Array-Indexing
Faults
Execution
Note that iin Structured Text, EnableIn is always true during a normal scan.
Therefore, if the instruction is in the control path activated by the logic, it will
execute.
All conditions below the shaded area can only occur during Normal Scan mode.
Native Implementation
Example
Function Block
Structured Text
mmcTag.PV1 := mmcInput1;
mmcTag.PV2 := mmcInput2;
mmcTag.SP1Prog := mmcInput3;
mmcTag.SP2Prog := mmcInput4;
mmcTag.CV1Prog := mmcInput5;
mmcTag.CV2Prog := mmcInput6;
mmcTag.CV3Prog := mmcInput7;
MMC(mmcTag);
mmcOutput1 := mmcTag.CV1EU;
mmcOutput2 := mmcTag.CV2EU;
mmcOutput3 := mmcTag.CV3EU;
See also
MMC Function Block Starting with the default configuration, configure the following parameters.
Configuration Parameter Description
PV1EUMax Maximum scaled value for PV1.
PV1EUMin Minimum scaled value for PV1.
PV2EUMax Maximum scaled value for PV2.
PV2EUMin Minimum scaled value for PV2.
SP1HLimit SP1 high limit value, scaled in PV units.
SP1LLimit SP1 low limit value, scaled in PV units.
SP2HLimit SP2 high limit value, scaled in PV units.
SP2LLimit SP2 low limit value, scaled in PV units.
CV1InitValue An initial value of the control variable CV1 output.
CV2InitValue An initial value of the control variable CV2 output.
CV3InitValue An initial value of the control variable CV3 output.
If you have the process models available, you can intuitively tune the MMC
function block by entering the following parameters. At this point, you have
completed the basic configuration. You did not configure the built-in tuner. The
function block variables are ready to be put on-line in either auto or Manual mode.
For tuning, the default settings will be used.
If you do not know the process models, you need to identify the models and tune
the function block by using the built-in tuner (modeler) for the function block to
operate correctly in the Auto mode.
Parameter Description
ModelGains Nonzero numbers (negative for direct acting control variable, positive
for reverse acting control variable)
ModelTimeConstants Always positive numbers
ModelDeadtimes Always positive numbers
RespTimeConstants Always positive numbers
Active 1st, 2nd and 3rd CV for PV1 and PV2 Specify the order in which CV's will be used to compensate for PV - SP
error.
TargetCV Specify which CV will be driven to its target value.
CVTargetValues Specify to which values should the control variable drive the
individual CV's if selected as the TargetCV.
TargetRespTC Specify the speed of CV's to approach the target values.
For integrating process types (such as level control and position control), internal
nonintegrating models are used to approximate the integrating process. The
Factor parameters are used to convert the identified integrating process models to
nonintegrating internal models used for CV calculation. This is necessary to
provide for stable MMC execution. The MMC function block can handle any
combinations of PV1 and PV2 that are integrating or nonintegrating process
types.
The function block uses first order lag with deadtime internal process models and
first order filters (total of up to 24 tuning parameters-6 models, 4 parameters each)
to calculate the CV's. Each CV is calculated such that each process variable (PV)
follows a first order lag trajectory when approaching the setpoint value.
Speed of response depends on the value of the response time constants. The
smaller the response time constants, the faster the control variable response will be.
The response time constants should be set such that the PV's reach the setpoints in
reasonable time based on the process dynamics. The larger that the response time
constants, the slower the control variable response will be, but the control variable
also becomes more robust.
In the Manual mode, the control variables (CV) are set equal to the operator-
entered Manual CV parameters. For the Manual to Auto mode bumpless transfer
and for safe operation of the control variable, the CV rate of change limiters are
implemented such that CV's cannot move from current states by more than
specified CV units at each scan.
You may need to manually adjust the internal model parameters or the response
time constants. You can do so by changing the appropriate parameters and setting
the appropriate ModelInit bit. The internal states of the function block will be
initialized, and the bit will automatically reset.
For example, if you modify the model for CV2 - PV1 model, set the
CV2PV1ModelInit parameter to TRUE to initialize the CV2 - PV1 internal
model parameters and for the new model to take effect.
MMC Function Block Tuning The MMC function block is equipped with an internal tuner (modeler). The
purpose of the tuner is to identify the process model parameters and to use these
parameters as internal model parameters (gain, time constant, and deadtime). The
tuner also calculates an optimal response time constant.
Set the tuner by configuring the following parameters for each CV - PV process.
The tuner is started by setting the AtuneStart bit (AtuneCV1Start, for example).
You can stop the tuning by setting the appropriate AtuneAbort bit.
You can copy these parameters to the ModelGain, ModelTC, ModelDT, and
RespTC, respectively, by setting the AtuneUseModel bit. The MMC function
block automatically initializes the internal variables and continue normal
operation. It automatically resets the AtuneUseModel bit.
See also
Use an MMC Function The following example describes using an MMC function block to control a
splitter. Refer to the MMC Function Block Splitter Example Configuration in
Block for Splitter Control
Module Multivariable Control ( MMC).
Item Description
PV1 Top composition (more important)
PV2 Bottom composition (less important)
Active 1st CV for PV1 CV1 (reflux ratio)
Active 2nd CV for PV1 CV3 (pressure setpoint)
Active 3rd CV for PV1 CV2 (steam (flow)
Active 1st CV for PV2 CV2
Active 2nd CV for PV2 CV3
Active 3rd CV for PV2 CV1
TargetCV CV3 (pressure should be held constant if possible)
CV3Target 60% (of pressure range)
The MMC calculates CV1, CV2, and CV3 so that the control goals are
accomplished in the following order of importance:
1. Control PV1 to SP1 (PV1 is always considered more important than PV2)
CV1 is selected as the most active control for PV1 and CV2 as the most active for
PV2. If either CV1 or CV2 saturates or is put in Manual mode, the control
variable will use CV3 to maintain PV1 and PV2 at the setpoints.
See also
MMC Function Block Tuning If an error occurs during the tuning procedure, the tuning is aborted, and an
appropriate AtuneStatus bit is set. Also, a user can abort the tuning by setting the
Errors
AtuneAbort parameter.
After an abort, the CV assumes its value before the step change, and the
GainTuned, TCTuned, DTTuned, and RespTCTuned parameters are not
updated. The AtuneStatus parameter identifies the reason for the abort.
MMC Function Block Tuning Follow these steps to configure the tuner.
Procedure 1. Put all three CV parameters into Manual mode.
To identify models and to calculate response time constants for all six CV - PV
processes, run the tuner up to three times to obtain CV1 - PV2, CV2 - PV2, and
CV3 - PV2 models and tuning, respectively. After each run, two process models
are identified: CV - PV1 and CV - PV2 (two process variables respond as a result
of one CV step change)
Current SP The current SP is based on the Cascade/Ratio mode, the PVTracking value, auto
mode, and the ProgOper value.
Use the Coordinated Control This is an example of how you could use the Coordinated Control function block
Function Block to Control to control the temperature in a process.
Name Description
PV Temperature
Act1stCV CV3 (high pressure steam)
Act2ndCV CV2 (cooling)
Act3rdCV CV1 (low pressure steam)
Target1stCV CV2
Target2ndCV CV3
Target3rdCV CV1
CV1Target 0%
This value is irrelevant since in the target list setup, CV1 has the lowest priority, and will assume the steady state
load to maintain PV at the setpoint.
CV2Target 0%
CV3Target 10%
Manipulating the PV at the setpoint is the top priority. The high pressure steam
and cooling are selected as the most active actuators. At steady state, the same two
controls should assume their target values: CV3 at 10% and CV2 at 0%. CV1 will
assume any value needed to maintain PV at the setpoint; therefore, its target value
is irrelevant since manipulating the PV at the setpoint is a higher priority control
objective. Target CV priorities and target CV values can be changed on-line.
The CC function block calculates CV1, CV2 and CV3 such that the control goals
are accomplished in the following order of importance:
1. Control PV to SP
At this point, you have completed the basic configuration. You did not configure
the built-in tuner. The control variable is ready to be put on-line in either auto or
Manual mode. For tuning, the default settings will be used. Refer to CC Function
Block Tuning.
If you do not know the process models, you need to identify the models and tune
the function block by using the built-in tuner (modeler) for the function block to
operate correctly in the Auto mode.
The function block uses first order lag with deadtime internal process models and
first order filters (total of up to twelve tuning parameters) to calculate the CV's.
Each CV is calculated such that the process variable (PV) follows a first order lag
trajectory when approaching the setpoint value.
Speed of response depends on the value of the response time constants. The
smaller the response time constants, the faster the control variable response will be.
The response time constants should be set such that the PV reaches the setpoint in
reasonable time based on the process dynamics. The larger the response time
constants are, the slower the control variable response will be, but the control
variable also becomes more robust. See the tuning section for more details.
In the Manual mode, the control variables (CV) are set equal to the operator-
entered or program-generated CVnOper or CVnProg parameters. For the Manual
to Auto mode bumpless transfer and for safe operation of the control variable, the
CV rate of change limiters are implemented such that CV's cannot move from
current states by more than specified CV units at each scan.
Rate limiting is not imposed when control variable is in Manual mode unless
CVManLimiting is set.
See also
CV High/Low Limiting The instruction always performs alarming based on CVHLimit and CVLLimit.
Limit CV by CVHLimit and CVLLimit when in auto or cascade/ratio mode.
When in manual mode, limit CV by CVHLimit and CVLLimit when
CVManLimiting is set. Otherwise limit CV by 0 and 100%.
Item Description
CVHAlarm is cleared(1)
CVLAlarm is cleared(1)
CVHAlarm is set
CVLAlarm is set
Item Description
If CVHAlarm is set
CV = CVHLimit
If CVLAlarm is set
CV = CVLLimit
CV from 0 to 100% limit algorithm
(1) During instruction first scan, the instruction clears the alarm outputs.
CV Percent Limiting The following diagram illustrates how the instruction determines CV percent
limiting.
Item Description
CVHAlarm is cleared(1)
CVLAlarm is cleared(1)
CVHAlarm is set
CVLAlarm is set
CV is less than 0
Item Description
If CVHAlarm is set
CV = 100
If CVLAlarm is set
CV = 100
CV from windup algorithm
CVHAlarm
CVLAlarm
CV limited to 0 to 100%
(1) During instruction first scan, the instruction clears the alarm outputs.
CV Rate-of-Change Limiting The PIDE instruction limits the rate-of-change of CV when in Auto or
Cascade/Ratio mode or when in Manual mode and CVManLimiting is set. A
value of zero disables CV rate-of-change limiting.
CV Windup Limiting Limit the CV such that its value cannot increase when WindupHIn is set or
decrease when WindupLIn is set. These inputs are typically the WindupHOut or
WindupLOut outputs from a secondary loop. The WindupHIn and WindupLIn
inputs are ignored if CVInitializing, CVFault, or CVEUSpanInv is set.
Item Description
selected CV
WindupHIn
WindupLIn
5. When CVInitializing and ManualAfterInit are set, the instruction disables auto and cascade/ratio modes. If the
current mode is not Override or Hand mode, the instruction changes to Manual mode. If ManualAfterInit is
cleared the mode is not changed.
6. All the operator request inputs are cleared.
7. If ProgValueReset set, all the program request inputs are cleared
8. All the PV high-low, PV rate-of-change, and deviation high-low alarm outputs are cleared.
9. If CVInitReq is cleared, CVInitializing is cleared.
Instruction first run ProgOper is cleared. ProgOper is cleared.
The instruction changes to manual mode. The instruction changes to manual mode.
EnableIn is cleared EnableOut is cleared, the instruction does nothing, and the N/A
outputs are not updated.
EnableIn is set The instruction executes. EnableIn is always set.
EnableOut is set. The instruction executes.
Postscan No action taken. No action taken.
See also
Switch Between Program The PIDE instruction can be controlled by either a user program or an operator
interface. You can change the control mode at any time. Program and
Control and Operator Control
Operator control use the same ProgOper output. When ProgOper is set, control
is Program; when ProgOper is cleared, control is Operator.
The following diagram shows how the PIDE instruction changes between
Program control and Operator control.
See also
Operating Modes The Cascade/Ratio, Auto, and Manual modes can be controlled by a user program
when in Program control or by an operator interface when in Operator control.
The Override and Hand modes have a mode request input that can only be
controlled by a user program; these inputs operate in both Program and Operator
control.
Auto While in Auto mode the instruction computes the change in CV. The instruction regulates CV
to maintain PV at the SP value. If in program control, SP = SPProg; if in Operator control, SP
= SPOper.
Select Auto mode using either OperAutoReq or ProgAutoReq:
Set OperAutoReq to request Auto mode. Ignored when ProgOper, ProgOverrideReq,
ProgHandReq, or OperManualReq is set.
Set ProgAutoReq to request Auto mode. Ignored when ProgOper is cleared or when
ProgOverrideReq, ProgHandReq, or ProgManualReq is set.
Manual While in Manual mode the instruction does not compute the change in CV. The value of CV is
determined by the control. If in Program control, CV = CVProg; if in Operator control, CV =
CVOper.
Select Manual mode using either OperManualReq or ProgManualReq:
Set OperManualReq to request Manual mode. Ignored when ProgOper, ProgOverrideReq,
or ProgHandReq is set.
Set ProgManualReq to request Manual mode. Ignored when ProgOper is cleared or when
ProgOverrideReq or ProgHandReq is set.
Override While in Override mode the instruction does not compute the change in CV. CV = CVOverride,
regardless of the control mode. Override mode is typically used to set a “safe state” for the
PID loop.
Select Override mode using ProgOverrideReq:
Set ProgOverrideReq to request Override mode. Ignored when ProgHandReq is cleared.
Hand While in Hand mode the PID algorithm does not compute the change in CV. CV = HandFB,
regardless of the control mode. Hand mode is typically used to indicate that control of the
final control element was taken over by a field hand/auto station.
Select Hand mode using ProgHandReq:
Set ProgHandReq to request hand mode. This value is usually read as a digital input from
a hand/auto station.
Convert the PV and SP Values to The instruction converts PV and SP to a percent and calculates the error before
performing the PID control algorithm. The error is the difference between the PV
Percent
and SP values. When ControlAction is set, the values of EPercent, E, and
PVPIDPercent are negated before being used by the PID algorithm.
Primary Loop Control Primary loop control is typically used by a primary PID loop to obtain bumpless
switching and anti-reset windup when using Cascade/Ratio mode. The primary
loop control includes the initialize primary loop output and the anti-reset windup
outputs. The InitPrimary output is typically used by the CVInitReq input of a
primary PID loop. The windup outputs are typically used by the windup inputs of
a primary loop to limit the windup of its CV output.
Item Description
InitPrimary is cleared
WindupHOut is cleared(4)
Item Description
WindupLOut is cleared(4)
InitPrimary is set(1)
WindupHOut is set
WindupLOut is set
4. During instruction first scan, the instruction clears the windup outputs.
The instruction also clears the windup outputs and disables the CV windup
algorithm when CVInitializing is set or if either CVFaulted or
CVEUSpanlnv is set.
Processing Faults The following table describes how the instruction handles execution faults:
PVSpanInv is set or • Disable the Auto and Cascade/Ratio modes. If Override or Hand is not the current mode,
SPLimitsInv is set set to Manual mode.
• Do not compute PV and SP percent.
• PID control algorithm is not executed.
• Set CV to value by determined by Program or Operator control and mode (Manual,
Override, or Hand).
RatioLimitsInv is set and • If not already in Hand or Override, set to Manual mode.
CasRat is set and UseRatio is • Disable the Cascade/Ratio mode.
set
• Set CV to value determined by Program or Operator control and mode (Manual, Override,
or Hand).
TimingModeInv is set or • If not already in Hand or Override, set to Manual mode.
RTSTimeStampInv is set or
DeltaTInv is set
See also
Once the PID algorithm has been executed, select the CV based on program or
operator control and the current PID mode.
Update the CVOper and CVProg If not in the Operator Manual mode, the PIDE instruction sets CVOper = CV.
Values This obtains bumpless mode switching from any control to the Operator Manual
mode.
Select the Setpoint Once the instruction determines program or operator control and the PID mode,
the instruction can obtain the proper SP value.
SP High/Low Limiting The high-to-low alarming algorithm compares SP to the SPHLimit and SPLLimit
alarm limits. SPHLimit cannot be greater than PVEUmaximum and SPLLimit
cannot be less than PVEUMin.
Drives
Available Instructions
Ladder Diagram
Not available
See also
Integrator (INTG) 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.
Available Languages
Ladder Diagram
Function Block
Structured Text
INTG(INTG_tag);
Operands
Function Block
INTEGRATOR Structure
RTSTimeStamp DINT Module time stamp value for real time sampling mode.
Valid = 0 to 32,767ms
Default = 0
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The INTG instruction is designed to execute in a task where the scan rate remains
constant.
The INTG instruction executes this control algorithm when Initialize is cleared
and DeltaT > 0.
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value. The internal parameters are not updated.
In each subsequent scan, the output is computed using the internal parameters
from the last scan when the output was valid.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
In the chart below, the input to the block moves from 0 to +200 units. During this
period, the output of the block integrates to 2800 units. As In changes from +200
units to 0 units, Out maintains at 2800 units. When In transitions from 0 to -300
units, Out slowly integrates down to -1400 units until In transitions back to 0.
Finally, as In moves from 0 to +100, Out integrates back to 0 where In is set to 0
coincidentally with Out reaching 0.
The following example shows how the INTG instruction can be used. In many
instances, the HighLimit and LowLimit inputs limit the total percentage of
control that the integral gain element might have as a function of the regulator’s
total output. The HoldHigh and HoldLow inputs, on the other hand, can be used
to prevent the output from moving further in either the positive or negative
direction. The HoldHigh and HoldLow inputs prevent the INTG instruction
Function Block
This example is the minimal legal programming of the INTG function block and
is only used to show the neutral text and generated code for this instruction. This
is for internal purposes only and is not a testable case.
Structured Text
INTG_01.In := Input_Value;
INTG_01.Initialize := Initialize_flag;
INTG_01.InitialValue := Int_Init_Val;
INTG_01.IGain := I_Gain;
INTG_01.HighLimit := Int_saturate_high;
INTG_01.LowLimit := Int_saturate_low;
INTG_01.HoldHigh :=HAlarm_Status;
INTG_01.HoldLow := LAlarm_Status;
INTG(INTG_01);
See also
Proportional + Integral (PI) 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 PI instruction provides two methods of operation. The first method follows
the conventional PI algorithm in that the proportional and integral gains remain
constant over the range of the input signal (error). The second method uses a non-
linear algorithm where the proportional and integral gains vary over the range of
the input signal. The input signal is the deviation between the setpoint and
feedback of the process.
Available Languages
Ladder Diagram
Function Block
Structured Text
PI(PI_tag);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
PROP_INT Structure
DeltaT REAL Elapsed time between updates. This is the elapsed time in seconds used by the control
algorithm to calculate the process output.
Status DINT Status of the function block.
InstructFault BOOL The instruction detected one of the following execution errors. This is not a minor or
(Status.0) major controller error. Check the remaining status bits to determine what occurred.
KpInv (Status.1) BOOL Kp < minimum or Kp > maximum.
WldInv (Status.2) BOOL Wld < minimum or Wld > maximum.
HighLowLimsInv BOOL HighLimit LowLimit.
(Status.3)
ShapeKpPlusInv BOOL ShapeKpPlus < minimum or ShapeKpPlus > maximum.
(Status.4)
ShapeKpMinusInv BOOL ShapeKpMinus < minimum or ShapeKpMinus > maximum.
(Status.5)
KpInRangeInv BOOL KpInRange < minimum or KpInRange > maximum.
(Status.6)
ShapeWldPlusInv BOOL ShapeWldPlus < minimum or ShapeWldPlus > maximum.
(Status.7)
ShapeWldMinusIn BOOL ShapeWldMinus < minimum or ShapeWldMinus > maximum.
v (Status.8)
WldInRangeInv BOOL WldInRange < minimum or WldInRange > maximum.
(Status.9)
TimingModeInv BOOL Invalid TimingMode.
(Status.27) For more information about timing modes, see Function Block Attributes.
RTSMissed BOOL Only used in real time sampling mode. Set when
(Status.28) ABS | DeltaT - RTSTime | > 1 (.001 second).
RTSTimeInv BOOL Invalid RTSTime value.
(Status.29)
Description
The PI instruction uses the position form of the PI algorithm. This means the gain
terms are applied directly to the input signal, rather than to the change in the
input signal. The PI instruction is designed to execute in a task where the scan rate
remains constant.
In the non-linear algorithm, the proportional and integral gains vary as the
magnitude of the input signal changes. The PI instruction supports two non-linear
gain modes: linear and parabolic. In the linear algorithm, the gains vary linearly as
the magnitude of input changes. In the parabolic algorithm, the gains vary
according to a parabolic curve as the magnitude of input changes.
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value and sets the math overflow status flag. The
internal parameters are not updated. In each subsequent scan, the output is
computed using the internal parameters from the last scan when the output was
valid.
In linear mode, the non-linear gain mode is disabled. The Kp and Wld values are
the proportional and integral gains used by the instruction. The instruction
calculates the value for Out using these equations:
Value Equation
ITerm
In non-linear mode, the instruction uses the non-linear gain mode selected by
ParabolicLinear to compute the actual proportional and integral gains.
The gains specified by Kp and Wld are multiplied by 1.0 when In = 0. Separate
proportional and integral algorithms increase or decrease the proportional or
integral gain as the magnitude of error changes. These algorithms use the input
range and shaping gain parameters to compute the actual proportional and
integral gains. Input range defines the range of In (i.e. error) over which the gain is
shaped. Input ranges are set by the two KpInRange and WldInRange. Shaping
gain defines the gain multiplier for the quadrant controlled by the shaping gain
parameter. Shaping gains are set by ShapeKpPlus, ShapeKpMinus, ShapeWldPlus
and ShapeWldMinus.
To configure a particular shaping gain curve, enter a shaping gain 0.0-10.0 for
integral shaping, a shaping gain 0.1-10.0 for proportional shaping, and the input
range over which shaping is to be applied. Kp and Wld are multiplied by the
calculated ShapeMultiplier to obtain the actual proportional and integral gains.
Entering a shaping gain of 1.0 disables the non-linear algorithm that calculates the
proportional or integral gain for the quadrant.
The following diagram illustrates the maximum and minimum gain curves that
represent the parabolic and linear gain equations.
The instruction calculates the value for Out using these equations:
Value Equation
Kp shaping gain multiplier
Kp input ratio
Kp ratio
Proportional output
Wld input
Wld ratio
Wlds limits
Integral output
Output
Limiting
The instruction stops the ITerm windup based on the state of the hold inputs.
Condition Action
The instruction also stops integrator windup based on the HighLimit and
LowLimit values.
Condition Action
Integrator > HighLimit Integrator = HighLimit
Integrator > LowLimit Integrator = LowLimit
The instructions limits the value of Out based on the HighLimit and LowLimit
values.
Condition Action
HighLimit LowLimit Out = LowLimit
ITerm = LowLimit
HighLowLimsInv is set
HighAlarm is set
LowAlarm is set
WldInput = 0
Out HighLimit Out = HighLimit
ITerm = ITerm n-1
HighAlarm is set
ITerm > HighLimit ITerm = HighLimit
Out LowLimit Out = LowLimit
ITerm = ITerm n-1
LowAlarm is set
ITerm < LowLimit ITerm = LowLimit
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Function Block
Structured Text
Reference_Select.In1 := Master_Machine_Ref;
Reference_Select.Select1 := Master_Machine_Select;
Reference_Select.In2 := Section_Jog;
Reference_Select.Select2 := Jog_Select;
SSUM(Reference_Select);
S_Curve.In := Reference_Select.Out;
S_Curve.AccelRate := accel_rate;
S_Curve.DecelRate := accel_rate;
SCRV(S_Curve);
PMUL_01.In := Resolver_Feedback;
PMUL_01.WordSize := 12;
PMUL_01.Multiplier := 100000;
PMUL(PMUL_01);
Speed_Feedback := PMUL_01.Out;
Velocity_Error := S_Curve.Out - Speed_Feedback;
PI_01.In := Velocity_Error;
PI_01.Initialize := Enable_Regulator;
PI_01.Kp := Velocity_Proportional_Gain;
PI_01.Wld := Velocity_Integral_Gain;
PI(PI_01);
Torque_Reference := PI_01.Out;
See also
Pulse Multiplier (PMUL) 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 PMUL instruction provides an interface from a position input module, such
as a resolver or encoder feedback module, to the digital system by computing the
change in input from one scan to the next. By selecting a specific word size, you
configure the PMUL instruction to differentiate through the rollover boundary in
a continuous and linear fashion.
Available Languages
Ladder Diagram
Function Block
Structured Text
PMUL(PMUL_tag);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
PULSE_MULTIPLIER Structure
Mode BOOL The mode input. Set to enable Relative mode. Clear to enable Absolute mode.
Default is set.
WordSize DINT The word size in bits. Specify the number of bits to use when computing (In n -In n-1 ) in
Relative mode.
WordSize is not used in Absolute mode.
When the change in In is greater than 1/2 * 2(Wordsize-1), Out changes sign.
When WordSize is invalid,Out is held and the instruction sets the appropriate bit in
Status.
Valid = 2 to 32
Default = 14
Multiplier DINT The multiplier. Divide this value by 100,000 to control the ratio of In to Out. If invalid,
the instruction limits the value and sets the appropriate bit in Status.
Valid = -1,000,000 to 1,000,000
Default = 100,000
Description
In Relative mode, the instruction’s output is the differentiation of the input from
scan to scan, multiplied by the (Multiplier/100,000). In Relative mode, the
instruction saves any remainder after the divide operation in a scan and adds it
back in during the next scan. In this manner, position information is not lost over
the course of the operation.
In the Absolute mode, the instruction can scale an input, such as position, without
losing any information from one scan to the next.
The PMUL instruction uses these equations to calculate Out in either relative or
absolute mode:
Out = INT_Out
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
Example 1
The most common use of the PMUL instruction is in the relative mode of
operation. In this mode, the PMUL instruction serves several purposes. First, in
the relative mode, the PMUL instruction differentiates the information that it
receives at its input from scan to scan. As data is received, the instruction outputs
the difference of the input from one scan to the next. This means that if In = 500
at scan "n", and then In = 600 at scan "n+1", Out = 100 at scan "n+1."
raw data coming from the feedback module, the rotation of the feedback device
might be represented as shown below:
In this example, as the value of the feedback data moves from 2047 to -2048, the
effective change in position is equivalent to a jump of 4095 counts in position. In
reality, however, this change in position is only 1 part in 4096 in terms of the
rotation of the resolver feedback device. By understanding the true word size of
the data that is being input from the feedback module, the PMUL instruction
views the data in a rotary fashion as shown in the following diagram:
By knowing the word size of the data that is input to this block, the PMUL
instruction differentiates an output of 1 count as the input to the block moves
from 2047 to -2048, instead of the mathematically calculated 4095.
Tip: When applying this block, it is important to note that the feedback data should not change by more than one-
half of the word size from one scan to the next, if rotational direction is to be properly differentiated.
The third attribute of the pulse multiplier block is that it retains the fractional
components from one scan to the next of any remainders that exist as a result of
the Multiplier/100,000 scaling factor. As each execution of the block is completed,
the remainder from the previous scan is added back into the total of the current
value so that all counts or "pulses" are ultimately accounted for and no data is lost
in the system. The output of the block, Out always yields a whole number in a
floating point data type.
Function Block
Structured Text
MUL_02.In := Position_feedback;
PMUL_02.Initalize := Initialize_Position;
PMUL_02.WordSize := 12;
PMUL_02.Multiplier := 25000;
PMUL(PMUL_02);
UPDN_02.Initialize := Initialize_Position;
UPDN_02.InPlus := PMUL_02.Out;
UPDN(UPDN_02);
Total_Position := UPDN_02.Out;
Example 2
In this electronic line shaft application, motor A’s feedback acts as a master
reference which motor B needs to follow. Motor A’s feedback is aliased to
"Position_feedback." Motor B’s feedback is aliased to "Follower_Position." Due to
the multipliers of both instructions being a ratio of 1/4, motor B needs to rotate
once for every four revolutions of Motor A in order to maintain an accumulated
value of zero in the UPDN accumulator. Any value other than zero on the output
of the UPDN instruction is viewed as Position_error and can be regulated and
driven back out to motor B in order to maintain a phase-lock between the two
motors.
Function Block
Structured Text
PMUL_02.In := Position_feedback;
PMUL_02.Initalize := Initialize_Position;
PMUL_02.WordSize := 12;
PMUL_02.Multiplier := 25000;
PMUL(PMUL_02);
PMUL_03.In := Follower_Position;
PMUL_03.Initalize := Initialize_Position;
PMUL_03.WordSize := 12;
PMUL_03.Multiplier := 100000;
PMUL(PMUL_03);
UPDN_02.Initialize := Initialize_Position;
UPDN_02.InPlus := PMUL_02.Out;
UPDN_02.InMinus := PMUL_03.Out;
UPDN(UPDN_02);
288 Rockwell Automation Publication 1756-RM006K-EN-P - November 2018
Drives Chapter 2
Position_error := UPDN_02.Out;
See also
S-Curve (SCRV) 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 SCRV instruction performs a ramp function with an added jerk rate. The jerk
rate is the maximum rate of change of the rate used to ramp output to input.
Available Languages
Ladder Diagram
Function Block
Structured Text
SCRV(SCRV_tag);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information of the syntax of expressions
within structured text.
S_CURVE Structure
Description
The primary requirement of the SCRV instruction is to ensure that the rate never
changes by more than the specified jerk rate.
You can configure the SCRV instruction to produce an S-Curve profile or a Ramp
profile for a step input.
S-Curve Profile
To produce an S-Curve profile, set JerkRate such that (JerkRate * DeltaT) <
AccelRate and/or DecelRate.
In S-Curve profile mode, the SCRV instruction ensures that the rate never
changes more than the specified JerkRate. The algorithm used to produce the S-
Curve profile is designed to produce a smooth, symmetric S-Curve for a step
input. A trapezoidal integration of Out is incorporated to facilitate this. As a
result, changes in Rate will be less than JerkRate during portions of the profile.
When a step change occurs on the input, rate is increased to the programmed
AccelRate or DecelRate. The AccelRate or DecelRate is maintained until a point
at which rate must begin decreasing in order for the output to reach input when
rate reaches zero.
In some cases, depending on the values of acceleration, deceleration, and jerk, the
acceleration rate or deceleration rate might not be reached before the rate must
begin decreasing by jerk rate.
For very small step changes, the SCRV instruction will not attempt to produce an
'S' profile. In this mode the entire step will be output and Rate will reflect the
change in output. This behavior will occur if Out = In and the next step change to
In can be output with a rate less than or equal to the programmed JerkRate.
The SCRV instruction supports an algebraic ramp and an absolute value ramp.
For an algebraic ramp, the acceleration condition is defined by an input that is
becoming more positive, and the deceleration condition is defined by an input
that is becoming more negative. For an absolute value ramp, the acceleration
condition is defined by an input moving away from zero, and the deceleration
condition is defined by an input moving towards zero.
Ramp Profile
In Ramp Profile mode, the SCRV instruction always produces a rate of change
equal to the programmed AccelRate or DecelRate until the difference between
Out and In requires less then AccelRate or DecelRate to reach endpoint.
(1)
When Initialize is set, the instruction sets the following:
Outn = InitialValue
Outn-1 = Outn
Raten = 0
Raten-1 = 0
When HoldMode is cleared, Out is moving toward In, and HoldEnable is set,
(2)
the rate begins decreasing towards zero at the jerk rate. Due to the JerkRate, Out is
held at whatever value it had when the rate reached zero. When the Out is finally
held constant, it has a value that is different from the value it had the instant that
HoldEnable was set.
When HoldMode is set, Out is moving toward In, and HoldEnable is set, the rate
is immediately set to zero. Out is held at whatever value it had when HoldEnable
was set.
Reducing the JerkRate during a transition might cause Out to overshoot the In. If
overshoot occurs, it is the result of enforcing the entered JerkRate. You can avoid
an overshoot by decreasing JerkRate in small steps while tuning or by changing
JerkRate while Out = In (not during a transition).
The time that is required for Out to equal a change in the input is a function of
AccelRate, JerkRate, and the difference between In and Out.
In transition from an initial value to final value, Out goes through three regions. In
region 1 and region 3, the rate of change of Out is based on JerkRate. In region 2,
the rate of change of Out is based on AccelRate or DecelRate.
Region Equation
region 1
region 2
region 3
When:
the SCRV block does not reach the AccelRate or DecelRate. The Out does the
following:
where:
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Function Block
Structured Text
SSUM_01.In1 := Master_reference;
SSUM_01.Select1 := master_select;
SSUM_01.In2 := Jog_reference;
SSUM_01.Select2 := jog_select;
SSUM(SSUM_01);
select_out := SSUM_01.Out;
SCRV_01.In := select_out;
SCRV_01.AccelRate := accel;
SCRV_01.DecelRate := accel;
SCRV_01.JerkRate := jerk_rate;
SCRV(SCRV_01);
scurve_out := SCRV_01.Out
See also
Second-Order Controller This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
(SOC) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The SOC instruction is designed for use in closed loop control systems in a similar
manner to the PI instruction. The SOC instruction provides a gain term, a first
order lag, and a second order lead.
Available Languages
Ladder Diagram
Function Block
Structured Text
SOC(SOC_tag);
Operands
Function Block
SEC_ORDER_CONTROLLER Structure
Output
Parameter Data Type Description
EnableOut BOOL Indicates if instruction is enabled. Cleared to false if Out overflows.
Out REAL The calculated output of the algorithm.
HighAlarm BOOL The maximum limit alarm indicator. Set when the calculated value for Out
HighLimit and the output is clamped at HighLimit.
LowAlarm BOOL The minimum limit alarm indicator. Set when the calculated value for Out
LowLimit and the output is clamped at LowLimit.
DeltaT REAL Elapsed time between updates. This is the elapsed time in seconds used by
the control algorithm to calculate the process output.
Status DINT Status of the function block.
InstructFault BOOL The instruction detected one of the following execution errors. This is not a
(Status.0) minor or major controller error. Check the remaining status bits to determine
what occurred.
GainInv (Status.1) BOOL Gain < minimum positive float.
WLagInv BOOL WLag > maximum or WLag < minimum.
(Status.2)
WLeadInv BOOL WLead > maximum or WLead < minimum.
(Status.3)
ZetaLeadInv BOOL ZetaLead > maximum or ZetaLead < minimum.
(Status.4)
HighLowLimsInv BOOL HighLimit LowLimit.
(Status.5)
TimingModeInv BOOL Invalid timing mode.
(Status.27) For more information about timing modes, see Function Block Attributes.
RTSMissed BOOL Only used in real time sampling mode. Set when ABS | DeltaT - RTSTime | > 1
(Status.28) (.001 second).
Output
Parameter Data Type Description
RTSTimeInv BOOL Invalid RTSTime value.
(Satus.29)
RTSTimeStampInv BOOL Invalid RTSTimeStamp value.
(Status.30)
DeltaT (Status.31) BOOL Invalid DeltaT value.
Structured Text
See Structured Text Syntax for more information of the syntax of expressions
within structured text.
Description
The SOC instruction provides a gain term, a first order lag, and a second order
lead. The frequency of the lag is adjustable and the frequency and damping of the
lead is adjustable. The zero pair for the second order lead can be complex
(damping is less than unity) or real (damping to unity). The SOC instruction
is designed to execute in a task where the scan rate remains constant.
Parameter Limitations
Parameter Limit
WLead
Whenever the value computed for the output is invalid or NAN, the instruction
sets Out = the invalid value. The internal parameters are not updated. In each
subsequent scan, the output is computed using the internal parameters from the
last scan when the output was valid.
Limiting
If: Then:
HoldHigh is set and Integrator > Integrator n-1 Integrator = Integrator n-1
HoldLow is set and Integrator < Integrator n-1 Integrator = Integrator n-1
The instruction also stops integrator windup based on the HighLimit and
LowLimit values.
If: Then:
Integrator > IntegratorHighLimit Integrator = IntegratorHighLimit
where:
The instruction also limits the value of Out based on the HighLimit and
LowLimit values.
If: Then:
HighLimit LowLimit Out = LowLimit
Integrator = IntegratorLowLimit
HighLowLimsInv is set
HighAlarm is set
LowAlarm is set
Out HighLimit Out = HighLimit
IntegratorLowLimit n-1
HighAlarm is set
Out LowLimit Out = LowLimit
Integrator = Integrator n-1
LowAlarm is set
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The SOC instruction implements a first order lag filter followed by a PID
controller to implement a transfer function with an integration, a second order
zero, (lead,) and a first order pole (lag.) With this instruction, PID tuning is
simplified because the regulating terms are arranged so that you have WLead and
ZLead as inputs to the SOC instruction, rather than Kp, Ki, and Kd values. The
transfer function for the SOC instruction is:
Using the SOC instruction, PID tuning is simplified because the regulating terms
can be arranged so that you have WLead and ZLead as inputs to the SOC
instruction, rather than Kp, Ki, and Kd values. In this manner, the corner
frequencies of the controller/regulator are easier to adjust and setup against the
real world process. During startup, the natural frequency of the system and the
damping factor can be measured empirically or on-site. Afterward, the parameters
In the system above, if Wlead is set equal to the system natural frequency, and if
Wlag is set substantially above the desired crossover frequency, (> 5 times
crossover), the resulting system response would look like the following:
In an actual application, the steps in using and setting up this instruction include:
Recognize the type of process that is being controlled. If the system’s response to a
step function results in a high degree of ringing or can be characterized by the
process curve shown above, this block may provide the regulating characteristics
required for stable control.
Determine the natural frequency of the system/process. This can may be arrived at
empirically - or it might be measured on-site. Adjust WLead so that it corresponds
with, or is slightly ahead of, the natural frequency of the process itself.
Tune damping factor, Zlead, so that it cancels out any of the overshoot in the
system.
Move WLag out far enough past the system crossover frequency (>5 times) and
begin increasing overall Gain to achieve
Function Block
Structured Text
SOC_01.In := Process_Error;
SOC_01.Initialize := Regulator_Enable_Not;
SOC_01.Gain := Gain;
SOC_01.WLag := Lag_Radians_per_sec;
SOC_01.WLead := Lead_radians_per_sec;
SOC_01.ZetaLead := Damping_Factor;
SOC_01.HighLimit := Max_Out;
SOC_01.LowLimit := Min_Out;
SOC(SOC_01);
SOC_Out := SOC_01.Out;
See also
Up/Down Accumulator This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
(UPDN) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The UPDN instruction adds and subtracts two inputs into an accumulated value.
Available Languages
Ladder Diagram
Function Block
Structured Text
UPDN(UPDN_tag)
Operands
Function Block
UPDN Structure
Structured Text
See Structured Text Syntax for more information of the syntax of expressions
within structured text.
Description
Condition Action
Hold is cleared AccumValue n = AccumValue n-1 + InPlus - InMinus
and Out = AccumValue n
Initialize is
cleared
Hold is set and AccumValue n = AccumValue n-1
Initialize is Out = AccumValue n
cleared
Initialize is set AccumValue n = InitialValue
Out = AccumValue n
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The UPDN instruction integrates counts from one scan to the next. This
instruction can be used for simple positioning applications or for other types of
applications where simple integration is required to create an accumulated value
from a process’s differentiated feedback signal. In the example below,
Initial_Position is set to zero, while Differential_Position_Plus and
Differential_Position_Minus take varying values over a period of time. With this
instruction, InPlus and InMinus could also accept negative values.
Function Block
The derivative instruction calculates the amount of change of a signal over time in
per-second units. This instruction is often used in closed loop control to create a
feed forward path in the regulator to compensate for processes that have a high
degree of inertia.
Structured Text
UPDN_01.Initialize := Initialize_Position;
UPDN_01.InitialValue := Initial_Position;
UPDN_01.InPlus := Differential_Position_Plus;
UPDN_01.InMinus := Differential_Position_Minus;
UPDN(UPDN_01);
Position_Integrated := UPDN_01.Out;
See also
HMI Button Control (HMIBC) 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 HMI Button Control (HMIBC) instruction with a PanelView 5500
Human Machine Interface (HMI) to enable operators to initiate machine control
operations, such as jogging a motor or enabling a valve, with a high degree of
accuracy and determinism. The HMIBC instruction also provides built-in
communications diagnostics that permit the instruction to automatically reset if
the communications from the controlling HMI become unavailable.
To function, the Logix controller I/O configuration must include all of the
PanelView 5500 HMIs that need to interact with the HMIBC instruction.
Additionally, the application created for each PanelView 5500 HMI must include
button actions configured to reference each tag associated with the HMIBC
instructions.
Execute this instruction at least once per scan, and do not jump over.
The HMIBC tag has import and export formats for .L5K, .L5X, and .CSV.
Available Language
Ladder Diagram
Function Block
Tip: For the HMIBC tag, use only the Out parameter, and optionally, the ProgFB
parameter in Function Block diagrams.
Structured Text
Operands
HMIBC Structure
No
Major/Minor Faults
None specific to this instruction. See Index Through Arrays for array-indexing
faults.
Execution
Ladder Diagram
Function Block
Structured Text
Examples
Ladder Diagram
Function Block
Structured Text
HMIBC (HMIBC_Conv);
THEN Conv_Motor: = 1;
ELSE Conv_Motor : = 0;
END_IF;
See also
Filter
Available Instructions
Ladder Diagram
See also
Derivative (DERV) 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 DERV instruction calculates the amount of change of a signal over time in
per-second units.
Available Languages
Ladder Diagram
Function Block
Structured Text
DERV(DERV_tag);
Operands
Function Block
DERIVATIVE Structure
RTSMissed (Status.28) BOOL Only used in real time sampling mode. Set to
true when
ABS (DeltaT - RTSTime) > 1 millisecond.
RTSTimeInv (Status.29) BOOL Invalid RTSTime value.
RTSTimeStampInv BOOL Invalid RTSTimeStamp value.
(Status.30)
DeltaTInv (Status.31) BOOL Invalid DeltaT value.
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The DERV instruction supports a bypass input that lets you stop calculating the
derivative and pass the signal directly to the output.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
This example is the minimal legal programming of the DERV function block and
is only used to show the neutral text and generated code for this instruction.
This is for internal purposes only and is not a testable case.
Function Block
Structured Text
DERV_01.In := Speed_Reference;
DERV_01.Gain := Feedforward_Gain;
DERV(DERV_01);
See also
High Pass Filter (HPF) 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 HPF instruction provides a filter to attenuate input frequencies that are
below the cutoff frequency.
Available Languages
Ladder Diagram
Function Block
Structured Text
HPF(HPF_tag);
Operands
Function Block
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The HPF instruction uses the Order parameter to control the sharpness of the
cutoff. The HPF instruction is designed to execute in a task where the scan rate
remains constant.
Order = 2
Order = 3
Parameter Limitations
WLead first order
LowLimit
WLead second order
LowLimit
WLead third order
LowLimit
HighLimit
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value. When the value computed for the output
becomes valid, the instruction initializes the internal parameters and sets Out =
In.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The HPF instruction attenuates signals that occur below the configured cutoff
frequency. This instruction is typically used to filter low frequency "noise" or
disturbances that originate from either electrical or mechanical sources. You can
select a specific order of the filter to achieve various degrees of attenuation. Note
that higher orders increase the execution time for the filter instruction.
The following graphs illustrate the effect of the various orders of the filter for a
given cutoff frequency. For each graph, ideal asymptotic approximations are given
with gain and frequency in logarithmic scales. The actual response of the filter
approaches these curves but does not exactly match these curves.
This example is the minimal legal programming of the HPF function block and is
only used to show the neutral text and generated code for this instruction. This is
for internal purposes only and is not a testable case.
Filter Graph
1st order filter
Function Block
Structured Text
HPF_01.In := Velocity_Feedback;
HPF_01.WLead := Cutoff_frequency;
HPF_01.Order := 2;
HPF(HPF_01);
filtered_velocity_output := HPF_01.Out
See also
Low Pass Filter (LPF) 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 LPF instruction provides a filter to attenuate input frequencies that are above
the cutoff frequency.
Available Languages
Ladder Diagram
Function Block
Structured Text
LPF(LPF_tag);
Operands
Function Block
FILTER_LOW_PASS Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The LPF instruction uses the Order parameter to control the sharpness of the
cutoff. The LPF instruction is designed to execute in a task where the scan rate
remains constant.
Order = 2
Order = 3
Parameter Limitations
WLag first order
LowLimit
HighLimit
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value. When the value computed for the output
becomes valid, the instruction initializes the internal parameters and sets Out =
In.
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The LPF instruction attenuates signals that occur above the configured cutoff
frequency. This instruction is typically used to filter out high frequency "noise" or
disturbances that originate from either electrical or mechanical sources. You can
select a specific order of the filter to achieve various degrees of attenuation. Note
that higher orders increase the execution time for the instruction.
The following graphs illustrate the effect of the various orders of the filter for a
given cutoff frequency. For each graph, ideal asymptotic approximations are given
with gain and frequency in logarithmic scales. The actual response of the filter
approaches these curves but does not exactly match these curves.
This example is the minimal legal programming of the LPF function block and is
only used to show the neutral text and generated code for this instruction. This
is for internal purposes only and is not a testable case.
Filter Graph
1st order filter
Function Block
Structured Text
LPF_01.In := Velocity_Feedback;
LPF_01.WLag := Cutoff_frequency;
LPF(LPF_01);
filtered_velocity_output := LPF_01.Out;
See also
Notch Filter (NTCH) 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 NTCH instruction provides a filter to attenuate input frequencies that are at
the notch frequency.
Available Languages
Ladder Diagram
Function Block
Structured Text
NTCH(NTCH_tag);
Operands
Function Block
FILTER_NOTCH Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The NTCH instruction uses the Order parameter to control the sharpness of the
cutoff. The QFactor parameter controls the width and the depth ratio of the
notch. The NTCH instruction is designed to execute in a task where the scan rate
remains constant.
where i is the Order operator with these parameters limits (where DeltaT is in
seconds):
Parameter Limitations
WNotch second order
LowLimit
HighLimit
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value. When the value computed for the output
becomes valid, the instruction initializes the internal parameters and sets Out =
In.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The following diagram shows the ideal gain curve over a frequency range for a
specific center frequency and Q factor. As increases, the notch becomes wider and
shallower. As decreases; the notch becomes deeper and narrower. The instruction
may be set for an order of 2 or an order of 4. Higher orders take more execution
time.
This example is the minimal legal programming of the NTCH function block and
is only used to show the neutral text and generated code for this instruction. This
is for internal purposes only and is not a testable case.
Function Block
Structured Text
NTCH_01.In := frequency_input;
NTCH_01.WNotch := center_frequency;
NTCH_01.QFactor := Notch_width_depth;
NTCH(NTCH_01);
Notch_output := NTCH_01.Out;
See also
Second-Order Lead Lag This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
(LDL2) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The LDL2 instruction provides a filter with a pole pair and a zero pair. The
frequency and damping of the pole and zero pairs are adjustable. The pole or zero
pairs can be either complex (damping less than unity) or real (damping greater
than or equal to unity).
Available Languages
Ladder Diagram
Function Block
Structured Text
LDL2(LDL2_tag);
Operands
Function Block
LEAD_LAG_SEC_ORDER Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The LDL2 instruction filter is used in reference forcing and feedback forcing
control methodologies. The LDL2 instruction is designed to execute in a task
where the scan rate remains constant.
Order = 2
Parameter Limitations
WLead first order
LowLimit
HighLimit
Whenever the value computed for the output is invalid, NAN, or INF, the
instruction sets Out = the invalid value. When the value computed for the output
becomes valid, the instruction initializes the internal parameters and sets Out =
In.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The LDL2 instruction can attenuate between two frequencies or can amplify
between two frequencies, depending on how you configure the instruction. Since
the Lead and Lag frequencies can be set to values that are larger or smaller than
each other, this instruction may behave as a Lead-Lag block, or, as a Lag-Lead
block, depending on which frequency is configured first. Note that higher orders
increase the execution time for the filter instruction.
This example is the minimal legal programming of the LDL2 function block and is
only used to show the neutral text and generated code for this instruction. This
is for internal purposes only and is not a testable case.
Filter Graph
1st order lead-lag
(wLead < wLag)
Function Block
Structured Text
LDL2_01.In := frequency_input;
LDL2_01.WLead :=
Lead_frequency;
LDL2_01.WLag := Lag_frequency;
LDL2(LDL2_01);
Lead_lag_output := LDL2_01.Out;
See also
Select_Limit
Available Instructions
Ladder Diagram
See also
Enhanced Select (ESEL) 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 ESEL instruction lets you select one of as many as six inputs. Selection
options include:
Available Languages
Ladder Diagram
Function Block
Structured Text
ESEL(ESEL_tag);
Operands
Function Block
SELECT_ENHANCED Structure
In3Fault BOOL Bad health indicator for In3. If In3 is read from
an analog input, then In3Fault is normally
controlled by the fault status on the analog
input. If all the InnFault inputs are true, the
instruction sets the appropriate bit in Status,
the control algorithm is not executed, and Out
is not updated.
Default = false
In4Fault BOOL Bad health indicator for In4. If In4 is read from
an analog input, then In4Fault is normally
controlled by the fault status on the analog
input. If all the InnFault inputs are true, the
instruction sets the appropriate bit in Status,
the control algorithm is not executed, and Out
is not updated.
Default = false
In5Fault BOOL Bad health indicator for In5. If In5 is read from
an analog input, then In5Fault is normally
controlled by the fault status on the analog
input. If all the InnFault inputs are true, the
instruction sets the appropriate bit in Status,
the control algorithm is not executed, and Out
is not updated.
Default = false
In6Fault BOOL Bad health indicator for In6. If In6 is read from
an analog input, then In6Fault is normally
controlled by the fault status on the analog
input. If all the InnFault inputs are true, the
instruction sets the appropriate bit in Status,
the control algorithm is not executed, and Out
is not updated.
Default = false
InsUsed DINT Number of inputs used. This defines the
number of inputs the instruction uses. The
instruction considers only In1 through In InsUsed
in high select, low select, median select, and
average select modes. If this value is invalid,
the instruction sets the appropriate bit in
status. The instruction does not update Out if
InsUsed is invalid and if the instruction is not in
manual select mode and if Override is cleared.
Valid =1 to 6
Default = 1
Selector Mode DINT Selector mode input. This value determines the
action of the instruction.
0 = manual select
1 = High select
2 = Low select
3 = Median select
4 = Average select
If this value is invalid, the instruction sets the
appropriate bit in Status and does not update
Out.
Valid = 0 to 4
Default = 0
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
Condition Action
SelectorMode = 0 (manual select) or Out = In[OperSelector]
Override is true, ProgOper is false and SelectedIn = OperSelector
OperSelector is not equal to 0
SelectorMode = 0 (manual select) or Out = In[ProgSelector]
Override is true, ProgOper is true and SelectedIn = ProgSelector
ProgSelector is not equal to 0
SelectorMode = 1 (high select) and Out = maximum of In[InsUsed]
Override is false SelectedIn = index to the maximum input value
SelectorMode = 2 (low select) and Out = minimum of In[InsUsed]
Override is false SelectedIn = index to the minimum input value
SelectorMode = 3 (median select) and Out = median of In[InsUsed]
Override is false SelectedIn = index to the median input value
SelectorMode = 4 (average select) and Out = average of In[InsUsed]
Override is false SelectedIn = 0
For SelectorMode 1 through 4, a bad health indication for any of the inputs causes
that bad input to be disregarded in the selection. For example, if SelectorMode = 1
(high select) and if In6 had the highest value but had bad health, then the next
highest input with good health is moved into the output.
For high or low select mode, if two inputs are equal and are high or low, the
instruction outputs the first found input. For median select mode, the median
value always represents a value selected from the available inputs. If more than one
value could be the median, the instruction outputs the first found input.
The following diagram shows how the ESEL instruction changes between
Program control and Operator control.
(1) You can lock the instruction in Operator control mode by leaving
ProgOperReq true.
(2) You can lock the instruction in Program control mode by leaving
ProgProgReq true while ProgOperReq is false.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
This ESEL instruction selects In1, In2, or In3, based on the SelectorMode. In this
example, SelectorMode = 1, which means high select. The instruction determines
which input value is the greatest and sets Out = greatest In.
Function Block
Structured Text
ESEL_01.In1 := analog_input1;
ESEL_01.In2 := analog_input2;
ESEL_01.In3 := analog_input3;
ESEL_01.SelectorMode := 1;
ESEL(ESEL_01);
selected_value := ESEL_01.Out;
See also
High/Low Limit (HLL) 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 HLL instruction limits an analog input between two values. You can select
high/low, high, or low limits.
Available Languages
Ladder Diagram
Function Block
Structured Text
HLL(HLL_tag);
Operands
Function Block
HL_LIMIT Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The HLL instruction determines the value of the Out using these rules:
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
This HLL instruction limits In between two values and sets HighAlarm or
LowAlarm, if needed when In is outside the limits. The instruction sets Out =
limited value of In.
Function Block
Structured Text
HLL_01.In := value;
HLL_01.HighLimit := high_limit;
HLL_01.LowLimit := low_limit;
HLL(HLL_01);
limited_value := HLL_01.Out;
high_alarm := HLL_01.HighAlarm;
low_alarm := HLL_01.LowAlarm;
See also
Multiplexer (MUX) 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 MUX instruction selects one of eight inputs based on the selector input.
Available Languages
Ladder Diagram
Function Block
Structured Text
Operands
Function Block
MUX Structure
Description
Based on the Selector value, the MUX instruction sets Out equal to one of eight
inputs.
No
Major/Minor Faults
Execution
Function Block
Condition Action
Prescan EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is false EnableIn and EnableOut bits are cleared to false.
Tag.EnableIn is true EnableIn and EnableOut bits are set to true.
The instruction executes.
Example
Function Block
This MUX instruction selects In1, In2, or In3, In4, In5, In6, In7, or In8 based on
the Selector. The instruction sets Out = In n , which becomes an input parameter
for function_block_C. For example, if select_value = 2, the instruction sets Out =
analog_input2.
See also
Rate Limiter (RLIM) 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 RLIM instruction limits the amount of change of a signal over time.
Available Languages
Ladder Diagram
Function Block
Structured Text
RLIM(RLIM_tag);
Operands
Function Block
RATE_LIMITER Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The RLIM instruction provides separate increment and decrement rates in per-
second units. The ByPass input lets you stop rate limiting and pass the signal
directly to the output.
Condition Action
ByPass is true Out n = In n
Out n-1 = In n
ByPass is false and
DeltaT > 0
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Function Block
Structured Text
RLIM_01.In := analog_input1;
RLIM_01.IncRate := value;
RLIM(RLIM_01);
rate_limited := RLIM_01.Out;
See also
Select (SEL) 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 SEL instruction uses a digital input to select one of two inputs.
Available Languages
Ladder Diagram
Function Block
Structured Text
Operands
Function Block
SELECT Structure
Description
Condition Action
SelectorIn is set Out = In2
SelectorIn is cleared Out = In1
No
Major/Minor Faults
Execution
Function Block
Example
The SEL instruction selects In1 or In2 based on SelectorIn. If SelectorIn is set, the
instruction sets Out = In2. If SelectorIn is cleared, the instruction sets Out = In1.
Out becomes an input parameter for function_block_C.
Function Block
See also
Selected Negate (SNEG) 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 SNEG instruction uses a digital input to select between the input value and
the negative of the input value.
Available Languages
Ladder Diagram
Function Block
Structured Text
SNEG(SNEG_tag);
Operands
Function Block
SNEG Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
Condition Action
NegateEnable is true Out = - In
NegateEnable is false Out = In
No
Major/Minor faults
Execution
Function Block
Structured Text
Example
Function Block
Structured Text
SNEG_01.In := analog_input1;
SNEG_01.NegateEnable := negate_enable;
SNEG(SNEG_01);
output_value := SNEG_01.Out;
See also
Selected Summer (SSUM) 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 SSUM instruction uses Boolean inputs to select real inputs to be algebraically
summed.
Available Languages
Ladder Diagram
Function Block
Structured Text
SSUM(SSUM_tag);
Operands
Function Block
SELECTABLE_SUMMER Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
Condition Action
No In is selected Out = Bias
One or more In are selected For all n where Selectn is true
Out = ∑ (In n x Gain n ) + Bias
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
The values of select1 and select 2 determine whether to select analog_input1 and
analog_input2, respectively. The instruction then adds the selected inputs and
places the result in Out.
Function Block
Structured Text
SSUM_01.In1 := analog_input1;
SSUM_01.Select1 := select1;
SSUM_01.In2 := analog_input2;
SSUM_01.Select2 := select2;
SSUM(SSUM_01);
selected_add := SSUM_01.Out;
See also
Statistical
Available Instructions
Ladder Diagram
Not available
See also
Moving Average (MAVE) 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 MAVE instruction calculates a time average value for the In signal. This
instruction optionally supports user-specified weights.
Available Languages
Ladder Diagram
Function Block
Structured Text
MAVE(MAVE_tag,storage,weight);
Operands
Function Block
MOVING_AVERAGE Structure
Structured Text
MOVING_AVERAGE Structure
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
Condition Action
Weighted averaging method
UseWeights is set.
The instruction will not place an invalid In value (NAN or ± INF) into the
storage array. When In is invalid, the instruction sets Out = In and logs an
overflow minor fault, if this reporting is enabled. When In becomes valid, the
instruction initializes the averaging algorithm and continues executing.
Certain conditions, such as instruction first scan and instruction first run, require
the instruction to initialize the moving average algorithm. When this occurs, the
instruction considers the sample StorageArray empty and incrementally averages
samples from 1 to the NumberOfSamples value. For example:
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Each scan, the instruction places input_value in array storage. The instruction
calculates the average of the values in array storage, optionally using the weight
values in array weight, and places the result in Out.
Function Block
Structured Text
MAVE_01.In := input_value;
MAVE(MAVE_01,storage,weight);
output_value := MAVE_01.Out;
See also
Maximum Capture (MAXC) 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 MAXC instruction retains the maximum value of the input over time and
allows the user to re-establish a maximum as needed.
Available Languages
Ladder Diagram
Function Block
Structured Text
MAXC(MAXC_tag);
Operands
Function Block
MAXIMUM_CAPTURE Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
Condition Action
Reset is set LastMaximum = Reset value
Out = LastMaximum
Reset is cleared If In > LastMaximum then update LastMaximum.
Out = LastMaximum.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
Function Block
Structured Text
MAXCTag.In := input_value;
MAXCTag.Reset := reset_input;
MAXCTag.ResetValue := reset_value;
MAXC(MAXCTag);
result := MAXCTag.Out;
See also
Minimum Capture (MINC) 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 MINC instruction retains the minimum value of the input over time and
allows the user to re-establish a minimum as needed.
Available Languages
Ladder Diagram
Function Block
Structured Text
MINC(MINC_tag);
Operands
Function Block
MINIMUM_CAPTURE Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
Condition Action
Reset is set LastMinimum = ResetValue
Out = ResetValue
Reset is cleared If In < LastMinimum then update LastMinimum.
Out = LastMinimum.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
Function Block
Structured Text
MINCTag.In := input_value;
MINCTag.Reset := reset_input;
MINCTag.ResetValue := reset_value;
MINC(MINCTag);
result := MINCTag.Out;
See also
Moving Standard This information applies to the CompactLogix 5370, ControlLogix 5570,
Compact GuardLogix 5370, GuardLogix 5570, Compact GuardLogix 5380,
Deviation (MSTD) CompactLogix 5380, CompactLogix 5480, ControlLogix 5580, and GuardLogix
5580 controllers.
The MSTD instruction calculates a moving standard deviation and average for the
In signal.
Available Languages
Ladder Diagram
Function Block
Structured Text
MSTD(MSTD_tag, StorageArray);
Operands
Function Block
MOVING_STD_DEV Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The MSTD instruction supports any input queue length. Each scan, if
SampleEnable is set, the instruction enters the value of In into a storage array.
When the storage array is full, each new value of In causes the oldest entry to be
deleted.
Condition Action
Average
Out
The instruction will not place an invalid In value (NAN or INF) into the
storage array. When In is invalid, the instruction sets Out = In, sets Average = In,
and logs an overflow minor fault, if this reporting is enabled. When In becomes
valid, the instruction initializes the standard deviation algorithm and continues
executing.
Certain conditions, such as instruction first scan and instruction first run, require
the instruction to initialize the standard deviation algorithm. When this occurs,
the instruction considers the StorageArray empty and incrementally processes
samples from 1 to the NumberOfSamples value. For example:
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
Each scan that SampleEnable is set, the instruction places the value of In into array
storage, calculates the standard deviation of the values in array storage, and places
the result in Out. Out becomes an input parameter for function_block_C.
Function Block
Structured Text
MSTD_01.In := input_value;
MSTD_01.SampleEnable := enable_sample;
MSTD(MSTD_01,storage);
deviation := MSTD_01.Out;
See also
Logical and Move These instructions are used to perform logical operations on and move output
data.
Instructions
Available Instructions
Function Block
Not available
Structured Text
See also
D Flip-Flop (DFF) 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 DFF instruction sets the Q output to the state of the D input on a cleared to
set transition of the Clock input. The QNot output is set to the opposite state of
the Q output.
Available Languages
Ladder Diagram
Function Block
Structured Text
DFF(DFF_tag);
Operands
Function Block
FLIP_FLOP_D Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
When Clear is set, the instructions clears Q and sets QNot. Otherwise, if Clock is
set and Clockn-1 is cleared, the instruction sets Q=D and sets QNot = NOT (D).
No
Major/Minor Faults
Execution
Function Block
Structured Text
Example
When Clock goes from cleared to set, the DFF instruction sets Q = D. When
Clear is set, Q is cleared. The DFF instruction sets QNot to the opposite state of
Q.
Function Block
Structured Text
DFF_03.D := d_input;
DFF_03.Clear := clear_input;
DFF_03.Clock := clock_input;
DFF(DFF_03);
q_output := DFF_03.Q;
qNot_output := DFF_03.QNot;
See also
JK Flip-Flop (JKFF) 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 JKFF instruction complements the Q and QNot outputs when the Clock
input transitions from cleared to set.
Available Languages
Ladder Diagram
Function Block
Structured Text
JKFF(JKFF_tag);
Operands
Function Block
FLIP_FLOP_JK Structure
Structured Text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
When Clear is set, the instructions clears Q and sets QNot. Otherwise, if Clock is
set and Clockn-1 is cleared, the instruction toggles Q and QNot.
No
Major/Minor Faults
Execution
Function Block
Structured Text
Examples
When Clock goes from cleared to set, the JKFF instruction toggles Q. If Clear is
set, Q is always cleared. The JKFF instruction sets QNot to the opposite state of
Q.
Function Block
Structured Text
JKFF_01.Clear := clear_input;
JKFF_01.Clock := clock_input;
JKFF(JKFF_01);
q_output := JKFF_01.Q;
qNot_output := JKFF_01.QNot;
See also
Reset Dominant (RESD) 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 RESD instruction uses Set and Reset inputs to control latched outputs. The
Reset input has precedence over the Set input.
Available Languages
Ladder Diagram
Function Block
Structured Text
RESD(RESD_tag);
Operands
Function Block
DOMINANT_RESET Structure
Structured text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
Description
The Reset Dominant instruction uses the Set and Reset input parameters to
control latched output parameters Out and OutNot. The Reset input has
precedence over the Set input.
Out will be latched true whenever the Set input parameter is set true. Setting the
Reset parameter to true will override the current state of Out, setting Out to false.
When Reset returns to false, Out will be latched to the current state of the Set
input parameter. OutNot will be set to the opposite state of Out.
No
Major/Minor Faults
None specific to this instruction. See Common Attributes for fault related
attributes.
Execution
Function Block
Structured Text
Example
When Set is true and Reset is false, Out is set true. When Reset is true, Out is
cleared. The Reset input has precedence over the Set input. The RESD instruction
sets OutNot to the opposite state of Out.
Function Block
Structured Text
RESD_01.Set := set_input;
RESD_01.Reset := reset_input;
RESD(RESD_01);
out_output := RESD_01.Out;
outNot_output := RESD_01.OutNot;
See also
Set Dominant (SETD) 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 SETD instruction uses Set and Reset inputs to control latched outputs. The
Set input has precedence over the Reset input.
Available Languages
Ladder Diagram
Function Block
Structured Text
SETD(SETD_tag);
Operands
Function Block
Structured text
See Structured Text Syntax for more information on the syntax of expressions
within structured text.
DOMINANT_SET Structure
Description
The Set Dominant instruction uses the Set and Reset input parameters to control
latched output parameters Out and OutNot. The Set input has precedence over
the Reset input.
Out will be latched true whenever the Set input parameter is set true. Setting the
Reset parameter to true will set Out to false only if the Set input is false. OutNot
will be set to the opposite state of Out.
No
Major/Minor Faults
Execution
Structured Text
Example
When Set is true, Out is set true. When Set is false and Reset is true, Out is
cleared. The Set input has precedence over the Reset input. The SETD instruction
sets OutNot to the opposite state of Out.
Function Block
Structured Text
SETD_01.Set := set_input;
SETD_01.Reset := reset_input;
SETD(SETD_01);
out_output := SETD_01.Out;
outNot_output := SETD_01.OutNot;
See also
PSC PCMD POVR PFL PCLF PXRQ PRNP PPD PATT PDET
Function Block
See also
Attach to Equipment Phase This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
(PATT) Compact GuardLogix 5380 controllers.
Available Languages
Ladder Diagram
Function Block
Structured Text
PATT(Phase_Name,Result);
Operands
Ladder Diagram
Structured Text
The operands are the same as those for the Ladder Diagram PATT instruction.
Guideline Details
Consider ownership if have multiple sequencers Ownership makes sure that a program can command all the
that use a common equipment phase. equipment phases it needs and locks out any other
sequencers.
If using: Then:
FactoryTalk Batch software to Before executing the
also run sequences within this sequence (process), take
controller ownership of all the
equipment phases that
the sequence uses.
Multiple programs to command
the same equipment phase
None of the above No need to own the
equipment phases.
Remember that Logix Designer overrides the Regardless of whether a program or FactoryTalk Batch
controller. software owns an equipment phase, the option exists to use
Logix Designer to override ownership and command the
equipment phase to a different state.
This: Overrides this:
Logix Designer Controller (internal
sequencer), FactoryTalk
Batch software (external
sequencer)
Controller (internal sequencer) None
FactoryTalk Batch software None
(external sequencer)
Use the Result operand to validate ownership. Use the Result operand to get a code that shows the success
or failure of the PATT instruction. To interpret the result code,
see the PATT Result Codes section below.
Avoid or plan for a result code = 24582. On each execution, the PATT instruction tries to take
ownership of the equipment phase. Once a program owns an
equipment phase, another execution of the PATT instruction
produces a result code = 24582. When using a PATT
instruction, either:
• Limit its execution to a single scan to avoid the 24582
result code.
• Include a result code = 24582 in conditions for
ownership.
When the sequence is done, relinquish To relinquish ownership, use a Detach from Equipment Phase
ownership. (PDET) instruction.
If assigning a tag to store the result of a PATT instruction, the instruction returns
one of these codes when it executes:
No
Major/Minor Faults
Execution
For Structured Text, EnableIn is always true during normal scan. Therefore, if the
instruction is in the control path activated by the logic, it will execute. All
Conditions below the thick solid line can only occur during Normal Scan mode.
Example
Ladder Diagram
Structured Text
Number Description
At the first step in the sequence, the Take_Ownership action tries to take
ownership of two equipment phases that the sequence uses.
Action_009 checks that the program owns the equipment phases. If the
Result of each PATT instruction = 0 or 24282 (the program owns the
equipment phase), then a bit within the Ownership tag = 1. (In the
Ownership tag, each equipment phase is assigned a bit.)
If the Ownership = 3 (The program owns both equipment phases as shown
by bits 0 and 1.), then the SFC goes to the next step.
See also
Detach from Equipment This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
Phase (PDET) Compact GuardLogix 5380 controllers.
After a program executes a PDET instruction, the program no longer owns the
equipment phase. This frees the equipment phase for ownership by another
program or by FactoryTalk Batch software. Use the PDET instruction only if the
Available Languages
Ladder Diagram
Function Block
Structured Text
PDET(Phase_Name);
Operands
Ladder Diagram
Structured Text
The operands are the same as those for the Ladder Diagram PDET instruction.
No
Major/Minor Faults
Execution
For Structured Text, EnableIn is always true during normal scan. Therefore, if the
instruction is in the control path activated by the logic, it will execute.
Example
Ladder Diagram
Each Ownership bit = 0. (In the Ownership tag, each equipment phase is
assigned a bit.)
Structured Text
Using an action Qualifier of type P1 limits the action execution to the first scan of
that step.
See also
Equipment Phase Clear This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
Failure (PCLF) Compact GuardLogix 5380 controllers.
Use the PCLF instruction to clear the failure code of an equipment phase.
The PCLF instruction clears the failure code for an equipment phase.
Make sure the equipment phase does not have other owners when using the PCLF
instruction. The PCLF instruction will not clear the failure code if Logix Designer,
HMI, FactoryTalk Batch software, or another program owns the equipment
phase.
Available Languages
Ladder Diagram
Function Block
Structured Text
PCLF(Phase_Name);
Operands
Ladder Diagram
Structured Text
The operands are the same as those for the Ladder Diagram PCLF instruction.
No
Major/Minor Faults
Execution
For Structured Text, EnableIn is always true during normal scan. Therefore, if the
instruction is in the control path activated by the logic, it executes.
Example
Ladder Diagram
Change the state of the Drain_Tank equipment phase to restarting via the
restart command.
Drain_Tank_Restart = 0;
Structured Text
If Drain_Tank_Restart Then
PCLF(Drain_Tank);
PCMD(Drain_Tank,Restart,0);
Drain_Tank_Restart := 0;
End_If;
See also
The PCMD instruction transitions an equipment phase to the next state or sub-
state.
In the running state routine, use the PSC instructions to transition the equipment
phase to the complete state. For more information about Paused functionality,
please see the PPD phase instruction.
Number Description
Command
Some states need a command to go to the next state. If the equipment phase is in the idle state, a start
command transitions the equipment phase to the running state. Once in the running state, the equipment
phase executes its running state routine.
Other states use a Phase State Complete (PSC) instruction to go to the next state. If the equipment phase is in
the holding state, a PSC instruction transitions the equipment phase to the held state. Once in the held state,
the equipment phase needs a restart command to go to the restarting state.
Sub-state
Use Auto Pause, Pause, and Resume to test and debug a state routine. The sub-states require the Equipment
Phase Paused (PPD) instruction to create breakpoints in the logic.
Use the auto pause, pause, and resume commands to step through the breakpoints.
Available Languages
Ladder Diagram
Function Block
Structured Text
PCMD (PhaseName,Command,Result);
Operands
Ladder Diagram
Structured Text
The operands are the same as those for the Ladder Diagram PCMD instruction.
Guideline Details
Limit execution of a PCMD Limit the execution of the PCMD instruction to a single scan. Each command
instruction to a single scan. applies to only a specific state or states. Once the equipment phase changes
state, the command is no longer valid. To limit execution, use methods such
as:
• Execute the PCMD instruction within a P1 Pulse (Rising Edge) or P0 Pulse
(Falling Edge) action.
• Place a one shot instruction before the PCMD instruction.
• Execute the PCMD instruction and then advance to the next step.
Determine if need ownership of the As an option, a program can own an equipment phase. This prevents
equipment phase. another program or FactoryTalk Batch software from also commanding the
equipment phase.
If using: Then:
FactoryTalk Batch software to also run Also run procedures (recipes)
procedures (recipes) within this within this controller. Before
controller using a PCMD instruction, use an
Attach to Equipment Phase
(PATT) instruction to take
ownership of the equipment
phase.
Multiple programs to command the Use an Attach to Equipment
same equipment phase Phase (PATT) instruction to take
ownership of the equipment
phase.
None of the above There is no need to own the
equipment phase.
Using a POVR instruction instead of a 1. Giving the hold, stop, or abort command?
PCMD instruction. • No - Use the PCMD instruction.
• Yes - Go to step 2.
2. Must the command work even if the equipment phase is under manual
control via Logix Designer?
• Yes - Use the POVR instruction instead.
• No - Go to step 3.
3. Must the command work even if FactoryTalk Batch software or another
program owns the equipment phase?
• Yes - Use the POVR instruction instead.
• No - Use the PCMD instruction.
For example, suppose the equipment checks for jammed material. And if
there is a jam, the equipment should always abort. In that case, use the
POVR instruction. This way, the equipment aborts even if under manual
control via Logix Designer.
Determine if need a return code. Use the Result operand to get a code that shows the success or failure of the
PCMD instruction.
If: Then in the Result operand,
enter a:
If assigning a tag to store the result of a PCMD instruction, the instruction returns
one of these codes when it executes:
No
Major/Minor Faults
Execution
For Structured Text, EnableIn is always true during normal scan. Therefore, if the
instruction is in the control path activated by the logic, it will execute. All
conditions below the think solid line can only occur during Normal Scan mode.
Example 1
Ladder Diagram
Number Description
If ProcedureB_Stepindex = 20 (the routine is at step 20)
And this is the transition to step 20 (the ONS instruction signals that the EQU instruction went from false to true.)
Then
Change the state of the Add_Water equipment phase to running via the start command.
If ProcedureB_Stepindex = 20 (the routine is at step 20)
And the Add_Water equipment phase is complete (Add_Water.Complete = 1)
Then
Change the state of the Add_Water equipment phase to resetting via the reset command. Advance to step 30.
Structured Text
Number Description
When the SFC enters Add_Water_Step, change ADD_Water equipment phase to running
via the start command, The P1 qualifier limits this to the first scan of the step.
Before the SFC leaves Add_Water_Step (Add_Water_Complete = 1), change Add_Water
equipment phase to resetting via the reset command. The P0 qualifier limits this to the last
scan of the step.
Example 2
Ladder Diagram
Number Description
If ProcedureB_Stepindex = 30 (the routine is at step 30)
And this is the transition to step 30 (the ONS instruction signals that the EQU instruction went from false to true.)
Then
Change the state of the Add_Water equipment phase to running via the start command.
Verify that the command was successful and store the result code in PCMD_Result[1] [DINT Tag].
Structured Text
Number Description
When the SFC enters Add_Ingredient_Step
• Change Add_Ingredient equipment phase to running via the start commend.
• Verify that the command was successful and store the result code in PCDM_Result[2] (DINT tag).
The P1 qualifier limits this to the first scan of the step.
See also
Equipment Phase External This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
Request (PXRQ) Compact GuardLogix 5380 controllers.
Important: When the PXRQ instruction is used in an Equipment Sequence, only the Download All (1000) request
and the Upload All (2000) request are supported. All other PXRQ instruction requests are ignored.
Available Languages
Ladder Diagram
Function Block
Structured Text
Operands
Ladder Diagram
Structured Text
The operands are the same as those for the Ladder Diagram PXRQ instruction.
Then check or
set this
If want to: member: Data type Notes
Determine if a false-to-true transition caused EN BOOL Refer to the timing diagram below.
the instruction to execute
Determine if the request failed ER BOOL Refer to the timing diagram below.
To diagnose the error, refer to the ERR and
EXERR values.
Determine if the FactoryTalk Batch software PC BOOL Refer to the timing diagram below.
completed its processing of the request
Determine if the FactoryTalk Batch software is IP BOOL Refer to the timing diagram below.
processing the request
Determine if the instruction sent the request WA BOOL Refer to the timing diagram below.
but FactoryTalk Batch software has not yet WA also = 0 if:
acknowledged it
• The connection times out
• A network error occurs
• ABORT = 1
Cancel the request ABORT BOOL To abort (cancel) the request, set the ABORT
bit = 1. When the controller aborts the
instruction:
• ER = 1
• ERR shows the result of the abort
• Diagnose the cause of an error ERR INT If ER = 1, the error code gives diagnostic
information. To interpret the error code,
see PXRQ Error Codes.
• Write logic to respond to specific errors EXERR INT If ER = 1, the extended error code gives
additional diagnostic information for some
errors. To interpret the extended error code,
see PXRQ Error Codes.
Use one member for the various status bits of STATUS DINT For this member: Use this bit:
the tag
EN 31
ER 28
PC 27
IP 26
WA 25
ABORT 24
Timing Diagram
Guideline Details
Make sure to use an array for the Data Values operand. The Data Values operand requires a DINT array, even if the array contains only 1
element (that is, the data type is DINT[1]).
In Ladder Diagram, condition the instruction to execute This is a transitional instruction. Each time the instruction executes, toggle the
on a transition. EnableIn from false to true
In Structured Text, use a construct to condition the When programming a PXRQ instruction in structured text, consider:
execution of the instruction. • In structured text, instructions execute each time they are scanned.
• The PXRQ instruction updates its status bits only when it is scanned.
• To keep the instruction from repeatedly executing but ensure that the
status bits update, enclose the instruction in a construct that:
• Initiates the execution of the instruction only on a transition
(change in conditions).
• Remains true until either PC = 1 or ER = 1
Upload the output parameters configured for Upload Output Parameters DINT[0] terminal = 1
automatic upload on terminal state or transfer Subset transfer of control = 2
of control
Send a message to an operator Send Message to Operator DINT[0] message ID
Clear a message from an operator Clear Message to Operator DINT[0] 0
Acquire a resource Acquire Resources DINT[0] equipment ID
Acquire multiple resources Acquire Resources DINT[0] equipment ID
DINT[1] equipment ID
...
...
...
Send a message (and optional data) to Send Message to Linked DINT[0] message ID
another phase and wait for the phase to Phase and Wait
DINT[1] Number of phases to receive
receive the message
message
...
Wait to receive a message from another phase Receive Message From DINT[0] message ID
Linked Phase
DINT[1] Message Value
...
Download recipe control versus manual phase Download Batch Data DINT[0] 4
control
DINT[1] parameter ID in which to store
the value
Download the low limit of an input parameter Download Batch Data DINT[0] 6
The input parameter tag stores
the low limit.
Download the high limit of an input Download Batch Data DINT[0] 7
parameter The input parameter tag stores
the high limit.
Download data about the container currently Download Material DINT[0] 1
in use Manager Data Container In
DINT[1] Attribute ID (specify the single
Use
attribute).
Download the current binding's container Download Container DINT[0] parameter ID in which to store
priority Binding Priority the value
Upload a new container priority for the current Upload Container Binding DINT[0] parameter ID that has value
binding Priority
Download information regarding the Download Sufficient DINT[0] parameter ID in which to store
availability of sufficient material Material the value
In the result value:
• 0 = insufficient material
• 1 = sufficient material
Generate a signature Generate E Signature DINT[0] ID of the signature template
DINT[1]
DINT[4]
DINT[4]
No
Major/Minor Faults
Execution
Example
Ladder Diagram
Structured Text
See also
Equipment Phase Failure This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
(PFL) Compact GuardLogix 5380 controllers.
Use the PFL instruction as an optional method to signal a failure for an equipment
phase.
The PFL instruction sets the value of the failure code for an equipment phase. Use
the instruction to signal a specific failure for an equipment phase, such as a specific
device has faulted. The PFL instruction sets the failure code only to a value greater
than its current value.
Available Languages
Ladder Diagram
Function Block
Structured Text
PFL (Failure_Code);
Operands
Ladder Diagram
Structured Text
The operands are the same as those for the Ladder Diagram PFL instruction.
Guideline Details
Put the PFL The PFL instruction sets the failure code for the equipment phase in which the instruction is put. There
instruction in the is no operand to identify a specific equipment phase.
equipment Typically, put the PFL instruction in a prestate routine for the equipment phase.
phase.
• The controller always scans the prestate routine, even when an equipment phase is in the idle
state.
• The controller scans the prestate routine before each scan of a state.
Number Description
Prestate routine
Use the progress routine to continuously monitor the health of an equipment phase as it progresses
through its states.
Prioritize failure The PFL instruction sets the failure code only to a value greater than its current value.
codes. • For example, if a PFL instruction sets the failure code = 102, another PFL instruction can only set
the failure code > 102.
• Make sure to assign higher values to exceptions that require higher priority in their handling.
Otherwise, a lower priority exception may overwrite a more critical exception.
To take action The PFL instruction writes its value to the Failure member of the PHASE tag for the equipment phase.
when a failure
occurs, monitor
the Failure
member of the
PHASE tag.
Number Description
When creating an equipment phase, the Logix Designer application
creates a tag for the status of the equipment phase.
controller scope
Name = phase_name
The PFL instruction writes its value to the failure member for the
equipment phase.
To clear the Use a PCLF instruction to clear the failure code of an equipment phase. Instructions such as a CLR or
failure code, use MOV will not change the failure code.
a PCLF
instruction.
No.
Major/Minor Faults
Execution
For Structured Text, EnableIn is always true during normal scan. Therefore, if the
instruction is in the control path activated by the logic, it will execute. All
conditions below the thick solid line can only occur during Normal Scan mode.
Example
Ladder Diagram
Then
Change the state of the Drain_Tank equipment phase to holding via the hold
command.
Structured Text
See also
Equipment Phase New This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
Parameters (PRNP) Compact GuardLogix 5380 controllers.
Number Description
When FactoryTalk Batch software has new parameters for an equipment phase, it sets
the NewInputParameters bit for the phase.
After downloading the parameters, use the PRNP instruction to clear the bit.
Available Languages
Ladder Diagram
Function Block
Structured Text
PRNP ( );
Operands
Ladder Diagram
None
Structured Text
None
Enter the parentheses ( ) after the instruction mnemonic, even though there are no
operands.
No
Major/Minor Faults
Execution
Example
Ladder Diagram
Structured Text
Otherwise
Enable_PXRQ = 1 (Let the PXRQ instruction execute the next time new
input parameters are available.)
See also
Equipment Phase Override This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
Command (POVR) Compact GuardLogix 5380 controllers.
Available Languages
Ladder Diagram
Function Block
Structured Text
Operands
Ladder Diagram
Structured Text
The operands are the same as those for the Ladder Diagram POVR instruction.
Guideline Details
If want to override other owners. Want the equipment to hold, stop, or abort even if have manual
control of the equipment phase via Logix Designer software?
• Yes - Use the POVR instruction
• No - Use the PCMD instruction
This also applies to HMI, FactoryTalk Batch software or other
programs. Use the POVR only to hold, stop, or abort, regardless of
ownership.
For example, suppose the equipment checks for jammed
material. If there is a jam, always abort the equipment. In that
case, use the POVR instruction. This way, the equipment aborts
even under manual control via Logix Designer software.
Limit execution of a POVR instruction to Limit the execution of the POVR instruction to a single scan. Each
a single scan. command applies to only a specific state or states. Once the
equipment phase changes state, the command is no longer valid.
To limit execution, use methods such as:
• Execute the POVR instruction within a P1 Pulse (Rising Edge)
or P0 Pulse (Falling Edge) action.
• Place a one shot instruction before the POVR instruction.
• Execute the POVR instruction and then advance to the next
step.
If assigning a tag to store the result of a POVR instruction, the instruction returns
one of these codes when it executes:
No
Major/Minor Faults
Execution
Example
Number Description
The equipment program watches for the these faults:
• Faulted axis
• Jammed material
If there is a fault, then
Local_Interface.Equipment_Faults_Cleared = 0. This tag is an alias for the controller-scoped
tag Shear_1.
The prestate routine of the equipment phase watches for the equipment program to signal a fault.
• If Interface_To_Equipment.Equipment_Faults_Cleared=0 then there is a fault.
• Both Interface_To_Equipment and Local_Interface as aliases for Shear_1, so they have the same
values.
If there is a fault, then
Give the Shear_One_Phase equipment phase the abort command. The POVR instruction makes sure
the command works, even if someone has manual control of the equipment phase through Logix
Designer software.
The PFL instruction sets the failure code for Shear_One_Phase = 333.
The Fault_Strobe keeps these actions to a single scan.
Ladder Diagram
Example 2
Structured Text
POVR(POVRTest,Abort, 0);
PFL(333);
end_if;
See also
Equipment Phase Paused This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
(PPD) Compact GuardLogix 5380 controllers.
Use the PPD instruction to set up breakpoints within the logic of an equipment
phase.
• Paused: The Paused bit maintains the pause-state of the phase, Paused (1)
or not-Paused (0). This is bit 1 of the Pause substate. The Paused bit also
disables the rest of the rung (RLL), it does not terminate or suspend the
execution of the routine.
This bit is only set by the phase's firmware. When the PauseEnabled bit is
ON, execution of a PPD instruction causes the Paused bit to be set to
Paused (1) and firmware pauses execution of the phase state routine
suspends. A Resume command sets the Paused bit to not-Paused (0) and the
phase executes its logic.
Available Languages
Ladder Diagram
Function Block
Structured Text
PPD( );
Operands
Ladder Diagram
None
Structured Text
None
Enter the parentheses ( ) after the instruction mnemonic, even though there are no
operands.
Guideline Details
Organize logic as a series of steps. PPD instructions (breakpoints) are easiest to use if the logic moves through
defined steps, such as a state machine or SFC.
• A breakpoint only signals that specific conditions are met. It does
not stop the execution of the equipment phase.
• To have logic actually break (pause) at a breakpoint, organize the logic
so that it stays at the step at which the breakpoint occurred until it
receives the resume command.
Do not use a PPD instruction as a temporary Even when an equipment phase pauses, it continues to execute all its logic.
end of the routine. • When a PPD instruction executes, it only sets the Paused bit for the
equipment phase.
• If programing the PPD instruction in RLL, it disables only the rest of the
logic on its rung. It does not terminate or suspend the execution of the
routine.
• Think of the PPD instruction as a condition that applies or is ignored
based on the auto pause and pause commands.
Use PPD instruction to pause at the same When the PauseEnabled bit is TRUE, an equipment phase goes to Paused at
breakpoint over several scans. the first PPD instruction whose conditions are true. If the PPD instruction
executes over several scans, the equipment phase may continually pause at
the same breakpoint.
Make sure only 1 PPD instruction at a time is A PPD instruction does not have a control tag to remember whether it
true. executed.
• Anytime its conditions are true (and the equipment phase is in a
substate with PauseEnabled True), the PPD instruction acts as a
breakpoint (and pauses the phase by disabling the rest of the logic on
the rung).
• Limiting logic to one possible breakpoint at a time ensures a pause at
the required breakpoint.
Choose the substate to use. PPD instructions (breakpoints) work only when the equipment phase
PauseEnabled bit is True.
To pause at: Give this command:
Each true breakpoint Auto Pause
First true breakpoint Pause
No
Major/Minor Faults
Execution
Example
Ladder Diagram
See also
Phase State Complete (PSC) This instruction applies to the CompactLogix 5370 and CompactLogix 5380,
ControlLogix 5570 and ControlLogix 5580, and Compact GuardLogix 5370 and
Compact GuardLogix 5380 controllers.
Use the PSC instruction to signal an equipment phase that the state routine is
complete to indicate that it should go to the next state.
In the running state routine, use the PSC instruction to transition the equipment
phase to the complete state.
Available Languages
Ladder Diagram
Function Block
Structured Text
PSC( );
Operands
Ladder Diagram
None
Structured Text
None
Enter the parentheses ( ) after the instruction mnemonic, even though there are no
operands.
Guideline Details
Use the PSC instruction in each phase state routine that is added to an equipment phase. Without a PSC instruction, the
equipment phase remains in the state
and does not go to the next state.
• Place the PSC instruction as the
last step in the phase state routine.
• When the state is done (complete),
execute the PSC instruction.
In the holding state routine, use the
PSC instruction to let the equipment
phase go to the Held state
Remember that the PSC instruction does not stop the current scan of a routine. When the PSC instruction executes,
the controller scans the rest of the
routine and then transitions the
equipment phase to the next state.
The PSC instruction does not
terminate the execution of the
routine.
Do not use a PSC instruction in a prestate routine. Use the PSC instruction only to signal
the transition from one state to
another.
No
Major/Minor Faults
Execution
In structured text, instructions execute each time they are scanned. To limit the
scan of an instruction, use a qualifier of an SFC action, a structured text construct,
or both.
Examples
Ladder Diagram
Structured Text
If TagEnableRunning
PSC();
End_if;
See also
Equipment Sequence
Equipment Sequence The following table lists the command instructions for Equipment Sequences.
The instructions are available for routines that use the Ladder Diagram and the
instructions Structured Text programming languages. They are not available for use in routines
that use the Function Block and the Sequential Function Chart programming
languages.
See also
Attach to Equipment Use the Attach to Equipment Sequence (SATT) instruction to take ownership of
an Equipment Sequence. An Equipment Sequence must be owned by a program
Sequence (SATT) before the program can command it. A tag must be assigned to store the result
code of an SATT instruction.
The SATT instruction returns one of five result codes. Result code 0 indicates
that the SATT instruction ran successfully. The other four codes indicate that the
instruction did not run successfully and provide additional information about the
reason for the instruction failure.
Available Languages
Ladder Diagram
Function Block
Structured Text:
SATT(SequenceName,Result)
Operands
No
Major/Minor Faults
The SATT instruction cannot trigger a fault, so there are no fault conditions for
this instruction.
Execution
The following table describes the execution steps for SATT instructions.
Ladder Diagram
Structured Text
See also
Detach from Equipment Use the Detach from Equipment Sequence (SDET) instruction to relinquish
ownership of an Equipment Sequence. After a program executes an SDET
Sequence (SDET) instruction, the program no longer owns the Equipment Sequence. The
Equipment Sequence is then available for ownership by another program or by
FactoryTalk Batch software. Use the SDET instruction only if the program
previously took ownership of an Equipment Sequence through an Attach to
Equipment Sequence (SATT) instruction.
Available Languages
Ladder diagram
Function Block
Structured text
SDET(SequenceName)
Operands
No
Major/Minor Faults
The SDET instruction cannot trigger a fault, so there are no fault conditions for
this instruction.
Execution
Ladder Diagram
Structured Text
See also
Equipment Sequence Assign Use the Assign Sequence Identifier (SASI) instruction to assign a sequence ID to
the Equipment Sequence. You can only set the sequence ID when the following
Sequence Identifier (SASI) prerequisites are met:
Available Languages
Ladder Diagram
Function Block
Structured Text
SASI(SequenceName,SequenceID,SequenceIDValue,Result)
Operands
No
Major/Minor Faults
The SASI instruction cannot trigger a fault, so there are no fault conditions for
this instruction.
Execution
Ladder Diagram
Structured Text
See also
Equipment Sequence Clear Use the Equipment Sequence Clear Failure (SCLF) instruction to clear the failure
code of an Equipment Sequence. Keep the following in mind when using the
Failure (SCLF) SCLF instruction.
• The Equipment Sequence cannot have other owners when you use the
SCLF instruction. The SCLF instruction does not clear the failure code if
the Logix Designer application, FactoryTalk Batch software, or another
program owns the Equipment Sequence.
• An Equipment Sequence refuses a RESUME command until it is cleared of
failures.
Available Languages
Ladder diagram
Function Block
Not available
Structured text
SCLF(SequenceName)
Operands
No.
Major/Minor Faults
The SCLF instruction cannot trigger a fault, so there are no fault conditions for
this instruction.
Execution
Ladder Diagram
Structured Text
See also
Equipment Sequence Use the Equipment Sequence command (SCMD) instruction to change the state
of an Equipment Sequence. The SCMD instruction can send the following
command (SCMD) commands to an Equipment Sequence: START, RESTART, HOLD, STOP,
ABORT, and RESET. The program must attach to an Equipment Sequence
before the SCMD instruction can run. Use the SATT instruction to attach to an
Equipment Sequence.
Important: The SOVR instruction is intended for emergencies only. Control Engineers should use
caution when deciding to use it.
When a tag is assigned to store the result of an SCMD instruction, the instruction
returns one of five result codes when it runs. Result code 0 indicates that the
SCMD instruction ran successfully. The other four codes indicate that the
instruction did not run successfully and provide additional information about the
reason for the instruction failure.
Available Languages
Ladder Diagram
Function Block
Structured Text
SCMD(SequenceName,Command,Result)
Supported Operands
Arithmetic status flags are not affected by the SCMD instruction. The SCMD
instruction cannot trigger a fault, so there are no fault conditions for this
instruction.
Execution
Ladder Diagram
Structured Text
See also
Equipment Sequence The following table describes the Equipment Sequence Diagram instructions.
Diagram instructions
Icon Icon Name Description
Add Step and Transition Pair Use Add Step and Transition Pair to add a step and transition pair.
Although added as a pair, you can select and edit each element separately.
Add Disconnected Step Use the Add Disconnected Step to add a step without adding a transition.
Add Disconnected Transition Use Add Disconnected Transition to add a transition without adding a step.
Add Simultaneous Divergence Use Add Simultaneous Divergence to create a branch where all linked
steps execute simultaneously.
Add Selective Divergence Use Add Selective Divergence to create a divergence for a selective
branch. In a selective divergence, only one of multiple paths is executed--the path
containing the transition that first evaluates as TRUE.
Add Simultaneous Convergence Use Add Simultaneous Convergence to merge simultaneous execution
paths back together.
Add Selective Convergence Use Add Selective Convergence to merge selective divergent paths back
into one execution path in the selective branch.
See also
Equipment Sequence Use the Equipment Sequence Override (SOVR) instruction to send a HOLD,
STOP, or ABORT command to an Equipment Sequence, regardless of
Override (SOVR) ownership.
Important: The SOVR instruction is intended for emergencies only. Control Engineers should use
caution when deciding to use it.
When a tag is assigned to store the result of an SOVR instruction, the instruction
returns one of five result codes when it runs. Result code 0 indicates that the
SOVR instruction ran successfully. The other four codes indicate that the
instruction did not run successfully and provide additional information about the
reason for the instruction failure.
Available Languages
Ladder Diagram
Function Block
Structured Text
SOVR(SequenceName,Command,Result)
Operands
No.
Major/Minor Faults
The SOVR instruction cannot trigger a fault, so there are no fault conditions for
this instruction.
Execution
Ladder Diagram
Structured Text
See also
Guidelines for SATT Keep the following guidelines in mind when using the Attach to Equipment
Sequence (SATT) instruction.
instructions
Guideline Details
Remember that the Logix Designer application Ownership makes sure that a program can command the
overrides ownership of the Equipment Sequence. Equipment Sequence, and it locks out any other sequencers.
The Equipment Sequence must be owned by the Both Equipment Sequences and Equipment Phases must
program to command it. be owned to be commanded. The ownership commands
are Attach (SATT) and Detach (SDET).
Internal sequencers (programs), external sequencers (FactoryTalk
Batch), and operators use an Attach instruction to command an
Equipment Sequence.
When the sequence is done, relinquish ownership. To relinquish ownership, use a Detach from Equipment Sequence
(SDET) instruction.
Avoid making unnecessary command requests if the Unnecessary command requests can flood the event processing
equipment sequence is generating sequence events. buffers and cause you to miss significant events.
Use the Result code to verify ownership, and include Use the Result operand to get a code that shows the success or
steps that should take place if the attachment fails failure of the SATT instruction.
because the Equipment Sequence is owned by another On each execution, the SATT instruction tries to take ownership of
program or by the operator. the Equipment Sequence. When a program or operator owns an
Equipment Sequence, another execution of the SATT instruction
fails and produces result code 24582. When you use the SATT
instruction, either:
• Limit its execution to a single scan to avoid the 24582 result
code.
• Include the following in your conditions for ownership: result
code = 24582.
See also
Guidelines for SCMD Keep the following guidelines in mind when using the Equipment Sequence
Command (SCMD) instruction. The SCMD instruction can send the following
instructions commands: START, RESTART, HOLD, STOP, ABORT, and RESET.
Guideline Details
Limit execution of the SCMD instruction to a Limit the execution of the SCMD instruction to a single scan. Each command
single scan. applies to only a specific state or states. Once the Equipment Sequence
changes state, the command is no longer valid. To limit execution, use
methods such as:
• Run the SCMD instruction within a P1 Pulse (Rising Edge) or P0 Pulse
(Falling Edge) action.
• Place a one-shot instruction before the SCMD instruction.
• Run the SCMD instruction and then advance to the next step.
The Equipment Sequence must be owned by Both Equipment Sequences and Equipment Phases must be owned to be
the program to command it. commanded. The ownership commands are Attach (SATT)
and Detach (SDET).
Internal sequencers (programs), external sequencers (FactoryTalk Batch),
and operators use an Attach instruction to command an Equipment
Sequence.
See also
Keep the following guidelines in mind when using the Equipment Sequence
Override (SOVR) instruction.
Guideline Details
Make sure you want to override other Under most circumstances, use the SCMD instruction to programmatically
owners. command an Equipment Sequence. However, use the SOVR instruction to
command an Equipment Sequence under the following conditions:
• When you are giving the HOLD, STOP, or ABORT command, and the command
must always execute under all ownership circumstances.
• If the HOLD, STOP, or ABORT command must execute even when you have
manual control of the Equipment Sequence through the Logix Designer
application or when another program, such as the FactoryTalk Batch software,
owns the Equipment Sequence.
Limit execution of the SOVR instruction to a Limit the execution of the SOVR instruction to a single scan. Each command
single scan. applies to only a specific state or states. Once the Equipment Sequence changes
state, the command is no longer valid. To limit execution, use methods such as:
• Run the SOVR instruction within a P1 Pulse (Rising Edge) or P0 Pulse (Falling
Edge) action.
• Place a one-shot instruction before the SOVR instruction.
• Run the SOVR instruction and then advance to the next step.
Avoid making unnecessary command Unnecessary command requests can flood the event processing buffers and cause
requests if the Equipment Sequence is you to miss significant events.
generating sequence events.
See also
Result codes for SATT When a tag is assigned to store the result of an Attach to Equipment Sequence
(SATT) instruction, the instruction returns one of the following codes when it
instructions runs.
Use the Result operand to get a code that shows the success or failure of the
SATT instruction. The Result operand should contain either 0 or a DINT tag,
depending on whether ownership conflicts or other errors are likely to occur.
• If ownership conflicts or other errors are not likely, enter 0 in the Result
operand.
• If ownership conflicts or other errors are likely, enter a DINT tag in
the Result operand. The DINT tag stores a code for the result of the
execution of the instruction.
See also
Result codes for SCLF When a tag is assigned to store the result of an Equipment Sequence Clear Failure
(SCLF) instruction, the instruction returns one of the following codes when it
instructions executes.
Use the Result operand to get a code that shows the success or failure of the SCLF
instruction. The Result operand should contain either 0 or a DINT tag,
depending on whether ownership conflicts or other errors are likely to occur.
• If ownership conflicts or other errors are not likely, enter 0 in the Result
operand.
• If ownership conflicts or other errors are likely, enter a DINT tag in
the Result operand. The DINT tag stores a code for the result of the
execution of the instruction.
See also
Result codes for SCMD When a tag is assigned to store the result of an Equipment Sequence command
(SCMD) instruction, the instruction returns one of these codes when it runs.
instructions
Code (Dec) Description
0 The command was successful.
48 The command was not executed because it was not possible at the time to generate an event to
record the command.
• If the command was an ABORT command, the ABORT command is still executed even if the event
could not be generated.
• This code only occurs if event generation has been enabled in the Equipment Sequence
Properties - Configuration tab.
24577 The command is not valid.
24578 The command is not valid for the current state of the Equipment Sequence. For example, if the
Equipment Sequence is in the running state, then a start command is not valid.
24579 The Equipment Sequence cannot be commanded for the following reason:
• The program successfully attached to the Equipment Sequence, but it cannot command the
sequence because Logix Designer, a higher priority application, has overridden ownership.
24582 Attachment to the Equipment Sequence failed because the sequence was previously attached to one
of the following users:
• An external sequencer, such as FactoryTalk Batch software, has ownership.
• Another program in the controller (an internal sequencer) has ownership.
• An operator using the Sequence Manager ActiveX Controls has ownership.
24580 The caller of the instruction is attached, but is not the current owner of the Equipment Sequence. A
higher priority owner, such as Logix Designer, is commanding the Equipment Sequence.
24594 The Equipment Sequence is unscheduled, inhibited, or in a task that is inhibited.
24604 An equal or higher priority command is being processed.
24631 Too many sequence parameter or step tags are defined per step, so events cannot be handled and
the START command failed.
Use the Result operand to get a code that shows the success or failure of the
SCMD instruction. The Result operand should contain either 0 or a DINT tag,
depending on whether ownership conflicts or other errors are likely to occur.
• If ownership conflicts or other errors are not likely, enter 0 in the Result
operand.
• If ownership conflicts or other errors are likely, enter a DINT tag in
the Result operand. The DINT tag stores a code for the result of the
execution of the instruction.
See also
Result codes for SOVR When a tag is assigned to store the result of an Equipment Sequence Override
(SOVR) instruction, the instruction returns one of the following codes when it
instructions executes.
Use the Result operand to get a code that shows the success or failure of the
SOVR instruction. The Result operand should contain either 0 or a DINT tag,
depending on whether ownership conflicts or other errors are likely to occur.
• If ownership conflicts or other errors are not likely, enter 0 in the Result
operand.
• If ownership conflicts or other errors are likely, enter a DINT tag in
the Result operand. The DINT tag stores a code for the result of the
execution of the instruction.
See also
SASI instruction examples The following example shows the SASI instruction as it appears in a ladder
diagram and in structured text.
Tip: The Sequence ID parameter can be a STRING tag in which the identifier is stored, or
a quoted string containing up to 82 characters.
if (IdControl) then
end_if;
See also
SATT instruction examples The following examples show the SATT instruction as it appears in a Ladder
Diagram and in Structured Text.
Ladder Diagram
Structured Text
if (AttachControl) then
end_if;
See also
SCLF instruction examples The following examples show the SCLF instruction as it appears in a ladder
diagram and in structured text.
if (ClearFailureControl) then
SCLF (Make_Product_101);
end_if;
See also
SCMD instruction examples The following examples show the Equipment Sequence command (SCMD)
instruction as it appears in a Ladder Diagram and in Structured Text.
Ladder Diagram
Structured Text
if (HoldControl) then
end_if;
See also
SDET instruction examples The following examples show the SDET instruction as it appears in a ladder
diagram and in structured text.
Ladder Diagram
Structured Text
if (DetachControl) then
SDET (Make_Product_101);
end_if;
See also
SOVR instruction examples The following examples show the SOVR instruction as it appears in a Ladder
Diagram and in Structured Text.
Ladder Diagram
Structured Text
if (StopControl) then
end_if;
See also
When should I use an SOVR Under most circumstances, use the SCMD instruction to programmatically
command an Equipment Sequence. However, use the SOVR instruction to
instruction instead of an command an Equipment Sequence under the following conditions:
SCMD instruction?
• When you are giving the HOLD, STOP, or ABORT command, and the
command must always execute under all ownership circumstances.
• If the HOLD, STOP, or ABORT command must execute even when you
have manual control of the Equipment Sequence through the Logix
Designer application or when another program, such as the FactoryTalk
Batch software, owns the Equipment Sequence.
For example, suppose your equipment checks for jammed material. If there is a
jam, you always want the equipment to abort. In that case, use the SOVR
instruction. This way, the equipment aborts even if you have manual control
through the Logix Designer application.
See also
Click a topic below for more information on issues that are unique to function
block programming. Review this information to make sure you understand how
your function block routines will operate.
See also
Block Elements
Use the following table to help you choose your function block elements:
If you want to supply a value from an input device or tag Then use a input reference (IREF)
Send a value to an output device or tag Output reference (OREF)
Perform an operation on an input value or values and produce an output value Function block
or values.
Transfer data between function blocks when they are: Output wire connector (OCON) and an input wire connector (ICON)
• Far apart on the same sheet
• On different sheets within the same routine
Disperse data to several points in the routine Single output wire connector (OCON) and multiple input wire connectors
(ICON)
The function block moves the input references into the block structure. If
necessary, the function block converts those input references to REAL values. The
function block executes and moves the results into the output references. Again, if
necessary, the function block converts those result values from REAL to the data
types for the output references.
Latching Data If you use an IREF to specify input data for a function block instruction, the data
in that IREF is latched for the scan of the function block routine. The IREF
latches data from program-scoped and controller-scoped tags. The controller
updates all IREF data at the beginning of each scan.
In this example, the value of tagA is stored at the beginning of the routine’s
execution. The stored value is used when Block_01 executes. The same stored
value is also used when Blcock_02 executes. If the value of tagA changes during
execution of the routine, the stored value of tagA in the IREF does not change
until the next execution of the routine.
This example is the same as the one above. The value of tagA is stored only once at
the beginning of the routine’s execution. The routine uses this stored value
throughout the routine.
You can use the same tag in multiple IREFs and an OREF in the same routine.
Because the values of tags in IREFs are latched every scan through the routine, all
IREFs will use the same value, even if an OREF obtains a different tag value during
execution of the routine.
In this example, if tagA has a value of 25.4 when the routine starts executing this
scan, and Block_01 changes the value of tagA to 50.9, the second IREF wired into
Block_02 will still use a value of 25.4 when Block_02 executes this scan. The new
tagA value of 50.9 will not be used by any IREFs in this routine until the start of
the next scan.
Function Block Responses In general, the function block instructions that maintain history do not update
history with NAN, or INF values when an overflow occurs. Each
to Overflow Conditions instruction has one of these responses to an overflow condition.
Response Instruction
Response 1 ALM NTCH
Blocks execute their algorithm and check the result for DEDT PMUL
NAN or INF. If NAN or INF, the block outputs DERV POSP
NAN or INF. ESEL RLIM
FGEN RMPS
HPF SCRV
LDL2 SEL
LDLG SNEG
LPF SRTP
MAVE SSUM
MAXC TOT
MINC UPDN
MSTD
MUX
Response 2 HLL, INTG, PI, PIDE, SCL, SOC
Blocks with output limiting execute their algorithm and check the result for
NAN or INF. The output limits are defined by the HighLimit and
LowLimit input parameters. If INF, the block outputs a limited result. If
NAN, the output limits are not used and the block outputs NAN.
Response 3 BAND, BNOT, BOR, BXOR, CUTD, D2SD, D3SD,
The overflow condition does not apply. These instructions typically have a DFF, JKFF, OSFI, OSRI, RESD, RTOR, SETD,
boolean output. TOFR, TONR
Order of Execution The Logix Designer programming application automatically determines the order
of execution for the function blocks in a routine when you:
You define execution order by wiring function blocks together and indicating the
data flow of any feedback wires, if necessary.
If function blocks are not wired together, it does not matter which block executes
first. There is no data flow between the blocks
If you wire the blocks sequentially, the execution order moves from input to
output. The inputs of a block require data to be available before the controller can
execute that block. For example, block 2 has to execute before block 3 because the
outputs of block 2 feed the inputs of block 3.
Execution order is only relative to the blocks that are wired together. The
following example is fine because the two groups of blocks are not wired together.
The blocks within a specific group execute in the appropriate order in relation to
the blocks in that group.
Resolve a Loop
To create a feedback loop around a block, wire an output pin of the block to an
input pin of the same block. The following example is OK. The loop contains only
a single block, so execution order does not matter.
If a group of blocks are in a loop, the controller cannot determine which block to
execute first. In other words, it cannot resolve the loop.
To identify which block to execute first, mark the input wire that creates the loop
(the feedback wire) with the Assume Data Available indicator. In the following
example, block 1 uses the output from block 3 that was produced in the previous
execution of the routine.
The Assume Data Available indicator defines the data flow within the loop. The
arrow indicates that the data serves as input to the first block in the loop.
Do not mark all the wires of a loop with the Assume Data Available indicator.
If you use two or more wires to connect two blocks, use the same data flow
indicators for all of the wires between the two blocks.
To produce a one scan delay between blocks, use the Assume Data Available
indicator. In the following example, block 1 executes first. It uses the output from
block 2 that was produced in the previous scan of the routine.
Summary
2. The controller executes the other function blocks in the order determined
by how they are wired.
Timing Modes These process control and drives instructions support different timing modes.
Time-based instructions require a constant value for DeltaT in order for the
control algorithm to properly calculate the process output. If DeltaT varies, a
The instructions that support time-base modes have these input and output
parameters.
Input Parameters
RTSTime DINT Module update period for real time sampling timing. The
expected DeltaT update period is in milliseconds. The update
period is normally the value that was used to configure the
module’s update time. If invalid, the instruction sets the
appropriate bit in Status and disables RTSMissed checking.
Valid = 1…32,767ms
Default = 1
RTSTimeStamp DINT Module time stamp value for real time sampling timing. The
time stamp value that corresponds to the last update of the input
signal. This value is used to calculate DeltaT. If invalid, the
instruction sets the appropriate bit in Status, disables execution
of the control algorithm, and disables RTSMissed checking.
Valid =0…32,767ms (wraps from 32767 to 0)
1 count = 1 millisecond
Default = 0
Output Parameters
Program/Operator Control The following instructions support the concept of Program/Operator control.
Input Description
.ProgProgReq A program request to go to Program control.
.ProgOperReq A program request to go to Operator control.
.OperProgReq An operator request to go to Program control.
.OperOperReq An operator request to go to Operator control.
Operator control takes precedence over Program control if both input request bits
are set. For example, if ProgProgReq and ProgOperReq are both set, the
instruction goes to Operator control.
The Program request inputs take precedence over the Operator request inputs.
This provides the capability to use the ProgProgReq and ProgOperReq inputs to
‘lock’ an instruction in a desired control.
For example, let’s assume that a Totalizer instruction will always be used in
Operator control, and your user program will never control the running or
stopping of the Totalizer. In this case, you could wire a literal value of 1 into the
ProgOperReq. This would prevent the operator from ever putting the Totalizer
into Program control by setting the OperProgReq from an operator interface
device.
Likewise, constantly setting the ProgProgReq can ‘lock’ the instruction into
Program control. This is useful for automatic startup sequences when you want
the program to control the action of the instruction without worrying about an
operator inadvertently taking control of the instruction.
In this example, you have the program set the ProgProgReq input during the
startup, and then clear the ProgProgReq input once the startup was complete.
Once the ProgProgReq input is cleared, the instruction remains in Program
control until it receives a request to change. For example, the operator could set
the OperOperReq input from a faceplate to take over control of that instruction.
The following example shows how to lock an instruction into Program control.
Program request inputs are not normally cleared by the instruction because these
are normally wired as inputs into the instruction. If the instruction clears these
inputs, the input would just get set again by the wired input. There might be
situations where you want to use other logic to set the Program requests in such a
manner that you want the Program requests to be cleared by the instruction. In
this case, you can set the ProgValueReset input and the instruction will always
clear the Program mode request inputs when it executes.
In this example, a rung of ladder logic in another routine is used to one-shot latch
a ProgAutoReq to a PIDE instruction when a push button is pushed.
Function Block States Logix-based controllers evaluate function block instructions based on the state of
different conditions:
Condition Description
prescan Prescan for function block routines is the same as for ladder diagram routines. The only
difference is that the EnableIn parameter for each function block instruction is cleared during
prescan.
instruction first scan Instruction first scan refers to the first time an instruction is executed after prescan. The
controller uses instruction first scan to read current inputs and determine the appropriate
state to be in.
instruction first run Instruction first run refers to the first time the instruction executes with a new instance of a
data structure. The controller uses instruction first run to generate coefficients and other data
stores that do not change for a function block after initial download.
If the EnableIn parameter is not wired, the instruction always executes as normal
and EnableIn remains set. If you clear EnableIn, it changes to set the next time the
instruction executes.
These are the issues that are unique with structured text programming. Review the
following topics to make sure you understand how your structured text
programming executes.
Structured Text Syntax Structured text is a textual programming language that uses statements to define
what to execute.
Structured text is not case sensitive. Structured text can contain these
components.
See also
Structured Text To make your structured text easier to interpret, add comments to it.
Components: Comments • Comments let you use plain language to describe how your structured text
works.
• Comments do not affect the execution of the structured text.
For example:
Format Example
//comment At the beginning of a line
//Check conveyor belt direction
IF conveyor_direction THEN...
At the end of a line
ELSE //If conveyor isn’t moving, set alarm light
light := 1;
END_IF;
Structured Text Use an assignment to change the value stored within a tag. An assignment has this
syntax:
Components:
Assignments tag := expression;
where:
Component Description
Tag Represents the tag that is getting the new value; the tag must be a BOOL, SINT, INT, DINT,
STRING, or REAL.
Tip: The STRING tag is applicable to CompactLogix 5380, CompactLogix 5480, ControlLogix 5580,
Compact GuardLogix 5380, and GuardLogix 5580 controllers only.
:= Is the assignment symbol
Expression Represents the new value to assign to the tag
If tag is this data type Use this type of expression
BOOL BOOL
SINT Numeric
INT
DINT
REAL
STRING String type, including string tag and string literal
(CompactLogix 5380, CompactLogix (CompactLogix 5380, CompactLogix 5480,
5480, ControlLogix 5580, Compact ControlLogix 5580, Compact GuardLogix 5380, and
GuardLogix 5380, and GuardLogix 5580 GuardLogix 5580 controllers only).
controllers only).
; Ends the assignment
The tag retains the assigned value until another assignment changes the value.
The expression can be simple, such as an immediate value or another tag name, or
the expression can be complex and include several operators and functions, or
both. Refer to Expressions for more information.
Tip: I/O module data updates asynchronously to the execution of logic. If you reference an input multiple times in your
logic, the input could change state between separate references. If you need the input to have the same state for
each reference, buffer the input value and reference that buffer tag. For more information, see Logix 5000
Controllers Common Procedures , publication 1756-PM001 .
You can also use Input and Output program parameters which automatically buffer the data during logix
execution. See LOGIX 5000 Controllers Program Parameters Programming Manual , publication 1756-PM021 .
See also
Specify a non-retentive The non-retentive assignment is different from the regular assignment described
above in that the tag in a non-retentive assignment is reset to zero each time the
assignment
controller:
where:
Component Description
tag Represents the tag that is getting the new value; the tag must be a BOOL, SINT, INT,
DINT, STRING, or REAL.
Tip: The STRING tag is applicable toCompactLogix 5380, CompactLogix 5480,
ControlLogix 5580, Compact GuardLogix 5380, and GuardLogix 5580 controllers
only.
[:=] Is the non-retentive assignment symbol.
expression Represents the new value to assign to the tag.
If tag is this data type Use this type of expression
BOOL BOOL
SINT Numeric
INT
DINT
REAL
STRING String type, including string tag and string
(CompactLogix 5380, CompactLogix literal
5480, ControlLogix 5580, Compact CompactLogix 5380, CompactLogix 5480,
GuardLogix 5380, and GuardLogix 5580 ControlLogix 5580, Compact GuardLogix
controllers only). 5380, and GuardLogix 5580 controllers(
only)
See also
To add or insert a string of characters to a string tag, use either of these ASCII
string instructions:
See also
Structured Text An expression is a tag name, equation, or comparison. To write an expression, use
any of the following:
Components: Expressions
• Tag name that stores the value (variable)
• Number that you enter directly into the expression (immediate value)
• String literal that you enter directly into the expression (CompactLogix
5380, CompactLogix 5480, ControlLogix 5580, Compact GuardLogix
5380, and GuardLogix 5580 controllers only)
• Functions, such as: ABS, TRUNC
• Operators, such as: +, -, <, >, And, Or
• Use any combination of upper-case and lower-case letter. For example, these
variations of "AND" are acceptable: AND, And, and.
• For more complex requirements, use parentheses to group expressions
within expressions. This makes the whole expression easier to read, and
ensures that the expression executes in the desired sequence.
• A bool expression uses bool tags, relational operators, and logical operators
to compare values or check if conditions are true or false. For example,
tag1>65.
• A simple bool expression can be a single BOOL tag.
• Typically, use bool expressions to condition the execution of other logic.
If Use
Calculating an arithmetic value Arithmetic operators and functions
Comparing two values or strings Relational operators
Verifying if conditions are true or false Logical operators
Comparing the bits within values Bitwise operators
See also
Use arithmetic operators and Combine multiple operators and functions in arithmetic expressions.
functions Operators calculate new values.
The table provides examples for using arithmetic operators and functions.
See also
Use bitwise operators Bitwise operators manipulate the bits within a value based on two values.
This is an example.
See also
Use logical operators Use logical operators to verify if multiple conditions are true or false. The result of
a logical operation is a BOOL value.
See also
Use relational operators Relational operators compare two values or strings to provide a true or false result.
The result of a relational operation is a BOOL value.
The hexadecimal values of the ASCII characters determine if one string is less than
or greater than another string.
• When the two strings are sorted as in a telephone directory, the order of the
strings determines which one is greater.
See also
Structured Text Structured text statements can also be instructions. A structured text instruction
executes each time it is scanned. A structured text instruction within a construct
Components: Instructions executes every time the conditions of the construct are true. If the conditions of
the construct are false, the statements within the construct are not scanned. There
is no rung-condition or state transition that triggers execution.
This differs from function block instructions that use EnableIn to trigger
execution. Structured text instructions execute as if EnableIn is always set.
This also differs from ladder diagram instructions that use rung-condition-in to
trigger execution. Some ladder diagram instructions only execute when rung-
condition-in toggles from false to true. These are transitional ladder diagram
instructions. In structured text, instructions execute when they are scanned unless
pre-conditioning the execution of the structured text instruction.
END_IF;
The ABL instruction will execute every scan that tag_xic is set, not just when
tag_xic transitions from cleared to set.
If you want the ABL instruction to execute only when tag_xic transitions from
cleared to set, you have to condition the structured text instruction. Use a one-
shot to trigger execution.
osri_1.InputBit := tag_xic;
OSRI(osri_1);
IF (osri_1.OutputBit) THEN
ABL(0,serial_control);
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 519
Chapter 10 Structured Text Programming
END_IF;
• GOTO
• REPEAT
Logix Designer application will not let you use them as tag names or constructs.
See also
Character string literals Character string literals include single byte or double byte encoded characters. A
single-byte string literal is a sequence of zero or more characters that are prefixed
and terminated by the single quote character ('). In single byte character strings,
the three-character combination of the dollar sign ($) followed by two
hexadecimal digits is interpreted as the hexadecimal representation of the eight-bit
character code as shown in the following table.
Tips: • Character string literals are only applicable to the CompactLogix 5380,
CompactLogix 5480, ControlLogix 5580, Compact GuardLogix 5380, and
GuardLogix 5580 controllers.
• Studio 5000 only supports single byte characters.
1d String of length one or character CHAR containing the “single quote” '$''
character
1e String of length one or character CHAR containing the “double quote” '"'
character
1f Support of two character combinations '$R$L'
1g Support of a character representation with ‘$’ and two hexadecimal '$0A'
characters
Tips: • The newline character provides an implementation-independent means of defining the end of
a line of data for both physical and file I/O; for printing, the effect is that of ending a line of data
and resuming printing at the beginning of the next line.
• The $' combination is only valid inside single quoted string literals.
See also
String Types Store ASCII characters in tags that use a string type data type to:
To create a new string type, refer to the Logix 5000 Controllers ASCII Strings
Programming Manual publication 1756-PM013 .
DATA SINT array ASCII characters of the To access the characters of the string, address the name of
string the tag. For example, to access the characters of the
string_1 tag, enter string_1.
See also
Operands
CASE numeric_expression OF
selector1: statement;
Structured Text
Important: If using REAL values, use a range of values for a selector because a REAL
value is more likely to be within a range of values than an exact match of
one, specific value.
Description
No
Major/Minor Faults
None
Example
The [:=] tells the controller to also clear the outlet tags whenever the controller
does the following:
Leaves the step of an SFC if configuring the SFC for Automatic reset. This applies
only embedding the assignment in the action of the step or using the action to call
a structured text routine via a JSR instruction.
FOR_DO Use the FOR_DO loop to perform an action a number of times before doing
anything else.
When enabled, the FOR instruction repeatedly executes the Routine until the
Index value exceeds the Terminal value. The step value can be positive or negative.
If it is negative, the loop ends when the index is less than the terminal value.. If it is
positive, the loop ends when the index is greater than the terminal value.
Each time the FOR instruction executes the routine, it adds the Step size to the
Index.
Do not loop too many times in a single scan. An excessive number of repetitions
causes the controller watchdog to timeout and causes a major fault.
Operands
final_value BY increment DO
<statement>;
END_FOR;
Important: Do not iterate within the loop too many times in a single scan.
The controller does not execute other statements in the routine until it completes the loop.
A major fault occurs when completing the loop takes longer than the watchdog timer for the
task.
Consider using a different construct, such as IF_THEN.
Description
This diagrams illustrates how a FOR_DO loop executes, and how an EXIT
statement leaves the loop early.
The FOR_DO loop executes a specific number of times. To stop the loop before the count reaches the last value, use an EXIT
statement.
No
Major/Minor Faults
Example 1
Example 2
Operands
IF bool_expression THEN
<statement>;
Description
To select from several possible groups of statements, add one or more ELSIF
statements.
The controller executes the first true IF or ELSIF and skips the rest of the ELSIFs
and the ELSE.
To do something when all of the IF or ELSIF conditions are false, add an ELSE
statement.
The table summarizes different combinations of IF, THEN, ELSIF, and ELSE.
No
Major/Minor Faults
None.
Examples
Example 1
IF…THEN
Example 2
IF_THEN_ELSE
The [:=] tells the controller to clear light whenever the controller does the
following :
Leaves the step of an SFC if you configure the SFC for Automatic reset. (This
applies only if you embed the assignment in the action of the step or use the action
to call a structured text routine via a JSR instruction.)
Example 3
IF…THEN…ELSIF
The [:=] tells the controller to clear Sugar.Inlet whenever the controller does the
following :
Leaves the step of an SFC if you configure the SFC for Automatic reset. (This
applies only if you embed the assignment in the action of the step or use the action
to call a structured text routine via a JSR instruction.)
Example 4
IF…THEN…ELSIF…ELSE
Operands
REPEAT
<statement>;
Structured Text
Important: Do not iterate within the loop too many times in a single scan.
The controller does not execute other statements in the routine until it
completes the loop.
A major fault occurs when completing the loop takes longer than the
watchdog timer for the task.
Consider using a different construct, such as IF_THEN.
Description
The following diagrams show how a REPEAT_UNTIL loop executes and how an
EXIT statement leaves the loop early.
While the bool_expression is false, the controller executes only the statements
within the REPEAT_UNTIL loop.
To stop the loop before the conditions are false, use an EXIT statement.
No
Fault Conditions
Example 1
Example 2
WHILE_DO Use the WHILE_DO loop to continue performing an action while certain
conditions are true.
Operands
WHILE bool_expression DO
<statement>;
Structured Text
Important: Do not iterate within the loop too many times in a single scan.
The controller does not execute any other statements in the routine until it completes
the loop.
A major fault occurs when completing the loop takes longer than the watchdog timer
for the task.
Consider using a different construct, such as IF_THEN.
Description
The following diagrams illustrate how a WHILE_DO loop executes, and how an
EXIT statement leaves the loop early.
While the bool_expression is true, the controller To stop the loop before the conditions are true, use an EXIT
executes only the statements within the WHILE_DO loop. statement.
No
Fault Conditions
Example 1
Example 2
Structured Text Click a topic below for more information on issues that are unique to structured
text programming. Review this information to make sure you understand how
Attributes your structured text programming will execute.
See also
Structured Text Components: Assignments on page 510
Structured Text Components: Expressions on page 513
Structured Text Instructions on page 519
Structured Text Components: Constructs on page 520
Structured Text Components: Comments on page 509
Follow the guidelines in this chapter for the common attributes for the Advanced
Process Control and Drives Instructions.
Common Attributes For more information on attributes that are common to the Logix 5000™
instructions, click any of the topics below.
Math Status Flags Follow the guidelines in this topic for Math Status Flags.
Description
Controllers Description
CompactLogix 5380, A set of Math Status Flags for accessing directly with instructions. These flags are only
CompactLogix 5480, updated in ladder diagram routines, and are not tags, and flag aliases are not applicable.
ControlLogix 5580, Compact
GuardLogix 5380, and
GuardLogix 5580 controllers
CompactLogix 5370, A set of Math Status Flags for accessing directly with instructions. These flags are updated in
ControlLogix 5570, Compact all routine types, but are not tags, and flag aliases are not applicable.
GuardLogix 5370, and
GuardLogix 5570 controllers
Status Flags
S:V The controller sets the overflow flag when: The controller sets the
Overflow flag • The result of a math operation results in an overflow. overflow flag when:
For example, adding 1 to a SINT generates an overflow when the • The result of a math
value goes from 127 through -128. operation results in
• The destination tag is too small to hold the value. an overflow.
For example, if you try to store the value 123456 to a SINT or INT For example, adding
tag. 1 to a SINT
generates an
Use the overflow flag to verify the result of an operation is still in overflow when the
range. value goes from
If the data being stored is a string type, S:V is set if the string is too 127…-128.
large to fit into the destination tag.
• The destination tag
Tip: If applicable, set S:V with an OTE or OTL instruction. is too small to hold
Click Controller Properties > Advanced tab > Report Overflow the value.
Faults to enable or disable reporting overflow faults. For example, if you
If an overflow occurs while evaluating an array subscript, a minor try to store the value
fault is generated and a major fault is generated to indicate the index 123456 to a SINT or
is out of range. INT tag.
Important: The math status flags are set based on the stored value. Instructions that normally do not affect
math status flags might appear to affect math status flags if type conversion occurs from mixed
data types for the instruction parameters. The type conversion process sets the math status
flags.
Controllers Description
CompactLogix 5380, Expressions do not set status flags based on the results of math operations. If expressions
CompactLogix 5480, overflow:
ControlLogix 5580, • A minor fault generates if the controller is configured to generate minor faults.
Compact GuardLogix
5380, and GuardLogix • A major fault (type 4, code 20) generates because the resulting value is out of range.
5580 controllers
CompactLogix 5370, Expressions set status flags based on the results of math operations. If an array subscript is an
ControlLogix 5570, expression, the expression and the instruction could generate minor faults.
Compact GuardLogix
5370, and GuardLogix
5570 controllers
Tip: If an array subscript is too large (out of range), a major fault (type 4, code 20) generates.
Immediate values When you enter an immediate value (constant) in decimal format (for example, -
2, 3) the controller stores the value by using 32 bits. If you enter a value in a radix
other than decimal, such as binary or hexadecimal, and do not specify all 32 bits,
the controller places a zero in the bits that you do not specify (zero-fill).
Data Conversions Data conversions occur when mixing data types in programming.
Instructions execute faster and require less memory if all the operands of the
instruction use:
Tip: To reduce the time and memory for converting data, use the same data type for all
the operands of an instruction.
A SINT or INT input source tag gets promoted to a DINT value by a sign-
extension for Source Tag. Instructions that convert SINT or INT values to DINT
values use one of the following conversion methods.
Logical instructions use zero fill. All other instructions use sign-extension
The following example shows the results of converting a value using sign-
extension and zero-fill.
If you use a SINT or INT tag and an immediate value in an instruction that
converts data by sign-extension, use one of these methods to handle immediate
values.
If you enter the value in a radix other than decimal, specify all 32 bits of the
immediate value. To do so, enter the value of the leftmost bit into each bit
position to its left until there are 32 bits.
Create a tag for each operand and use the same data type throughout the
instruction. To assign a constant value, either:
Add a MOV instruction that moves the value into one of the tags.
The following examples show two ways to mix an immediate value with an INT
tag. Both examples check the bits of a 1771 I/O module to determine if all the bits
are on. Since the input data word of a 1771 I/O module is an INT tag, it is easiest
to use a 16-bit constant value.
If the DINT value requires more than 24 significant bits, it might not convert to
the same REAL value. If it will not, the controller stores the uppermost 24 bits
rounded to the nearest even value.
To convert a DINT value to a SINT or INT value, the controller truncates the
upper portion of the DINT and stores the lower bits that fit in the data type. If the
value is too large the conversion generates an overflow.
To convert a REAL value to an integer value, the controller rounds any fractional
part and stores the bits that fit in the result data type. If the value is too large the
conversion generates an overflow.
Elementary data types The controller supports the elementary data types defined in IEC 1131-3 defined
data types. The elementary data types are:
The REAL data type also stores infinity and NAN, but the software
display differs based on the display format.
When data types are mixed for operands within an instruction, some instructions
automatically convert data to an optimal data type for that instruction. In some
cases, the controller converts data to fit a new data type; in some cases the
controller just fits the data as best it can.
Conversion Result
larger integer to smaller integer The controller truncates the upper portion of the larger integer and
generates an overflow.
For example:
Decimal Binary
Unsigned integer to signed integer If the source value is too big to fit into destination the controller stores what
it can and may produce an overflow.
REAL to integer The controller rounds the fractional part and truncates the upper portion of
the non-fractional part. If data is lost, the controller sets the overflow status
flag.
Rounding is to the nearest whole number:
less than 0.5, round down; equal to 0.5, round to nearest even integer;
greater than 0.5, round up
For example:
REAL (source) DINT (result)
1.6 2
-1.6 -2
1.5 2
-1.5 -2
1.4 1
-1.4 -1
2.5 2
-2.5 -2
Important: The math status flags are set based on the value being stored. Instructions that normally do not affect
math status keywords might appear to do so if type conversion occurs because of mixed data types for
the instruction parameters. The type conversion process sets the math status keywords.
See also
Consider the following when using LINT data type on CompactLogix 5370,
ControlLogix 5570, Compact GuardLogix 5370, GuardLogix 5570 controllers.
Tip: LINTs can only be used with copy (COP, CPS) instructions. They are used with the
CST/WallClock Time attribute, time synchronization and Add-On Instructions. You
cannot add, subtract, multiply, or divide this tag type.
When using LINT data types, consider the following descriptions when these
issues occur.
How to Description
Move/copy two double-integer DINT values into one LINT Create a double integer array of two elements, total of 64
bits (that is, DINT[2], which can then be copied into one
long integer.
Correct Date/Time Display error When a tag has a negative value, it cannot be displayed as
Date/Time. In the tag editor, check whether the value is
negative by changing the style of the tag from Date/Time
to Binary. When the most significant bit (leftmost one) is
1, the value is negative and therefore cannot be displayed
as a Date or Time.
Floating Point Values 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. Controller differences are noted where applicable.
Logix controllers handle floating point values according to the IEEE 754 standard
for floating-point arithmetic. This standard defines how floating point numbers
are stored and calculated. The IEEE 754 standard for floating point math was
designed to provide speed and the ability to handle very large numbers in a
reasonable amount of storage space.
If a computation results in a NAN value, the sign bit could be positive or negative.
In this situation, the software displays 1#.NAN with no sign.
Not all decimal values can be exactly represented in this standard format, which
results in a loss of precision. For example, if you subtract 10 from 10.1, you expect
the result to be 0.1. In a Logix controller, the result could very well be 0.10000038.
In this example, the difference between 0.1 and 0.10000038 is .000038%, or
practically zero. For most operations, this small inaccuracy is insignificant. To put
things in perspective, if you were sending a floating point value to an analog
output module, there would be no difference in the output voltage for a value
being sent to the module that differs by .000038%.
Do not use floating point math for money values or for totalizer functions. Use
INT or DINT values, scale the values up, and keep track of the decimal place (or
use one INT or DINT value for dollars, and a second INT or DINT value for
cents).
Do not compare floating-point numbers. Instead, check for values within a range.
The LIM instruction is provided specifically for this purpose.
Totalizer Examples
The precision of the REAL data type affects totalization applications such that
errors occur when adding very small numbers to very large numbers.
For example, add 1 to a number over a period of time. At some point the add will
no longer affect the result because the running sum is much greater than 1, and
there are not enough bits to store the entire result. The add stores as many upper
bits as possible and discards the remaining lower bits.
To work around this, do math on small numbers until the results get large. Then,
transfer them to another location for additional large-number math. For example:
Or another example:
• x = x + some_tiny_number;
• if (x >= 100)
• {
• z = z + 100;
• x = x - 100; // there might be a tiny remainder
• }
Index Through Arrays To dynamically change the array element that your logic references, use tag or
expression as the subscript to point to the element. This is similar to indirect
addressing in PLC-5 logic. Use these operators in an expression to specify an array
subscript:
Tips: • Logix Designer allows subscripts that are extended data type tags only, and does not support subscript
expressions that have extended data types.
• All available integer elementary data types can be used as a subscript index. Only use SINT, INT, and
DINT tags with operators to create a subscript expression.
Operator Description
+ add
- subtract/negate
* multiply
/ divide
AND AND
FRD BCD to integer
NOT complement
OR OR
TOD integer to BCD
SQR square root
XOR exclusive OR
For example:
Tip: When entering an array subscript, make sure it is within the boundaries of the specified array.
Instructions that view arrays as a collection of elements generate a major fault (type 4, code 20) if a
subscript exceeds its corresponding dimension.
Bit Addressing Bit addressing is used access a particular bit within a larger container. Larger
containers include any integer, structure or BOOL array. For example:
See also
Function Block Faceplate The Logix Designer programming application includes faceplate controls for some
function block instructions. Faceplates are Active-X controls used in applications
Controls that acts as an Active-X container. The faceplates communicate with the
controller via the <RSLC> OPC Server or the FactoryTalk Linx Gateway.
Important: The Logix Designer programming application is not a valid Active-X container. An Active-X
container is required to use the faceplates.
Configure the faceplates through property pages that open through container
applications.
• General
• Display
• Font
• Locale
See also
Faceplate Control Use this tab to define/modify how the control operates.
Select RSLinx Classic OPC Server or FactoryTalk Linx. If you select RSLinx
Classic OPC Server, you must also specify:
If you select FactoryTalk Linx FactoryTalk, you must also specify the FactoryTalk
Area
Tag
Enter the name of a specific function block instruction to connect with this
control.
Update Rate
Enter the Update Rate of the control in seconds. You can click the arrows to
increment this value in 0.25 second increments. The default value is 1.00 second.
See also
Faceplate Control Use this tab to define how the faceplate control will appear on your screen.
This button indicates the color of the faceplate’s background. Click the button to
change this color. The default color is light gray.
Show Frame
Check or uncheck this box, depending on whether or not you wish to display a 3-
dimensional frame around this control. Using this option allows you to separate
the control from other items that may appear on your display. This option is
checked, by default.
OK
Click this button to accept your edits and close the Faceplate Control Properties
dialog.
Cancel
Click this button to cancel your edits and close the Faceplate Control Properties
dialog.
Apply
Click this button to apply your edits and continue editing in the Faceplate
Control Properties dialog.
See also
Faceplate Control Use this tab to define the fonts that appear on the faceplates. From here, you can
configure a ControlFont to be used in the main part of the faceplate, and a
Properties Dialog - Font Tab MinorFont to be used in scales and other minor portions of the faceplate.
Parameters
Property Name
Choose the font you want to configure from the pull-down menu. Choose from
ControlFont or MinorFont; the default is ControlFont.
Font
Choose the font you wish to use for the control from the list of available fonts.
The default font is Arial.
Style
Choose the style you wish to use for the control from the pull-down menu. The
default style is Regular.
Size
Enter the point size you wish to use for this font. The default size of the
ControlFont is 10.5 points; the default size of the MinorFont is 8.25 points.
Strikeout
Check this box if you want to use the strikeout effect, which draws a line through
the font. This option is unchecked, by default.
Underline
Check this box if you want to use the underline effect, which draws a line below
the font. This option is unchecked, by default.
OK
Click this button to accept your edits and close the Faceplate Control Properties
dialog.
Cancel
Click this button to cancel your edits and close the Faceplate Control Properties
dialog.
Apply
Click this button to apply your edits and continue editing in the Faceplate
Control Properties dialog.
See also
Faceplate Control Use this tab to define the language requirements for the faceplates.
Choose the language you want to use from the pull-down menu. Choose from:
• English
• Portuguese
• French
• Italian
• German
• Spanish
OK
Click this button to accept your edits and close the Faceplate Control Properties
dialog.
Cancel
Click this button to cancel your edits and close the Faceplate Control Properties
dialog.
Apply
Click this button to apply your edits and continue editing in the Faceplate
Control Properties dialog.
See also
C
H
CC 147
HLL 357
HPF 324
D
DEDT 51
I
derivative (DERV) 320
DFF 401 IMC 184
discrete 2-state device (D2SD) 41 INTG 264
discrete 3-state device (D3SD) 26
J
E JKFF 404
enhanced select (ESEL) 350
Equipment diagram instructions 476
L
equipment phase 415, 424, 427, 433, 443, 448, 451, 455, 460
equipment phase clear failure - PCLF 424 LDL2 341
equipment phase command - PCMD 427 LDLG 62
equipment phase external request - PXRQ 433 LPF 330
equipment phase failure - PFL 443
equipment phase instructions 415 M
equipment phase new parameters - PRNP 448
equipment phase override command - POVR 451 MAVE 382
equipment phase paused - PPD 455 MAXC 388
phase state complete (PSC) 460 MINC 392
Equipment Sequence Instruction examples 485, 486, 487, 488 MMC 204
Equipment Sequence Instructions 465, 468, 470, 471, 473, 476 MSTD 395
MUX 362
F
N
Faceplate Control Properties dialog 553, 554, 555, 556
Display tab 554 NTCH 336
faceplates 552
Font tab 555 P
General tab 553
PATT 416
Locale tab 556
PCLF 424
FGEN 56
PCMD 427
Filter Instructions 319
PDET 421
function block 491, 492, 493, 494, 495, 499, 502, 505, 552
PFL 443
attributes 491, 492, 493, 494, 495, 499, 502
PI 270
faceplates 552
Rockwell Automation Publication 1756-RM006K-EN-P - November 2018 559
Index
PIDE 67
PMUL 281
POSP 102
POVR 451
PPD 455
PRNP 448
PSC 460
PXRQ 433
R
ramp/soak (RMPS) 111
reset dominant (RESD) 407
Result Codes for Equipment Sequence Instructions 481, 482, 483, 484
RLIM 365
S
scale (SCL) 125
S-Curve (SCRV) 289
second-order controller (SOC) 298
SEL 370
selected negate (SNEG) 373
selected summer (SSUM) 376
set dominant (SETD) 411
SOC 298
SRTP 130
T
totalizer (TOT) 137
U
UPDN 308
In addition, we offer multiple support programs for installation, configuration, and troubleshooting. For more information, contact your local
distributor or Rockwell Automation representative, or visit http://www.rockwellautomation.com/services/online-phone .
Installation assistance
If you experience a problem within the first 24 hours of installation, review the information that is contained in this manual. You can contact
Customer Support for initial help in getting your product up and running.
United States Contact your distributor. You must provide a Customer Support case number (call the phone number above to obtain one) to
your distributor to complete the return process.
Outside United States Please contact your local Rockwell Automation representative for the return procedure.
Documentation feedback
Your comments will help us serve your documentation needs better. If you have any suggestions on how to improve this document, complete the
feedback form, publication RA-DU002
Supersedes Publication Publication 1756-RM006J-EN-P - February 2018 Copyright © 2019 Rockwell Automation Technologies, Inc. All Rights Reserved. Printed in the U.S.A.