DeltaV Function
DeltaV Function
D800018X012
2004 Fisher-Rosemount Systems, Inc. All rights reserved. Printed in USA DeltaV, the DeltaV design, and PlantWeb are marks of one of the Emerson Process Management group of companies. All other marks are property of their respective owners. The contents of this publication are presented for informational purposes only, and while every effort has been made to ensure their accuracy, they are not to be construed as warrantees or guarantees, expressed or implied, regarding the products or services described herein or their use or applicability. All sales are governed by our terms and conditions, which are available on request. We reserve the right to modify or improve the design or specification of such products at any time without notice.
Contents
Function Blocks - General Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Function Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 General Function Block Information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 Function Block Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Function Block Composites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Function Block Status Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Function Block Alarm Detection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Fieldbus Function Block Information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
I/O Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Alarm Detection Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77 Analog Input (AI) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 Analog Output (AO) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 97 Discrete Input (DI) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 Discrete Output (DO) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 Multiple Discrete Input (FFMDI) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123 Multiple Discrete Output (FFMDO) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 Multiplexed Analog Input (FFMAI) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Pulse Input (PIN) Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
iii
Scaler Function Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262 Signal Characterizer Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265 Signal Generator Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Signal Selector Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275 Splitter Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
iv
Reset/Set Flip-flop Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431 Set/Reset Flip-flop Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433 Transfer Function Block . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
vi
Function Blocks
The DeltaV system utilizes modular configuration for developing a control strategy. The control modules are treated as unique, named control entities in the DeltaV system. The function block is the basic component of a control module, that is, it is the building block of the control module. Each function block contains standard process control algorithms (such as PID, Analog Out, and Analog In). Advanced process control algorithms are also found in function blocks, such as the DeltaV system's fuzzy logic PID. When wired together in an appropriate and logical sequence, multiple function blocks form a control module. Refer to the Function Block Diagram topic for more information.
In addition, there is a collection of special items that contains input and output parameters, internal read and write parameters, and custom and physical block tools.
Add (ADD)
Math Blocks
I/O Blocks
I/O Blocks
And (AND)
Logical Blocks
Arithmetic
Math Blocks
Icon
Description Provides adjustable gain capability by computing an output value from a bias setpoint, an input, and a gain value The block supports output tracking. Generates a True (1) discrete pulse output when the discrete input makes a positive (False-to-True) or negative (True-to-False) transition since the last execution of the block. The block supports signal status propagation. Generates a discrete output based on the weighted binary sum, binary coded decimal (BCD) representation, transition state, or logical OR of one to sixteen discrete inputs. The block supports signal status propagation. Decodes a binary weighted floating point input to individual bits and generates a discrete output value for each bit (as many as sixteen outputs). The block supports signal status propagation. Allows you to specify an expression that determines the block's output. Mathematical functions, logical operators, constants, parameter references, and I/O reference values can be used in the expression. Compares two values and sets a Boolean output based on that comparison. Evaluates a single-line expression and generates a discrete output value when the expression is evaluated True (1) for longer than a specified time period. Mathematical functions, logical operators, and constants can be used in the expression. Selects one of three control signals to perform override control to a PID function block. The block supports mode control.
Logical Blocks
Logical Blocks
Logical Blocks
Calculation/Logic (CALC)
Comparator (CMP)
Math Blocks
Condition (CND)
Logical Blocks
Icon
Description Generates a discrete output of True (1) when the count reaches a specified trip value. The block functions as an incremental (up) counter or a decremental (down) counter. The block supports signal status propagation. Provides Time Of Day Timer functions. Use the Timer functions to obtain date and time information in various formats, as well as manipulate date and time information. The function block allows scheduling future events at a specified date and time. Introduces a pure time delay in the value and status used in a signal path between two function blocks. The block supports signal status propagation and mode control. Provides setpoint control for multistate discrete devices. As many as four inputs and four outputs can be controlled. The basic functionality is augmented by an assortment of interlocks and device control options to customize the block's operation to your application. The block supports mode control, simulation, field device confirmation, and alarm limit detection. Provides a method to monitor device alerts from non-fieldbus assets. Wire parameters or block outputs that indicate device health for nonfieldbus blocks to the Diagnostic block. These alerts from these diagnostic blocks are monitored by the Inspect application. Accesses a single discrete measurement value and status from a two-state field device and makes the processed physical input available to other function blocks. The block supports mode control, signal status propagation, and simulation.
Timer/Counter Blocks
Deadtime (DT)
Logical Blocks
Diagnostic (DIAG)
I/O Blocks
Icon
Description Takes a binary setpoint and writes it to a specified I/O channel to produce an output signal. The block supports mode control, output tracking, simulation, and field device confirmation. Divides one input value by another input value and generates an output value. The block supports signal status propagation. Applies an equation to filter changes in the input signal and generates a smooth output signal. The block supports signal status propagation. Implements the American Gas Association flow calculation standards for natural gases, namely AGA-3 (American Gas Association, Report No.3), AGA-7, and AGA-8. Provides all the logic to perform standard PID control with the added benefit of superior response for both set point changes and external load disturbances. A mathematical and logical input calculation block that chooses an output based on up to 4 inputs. A mathematical and logical input calculation block that chooses an output based on up to 8 inputs. A block that receives statistics data so that you can view, plot, and add to history, the performance values in the system.
Divide (DIV)
Math Blocks
Filter (FLTR)
Icon
Description Integrates a variable over time. The block compares the integrated or accumulated value to pre-trip and trip limits and generates discrete output signals when the limits are reached. The integrated value can increment from zero or decrement from the trip value. The block has two inputs and can calculate and integrate net flow, as well as handling negative flow. The block supports mode control. Calculates the final enthalpy for isentropic expansion of steam to a given pressure for a given entropy. Provides for operator input of offline lab analysis results. Provides dynamic compensation for an input value. The block can apply a lead time function, a lag time function, or a combination of the two. A specified gain is applied to the compensated value, and the value is high/low-limited based on the block mode. The block supports mode control and signal status propagation. Limits an input value between two reference values. The block supports signal status propagation. Allows the block output to be set by an operator. The block supports output tracking and alarm detection. Allows interactive processes to be controlled within measurable operating constraints while automatically accounting for process interaction and measurable disturbances.
Lead/Lag (LL)
Limit (LIM)
Icon
Description Allows large interactive processes (as large as 20 x20) to be controlled within measurable operating constraints while accounting for process interaction and measurable disturbances. An embedded optimizer is included with the MPCPro block that can be used to effectively provide maximum profit or lowest cost production with the process constraints and limits on process inputs. Simulates the actual process for use with the MPC function block for operator training. Combines the eight channels of a Discrete Input card and makes them available as an 8-bit input to other function blocks. Takes an 8-bit setpoint and writes it to the I/O channels of a Discrete Output card on an H1 Carrier device. Connects higher density transmitters to a Fieldbus segment. Selects one input value from as many as sixteen input values and places it at the output. The block supports signal status propagation. Multiplies two to sixteen input values and generates an output value. The block supports signal status propagation. Generates a True (1) discrete pulse output when the discrete input makes a negative (True-to-False) transition since the last execution of the block. The block supports signal status propagation. Uses a neural network to predict a process output based on measured process inputs.
I/O Blocks
Multiple Discrete Output (FFMDO) Multiplexed Analog Input (MAI) Multiplexer (MLTX)
I/O Blocks
I/O Blocks
Logical Blocks
Multiply (MLTY)
Math Blocks
Logical Blocks
Icon
Description Logically inverts a discrete input signal and generates a discrete output value. The block supports signal status propagation. Delays the transfer of a False (0) discrete input value to the output by a specified time period. The block supports signal status propagation. Delays the transfer of a True (1) discrete input value to the output by a specified time period. The block supports signal status propagation. Generates a discrete output value based on the logical OR of two to sixteen discrete inputs. The block supports signal status propagation. Combines all the necessary logic to perform analog input channel processing, proportional-integralderivative (PID) control, and analog output channel processing within one function block. The block supports mode control, signal scaling and limiting, feedforward control, override tracking, alarm limit detection, and signal status propagation. Generates a True (1) discrete pulse output when the discrete input makes a positive (False-to-True) transition since the last execution of the block. The block supports signal status propagation. Provides analog input values from Pulse Input channels on the Multifunction I/O card. Creates a ramping output signal to increase or decrease a variable toward a specified target value at a defined rate. The block supports signal status propagation.
Timer/Counter Blocks
Timer/Counter Blocks
Or (OR)
Logical Blocks
PID (PID)
Logical Blocks
I/O Blocks
Ramp (RAMP)
Icon
Description Limits the rate of change of the output value to specified limits. The block supports signal status propagation. Applies an adjustable ratio setpoint to achieve a desired input/output relationship. The block supports signal filtering, mode control, output tracking, and alarm detection. Generates a discrete output value based on NOR logic of reset and set inputs. Generates a True (1) discrete output after the input has been True for a specified time period. The elapsed time the input has been True and the output value are reset when the reset input is set True. Provides scaling and dimensional consistency between two values of different engineering units. The block converts the input value to the specified scale and generates an output value. The block supports signal status propagation. Generates a discrete output value based on NAND logic of set and reset inputs. Characterizes or approximates any function that defines an input/output relationship. The block interpolates an output value for a given input value using the curve defined by the configured coordinates. Two separate analog input signals can be processed simultaneously to give two corresponding separate output values using the same defined curve. The block supports signal status propagation.
Ratio (RTO)
Logical Blocks
Timer/Counter Blocks
Scaler (SCLR)
Logical Blocks
Icon
Description Produces an output signal used to simulate a process signal. The block uses a specified combination of a sine wave, a square wave, a bias value, and a random value to generate the output signal. Selects the maximum, minimum, or average of as many as sixteen input values and places it at the output. The block supports signal status propagation. Takes a single input and calculates two outputs based on specified coordinate values. The block supports mode control and signal status propagation. Subtracts one input value from another input value and generates an output value. The block supports signal status propagation. Calculates the square root of the ratio of steam density to the density of steam corresponding to a flow meter calibration pressure and temperature. Calculates steam enthalpy, entropy, specific volume, and pressure for saturation conditions specified by a given temperature. Calculates steam enthalpy, entropy, and specific volume for a given gauge pressure. Calculates the steam temperature at saturation given the steam pressure. Generates a True (1) discrete output for a specified time duration when the input makes a positive (False-toTrue) transition. The output remains True even when the input returns to its initial discrete value and returns to its original False value only when the output is True longer than the specified time duration.
Splitter (SPLTR)
Subtract (SUB)
Math Blocks
Saturated Steam Properties at Temperature (SST) Steam Properties (STM) Saturated Temperature (TSS) Timed Pulse (TP)
Timer/Counter Blocks
10
Icon
Description Selects one of two analog input signals and transfers the selected input to the output after a specified time. The transfer from one input to another is smoothed with a linear ramp. The block supports signal status propagation. Calculates the entropy of water for a specified temperature. Calculates the enthalpy of water for a specific temperature.
Extensible Blocks
Many of the standard function blocks are extensible. This capability means you can increase the number of some of the parameters. The function blocks that are extensible are: Add, And, BFI, BFO, Calc/Logic, Multiply, Multiplexer, Or, and Signal Selector. For example, you do not have to join together multiple ADD blocks to add more than two numbers together. You can extend the number of inputs on the block and wire as many as 16 values into a single ADD block. Refer to the Extensible Parameters topic for more information.
11
12
13
Supported Modes for Function Blocks Function Block Analog Input Function Block Supported Modes Out of Service (OOS) Manual (Man) Automatic (Auto) Initialization Manual (IMan) Out of Service (OOS) Local Override (LO)* Manual (Man) Automatic (Auto) Cascade (Cas) Remote Cascade (Rcas) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Initialization Manual (IMan) Local Override (LO) Manual (Man) Automatic (Auto) Cascade (Cas) Remote Cascade (Rcas) Out of Service (OOS) Initialization Manual (IMan) Manual (Man) Automatic (Auto) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS)* Local Override (LO)* Automatic (Auto) Cascade (Cas) Remote Cascade (RCas)* Out of Service (OOS) Manual (Man) Automatic (Auto) Initialization Manual (IMan) Out of Service (OOS) Local Override (LO)* Manual (Man) Automatic (Auto) Cascade (Cas) Remote Cascade (RCas)*
14
Supported Modes Out of Service (OOS) Initialization Manual (IMan) Local Override (LO) Manual (Man) Automatic (Auto) Cascade (Cas) Remote Cascade (RCas) Remote Output (ROut) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Manual (Man) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Initialization Manual (IMan) Local Override (LO) Manual (Man) Out of Service (OOS) Initialization Manual (IMan) Manual (Man) Automatic (Auto) Local Override (LO) Out of Service (OOS) Initialization Manual (IMan) Manual (Man) Automatic (Auto) Local Override (LO) Cascade Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Manual (Man) Automatic (Auto)
15
Supported Modes Out of Service (OOS) Initialization Manual (IMan) Manual (Man) Automatic (Auto) Cascade (Cas) Local Override (LO) Remote Cascade (RCas) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Manual (Man) Automatic (Auto) Out of Service (OOS) Initialization Manual (IMan) Local Override (LO) Manual (Man) Automatic (Auto) Cascade (Cas) Remote Cascade (RCas) Remote Out (ROut) Out of Service (OOS) Initialization Manual (IMan) Local Override (LO) Manual (Man) Automatic (Auto) Cascade (Cas) Remote Cascade (RCas) Out of Service (OOS) Automatic (Auto) Out of Service (OOS) Initialization Manual (IMan) Manual (Man) Automatic (Auto) Cascade (Cas)
Neural Network
* These modes are only visible when the function block is extended to a Fieldbus device.
16
Each block supports a subset of the following modes through the named set parameter, SHED_OPT: RCas Can be a permitted target mode. Remote cascade connection to setpoint. Setpoint is driven through RCAS_IN (the RCas input). The block algorithm determines block outputs. ROut Can be a permitted target mode. Remote cascade connection to output. The block output is driven through ROUT_IN (the ROut input). Cas Can be a permitted target mode. Cascade connection to setpoint. Setpoint is being driven through CAS_IN (the Cas input). The block algorithm determines block outputs. Auto Can be a permitted target mode. Setpoint is local to the block, (not being driven externally). The block algorithm determines block outputs. Man Can be a permitted target mode. Operator or logic external to the function block determines output. IMan Is never a permitted target mode. Original definition was Initialization Manipulation, which means that the block tracks downstream operation (typically another block that has an open cascade). LO Is never a permitted mode. Local Override or locked output. For a control block, the output tracks a specific input (the action triggered by a discrete track switch input). For an output block, failure action initiates. OOS Is always a permitted mode. The block is out of service.
Modes have priority. The above is in inverse priority order. Higher modes have lower priority. For complete descriptions of all of the function block modes, refer to the Function Block Modes topic.
17
Configuring Shed The parameter SHED_OPT determines shed and climb for a remote mode. It can be configured as follows: Shed With Return Options Remote cascade connection failure shifts actual mode but keeps trying to restore remote cascade (in other words, the remote cascade target mode stays in effect). Normal On failure of a remote cascade connection, the block attempts to attain the highest permitted nonremote mode until remote cascade is restored. On change to remote cascade target mode from any other mode, the block attempts to attain the highest permitted non-remote mode until a remote cascade connection is established. Retained Target On failure of a remote cascade connection, the block attempts to attain the mode retained in the target mode. On change to the remote cascade target mode from any other mode, the block attempts to attain the mode retained by target mode until a remote cascade connection is established. The DeltaV system does not support the retained target shed. Selecting the retained target results in shed to Auto. Auto On failure of a remote cascade connection, the block attempts to attain Auto, if permitted, until remote cascade is restored. On change to remote target mode from any other mode, the block attempts to attain Auto, if permitted, until a remote cascade connection is established. Man On failure of a remote cascade connection, the block sheds to Man until a remote cascade connection is restored. On change to remote target mode, from any other mode, the block goes to Man until a cascade connection is established.
Shed With No Return Options For any shed with no return option, the target mode changes as determined by the option. Therefore, there is no attempt to restore the connection following failure. The behavior on change to the remote cascade target mode is identical to that for Shed With Return Options. Normal On failure of a remote cascade connection, the block sets the target mode to the highest permitted non-remote mode. On change to a remote cascade target mode from any other mode, the block attempts to attain the highest permitted non-remote mode until a remote cascade connection is established. Retained Target On failure of a remote cascade connection, the block sets the target mode to mode retained in target mode. On change to the remote cascade target mode from any other mode, the block attempts to attain the mode retained by target mode until a remote cascade connection is established. The DeltaV system does not support the retained target shed. Selecting the retained target results in shed to Auto. This applies to any block, regardless of whether it is in a field device or a DeltaV controller. The writing device sets or clears the retained target bits in the target mode. Therefore, any workstation or other device (DeltaV controller applications, for example) that does not support retained target operation ignores the retained target bits. In a DeltaV system, regardless of where the block is located, the retained target bits are turned off, and the block sheds to Auto. Auto On failure of a remote cascade connection, the block sets the target mode to Auto, if permitted. On change to the remote target mode from any other mode, the block attempts to attain Auto, if permitted, until a remote cascade connection is established. Man On failure of remote cascade connection, the block sets the target mode to Man, if permitted. On change to the remote target mode from any other mode, the block goes to Man until a cascade connection is established.
It is possible for the user to configure SHED_OPT so that it calls for a target mode that is not permitted. When doing this, the mode logic does the following rules as applied by the remote logic: Shed logic never results in a non-permitted target mode. Shed logic never attempts to attain an actual mode of Auto or Cas if that mode is not permitted.
18
Cascade Basics
Cascades in FOUNDATION Fieldbus follow a strict if simple set of rules. A cascade is a two (2) way communication. The driving or master block provides an output that is used as the cascade input by a lower block commonly referred to as the slave. The slave provides an output that informs the master as to when its output is being accepted and the limit conditions that exist below it; this output is the back calculation output. The master reads this input through a back calculation input. (Refer to Advanced Topics - BKCAL Communications for more information.) For each cascade mode in a block, there is at least one cascade input and one back calculation output. For each block that is defined as control block, there is at least one output and one back calculation input. When the target mode is changed to a cascade mode in the slave, the back calculation output is set with a substatus of Initialization Requested (IR). Upon seeing IR at the back calculation input, the master sets Initialization Acknowledge (IA) in its output substatus. The combination of IR in its back calculation output and IA in its cascade input is the trigger for the slave block to change the actual mode to the cascade. This logic is generally applicable to all cascade inputs and outputs and cascade modes (Cas, RCas, ROut). (See below for the exception.) The following figure and table illustrate the initiation and completion of a cascade with a master target mode of Auto and a slave initial mode of Auto. In fact, the initial slave mode could be any of the operating modes Man, Auto, RCas, ROut. The master target mode could be Man, Auto, RCas, ROut, Cas and, as long as the actual mode was not being forced to LO, the logic completes, as shown in the following figure.
Cascade Configuration Example Cascade with Auto as Target Mode Substatus Condition Cascade Is Not Possible Initialization Requested by Slave Master Sees Initialization Request Slave BKCAL Output Not Invited Initialization Requested Initialization Requested Master OUT Anything Anything but IA Initialization Acknowledge Mode Slave Not Cas Target: Cas Actual: Auto Target: Cas Actual: Auto Master Target: Auto Actual: IMan Target: Auto Actual: IMan Target: Auto Actual: IMan
19
Substatus Slave Sees Initialization Acknowledge Drops Initialization Requested and Changes to Normal Normal Initialization Acknowledge
The exception to the cascade handshaking behavior described above occurs when a CAS_IN or CAS_IN_D parameter has a NonCascade substatus. This is the case when there is no master control block providing a GoodCascade status to CAS_IN, but there is a parameter or calculation block providing a GoodNonCascade status to CAS_IN. In such cases the receiving block does not need to see an InitializationAcknowledge (IA) on CAS_IN. If the target mode is Cas, the actual mode will change to Cas immediately if the status on CAS_IN is GoodNonCascade (and nothing else is preventing the actual mode from climbing).
20
Example Use of Splitter Function Block For more information, refer to the Composites topic.
21
The compensation factor is calculated as follows: Gas Stream (( PRESSURE + ABS_PRESS_CF ) / ( REF_PRESS + ABS_PRESS_CF ))*(( REF_TEMP + ABS_TEMP_CF ) / ( TEMPERATURE + ABS_TEMP_CF )) Liquid Stream (( TEMPERATURE * DENSITY_M ) + DENSITY_B ) / REF_DENSITY If the flowmeter is the differential pressure type, the compensation factor is the square root of the above equations. You create a usage of this composite template by placing a custom block on the module's function block diagram. From the Special Items palette in Control Studio, drag the Custom Block icon onto the diagram. Give the block a usage name and select the block type as Linked Composite. Reference the existing object by browsing to the PT_COMP template. This block can be configured using either Control Studio or DeltaV Explorer or from the faceplate in DeltaV Operate, provided the user has the Restricted Control security key. There is a dynamo for this composite function block in the frsFncblk Dynamo set in DeltaV Operate's configure mode.
22
23
The following figure shows the faceplate in DeltaV Operate with configuration fields visible when the fluid type is Liquid. Refer to the PT_COMP Quick Config Parameters topic.
PT_COMP Faceplate with Fluid as Liquid Pressing the button at the bottom opens the module faceplate configured as a property of the module. As a default this is the generic module faceplate, MOD_FP.IAF. For more information, refer to the Pop-Up Displays for Function Blocks topic.
24
DENSITY_M
FLUID METER
REF_DENSITY
25
Parameter REF_PRESS
Description The flowmeter calibration pressure. Enter the calibration pressure if the COMP parameter is set to Pressure or Press-Temp. This value is expected to be relative, for example, PSIG as opposed to PSIA. The calibration pressure should be in the same units as the measured pressure. The default value is 50. The Flowmeter Calibration Temperature. Enter the calibration temperature if the COMP parameter is set to either Temperature or Press-Temp. This value is expected to be relative, for example, DEG C as opposed to DEG K. The flowmeter calibration temperature should be in the same units as the measured temperature. The default value is 60.
REF_TEMP
26
A status value is expressed as: Quality State SubStatus LimitCondition (for example, Bad NonSpecific HighLimited).
Quality States
There are four quality states that define the status of an input, output, or contained parameter. They are: Bad The value is not useful for control or calculation. Uncertain The quality of the value is less than normal, but the value might be useful. GoodNonCascade The quality of the value is good. Its source is not able to participate in cascade handshaking with the block receiving this status as an input, but the value can be used for control purposes without a cascade handshake. Refer to Cascade Basics for more information. GoodCascade The value can be used in control and the source is able to participate in a cascade handshaking with the block receiving this status as an input. Refer to Advanced Topics - BKCAL Communications for more information.
Substatus Values
There are multiple substatus values that are defined for each quality state. The substatus values are described in the following list. Bad substatus values NonSpecific There is no specific reason why the value is bad. This substatus is used for signal status propagation. ConfigErr Configuration Error. This substatus is set when the value is not useful because there is some other problem with the block. The reasons vary with each block and are noted in the individual block information. NotConnected This substatus is set when this input is required to be connected and it is not connected. DeviceFailure This substatus is set when the source of the value is affected by a device failure. SensorFailure This substatus is set when the system can determine a sensor failure condition. The limit conditions (refer to the Limit Conditions section below) define which direction has been exceeded. NoCommLUV No Communication, with last usable value (LUV). This substatus is set if this value was set by a communication that has failed. NoCommNUV No Communication, with no usable value (NUV). This substatus is set when there has never been any communication with this value since it was last Out of Service. OutOfService The value is not reliable because the block is not being evaluated and might be under construction during configuration. This substatus is set when the block mode is Out of Service (OOS).
27
Uncertain substatus values NonSpecific There is no specific reason why the value is bad. This substatus is used for signal status propagation. LUV Last Usable Value. The source that was writing this value has stopped writing the value. This happens when an input is disconnected during configuration. Substitute This substatus is set when the value is written while the block is not Out of Service. InitialValue This substatus is set when an input parameter value is written while the block is Out of Service. SensorConversionNotAccurate This substatus is set when the value is at one of the sensor limits. The limit conditions (refer to the Limited Conditions section below) define which direction has been exceeded. In addition, this substatus is set when the device can determine that the sensor has reduced accuracy (such as a degraded analyzer). In this case, no limits are set. EURangeViolation Engineering Unit Range Violation. This substatus is set when the value lies outside the range of values defined for this parameter. The limit conditions (refer to the Limited Conditions section below) define which direction has been exceeded. SubNormal This substatus is set when a value derived from multiple values has less than the required number of Good sources.
GoodNonCascade substatus values NonSpecific There is no specific reason why the value is bad. No error or special condition is associated with this value. ActiveBlockAlarm This substatus is set when the value is good and the block has an active block alarm. ActiveAdvisoryAlarm This substatus is set when the value is good and the block has an active alarm with a priority less than 8. ActiveCriticalAlarm This substatus is set when the value is good and the block has an active alarm with a priority greater than or equal to 8. UnacknowledgedBlockAlarm - Set if the value is good and the block has an unacknowledged Block Alarm. UnacknowledgedAdvisoryAlarm - Set if the value is good and the block has an unacknowledged alarm with a priority less than 8. UnacknowledgedCriticalAlarm - Set if the value is good and the block has an unacknowledged alarm with a priority greater than 8.
GoodCascade substatus values NonSpecific There is no specific reason why the value is bad. No error or special condition is associated with this value. InitializationAcknowledge (IA) The value is an initialized value from a source through the CAS_IN parameter. InitializationRequest (IR) The value is from a downstream block and causes re-initialization of the block. This substatus flag is not processed when the target mode is not Cascade (Cas). NotInvited (NI) The value is from a block that does not have a target mode that uses this input (other than Local Override, and Not Selected). NotSelected (NS) The value is from a Control Selector function block that has not selected the corresponding input. This substatus flag tells the upper block to limit in one direction (not to initialize).
28
DoNotSelect (DNS) The value is from a block that should not be selected by a Control Selector function block due to conditions in or above the block. Optionally, this status can be generated by a block when its actual mode is not Automatic (Auto) or Cascade (Cas). LocalOverride (LO) The value is from a block that has been overriden locally. The failure of normal control must be propagated to a PID block for alarm and display purposes. This also implies Not Invited. FaultStateActive (FSA) The value is from a block that has Fault State active. The failure of normal control must be propagated to a PID block for alarm and display purposes. This also implies Not Invited InitiateFaultState (IFS) The value is from a block that wants its downstream output block (for example, AO) to go to Fault State. FaultStateActive The output block has responded to a fault state condition and is in its defined fault state. When this status is on the output block's backcalculation output, the upstream control block treats it the same as Not Invited. InitiateFaultState The primary output of a control block indicates that the downstream output block should go to its defined fault state. This is based on control options to initiate fault state if the status of the primary or cascade input is bad.
Limit Conditions
The following limit conditions are available in the status parameter. The four cases are mutually exclusive. NotLimited The value is free to move. LowLimited The value is from a block that cannot generate or use a lower value because it is limited in that direction, either internally or by the transducer. HighLimited The value is from a block that cannot generate or use a higher value because it is limited in that direction, either internally or by the transducer. Constant (high and low limited) The value cannot move. A constant cannot be limited in just one direction.
Refer to the Function Block Status Values topic for a complete list of status values. Additional Status Information Cascade loops have additional status states that concern loop initialization. The Fieldbus specification lists detailed information on this topic. Specific status handling information for DeltaV function blocks is discussed in the Books Online information for each function block. When a function block does not receive an input value as expected, the latest value is maintained and a stale data indicator is activated. When the input is reported as stale for more than a specified number of times, the status is set to Bad. In many function blocks, you can decide which (if any) action will be taken when the function block receives a stale data or Bad status indication.
29
30
Decimal Value 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 64
Status Value Bad SensorFailure LowLimited Bad SensorFailure HighLimited Bad SensorFailure Constant Bad NoCommLUV NotLimited Bad NoCommLUV LowLimited Bad NoCommLUV HighLimited Bad NoCommLUV Constant Bad NoCommNUV NotLimited Bad NoCommNUV LowLimited Bad NoCommNUV HighLimited Bad NoCommNUV Constant Bad OutOfService NotLimited Bad OutOfService LowLimited Bad OutOfService HighLimited Bad OutOfService Constant Uncertain NonSpecific NotLimited Uncertain NonSpecific LowLimited
Quality Bad Bad Bad Bad Bad Bad Bad Bad Bad Bad Bad Bad Bad Bad Bad Uncertain
Sub-Status SensorFailure SensorFailure SensorFailure NoCommLUV NoCommLUV NoCommLUV NoCommLUV NoCommNUV NoCommNUV NoCommNUV NoCommNUV OutOfService OutOfService OutOfService OutOfService NonSpecific
Limit LowLimited HighLimited Constant NotLimited LowLimited HighLimited Constant NotLimited LowLimited HighLimited Constant NotLimited LowLimited HighLimited Constant NotLimited
65
Uncertain
NonSpecific
LowLimited
31
Decimal Value 66
Status Value Uncertain NonSpecific HighLimited Uncertain NonSpecific Constant Uncertain LUV NotLimited Uncertain LUV LowLimited Uncertain LUV HighLimited Uncertain LUV Constant Uncertain Substitute NotLimited Uncertain Substitute LowLimited Uncertain Substitute HighLimited Uncertain Substitute Constant Uncertain InitialValue NotLimited Uncertain InitialValue LowLimited Uncertain InitialValue HighLimited Uncertain InitialValue Constant
Quality Uncertain
Sub-Status NonSpecific
Limit HighLimited
67
Uncertain
NonSpecific
Constant
68 69 70 71 72
73
Uncertain
Substitute
LowLimited
74
Uncertain
Substitute
HighLimited
75 76
Uncertain Uncertain
Substitute InitialValue
Constant NotLimited
77
Uncertain
InitialValue
LowLimited
78
Uncertain
InitialValue
HighLimited
79
Uncertain
InitialValue
Constant
32
Decimal Value 80
Status Value Uncertain SensorConversionN otAccurate NotLimited Uncertain SensorConversionN otAccurate LowLimited Uncertain SensorConversionN otAccurate HighLimited Uncertain SensorConversionN otAccurate Constant Uncertain EURangeViolation NotLimited Uncertain EURangeViolation LowLimited Uncertain EURangeViolation HighLimited Uncertain EURangeViolation Constant Uncertain SubNormal NotLimited Uncertain SubNormal LowLimited Uncertain SubNormal HighLimited Uncertain SubNormal Constant
Quality Uncertain
Limit NotLimited
81
Uncertain
SensorConversionN otAccurate
LowLimited
82
Uncertain
SensorConversionN otAccurate
HighLimited
83
Uncertain
SensorConversionN otAccurate
Constant
84
Uncertain
EURangeViolation
NotLimited
85
Uncertain
EURangeViolation
LowLimited
86
Uncertain
EURangeViolation
HighLimited
87
Uncertain
EURangeViolation
Constant
88
Uncertain
SubNormal
NotLimited
89
Uncertain
SubNormal
LowLimited
90
Uncertain
SubNormal
HighLimited
91
Uncertain
SubNormal
Constant
33
Status Value GoodNonCascade NonSpecific NotLimited GoodNonCascade NonSpecific LowLimited GoodNonCascade NonSpecific HighLimited GoodNonCascade NonSpecific Constant GoodNonCascade ActiveBlockAlarm NotLimited GoodNonCascade ActiveBlockAlarm LowLimited GoodNonCascade ActiveBlockAlarm HighLimited GoodNonCascade ActiveBlockAlarm Constant GoodNonCascade ActiveAdvisoryAla rm NotLimited GoodNonCascade ActiveAdvisoryAla rm LowLimited GoodNonCascade ActiveAdvisoryAla rm HighLimited GoodNonCascade ActiveAdvisoryAla rm Constant GoodNonCascade ActiveCriticalAlar m NotLimited
Quality GoodNonCascade
Sub-Status NonSpecific
Limit NotLimited
129
GoodNonCascade
NonSpecific
LowLimited
130
GoodNonCascade
NonSpecific
HighLimited
131
GoodNonCascade
NonSpecific
Constant
132
GoodNonCascade
ActiveBlockAlarm
NotLimited
133
GoodNonCascade
ActiveBlockAlarm
LowLimited
134
GoodNonCascade
ActiveBlockAlarm
HighLimited
135
GoodNonCascade
ActiveBlockAlarm
Constant
136
GoodNonCascade
NotLimited
137
GoodNonCascade
LowLimited
138
GoodNonCascade
HighLimited
139
GoodNonCascade
Constant
140
GoodNonCascade
NotLimited
34
Status Value GoodNonCascade ActiveCriticalAlar m LowLimited GoodNonCascade ActiveCriticalAlar m HighLimited GoodNonCascade ActiveCriticalAlar m Constant GoodNonCascade UnacknowledgedBl ockAlarm NotLimited GoodNonCascade UnacknowledgedBl ockAlarm LowLimited GoodNonCascade UnacknowledgedBl ockAlarm HighLimited GoodNonCascade UnacknowledgedBl ockAlarm Constant GoodNonCascade UnacknowledgedA dvisoryAlarm NotLimited GoodNonCascade UnacknowledgedA dvisoryAlarm LowLimited GoodNonCascade UnacknowledgedA dvisoryAlarm HighLimited GoodNonCascade UnacknowledgedA dvisoryAlarm Constant
Quality GoodNonCascade
Limit LowLimited
142
GoodNonCascade
HighLimited
143
GoodNonCascade
Constant
144
GoodNonCascade
NotLimited
145
GoodNonCascade
UnacknowledgedBl ockAlarm
LowLimited
146
GoodNonCascade
UnacknowledgedBl ockAlarm
HighLimited
147
GoodNonCascade
Constant
148
GoodNonCascade
NotLimited
149
GoodNonCascade
UnacknowledgedA dvisoryAlarm
LowLimited
150
GoodNonCascade
UnacknowledgedA dvisoryAlarm
HighLimited
151
GoodNonCascade
UnacknowledgedA dvisoryAlarm
Constant
35
Status Value GoodNonCascade UnacknowledgedCr iticalAlarm NotLimited GoodNonCascade UnacknowledgedCr iticalAlarm LowLimited GoodNonCascade UnacknowledgedCr iticalAlarm HighLimited GoodNonCascade UnacknowledgedCr iticalAlarm Constant GoodCascade NonSpecific NotLimited GoodCascade NonSpecific LowLimited GoodCascade NonSpecific HighLimited GoodCascade NonSpecific Constant GoodCascade InitializationAckno wledge NotLimited GoodCascade InitializationAckno wledge LowLimited GoodCascade InitializationAckno wledge HighLimited GoodCascade InitializationAckno wledge Constant
Quality GoodNonCascade
Limit NotLimited
153
GoodNonCascade
UnacknowledgedCr iticalAlarm
LowLimited
154
GoodNonCascade
UnacknowledgedCr iticalAlarm
HighLimited
155
GoodNonCascade
UnacknowledgedCr iticalAlarm
Constant
192
GoodCascade
NonSpecific
NotLimited
193
GoodCascade
NonSpecific
LowLimited
194
GoodCascade
NonSpecific
HighLimited
195
GoodCascade
NonSpecific
Constant
196
GoodCascade
NotLimited
197
GoodCascade
LowLimited
198
GoodCascade
HighLimited
199
GoodCascade
InitializationAckno wledge
Constant
36
Status Value GoodCascade InitilizationRequest NotLimited GoodCascade InitilizationRequest LowLimited GoodCascade InitilizationRequest HighLimited GoodCascade InitilizationRequest Constant GoodCascade NotInvited NotLimited GoodCascade NotInvited LowLimited GoodCascade NotInvited HighLimited GoodCascade NotInvited Constant GoodCascade NotSelected NotLimited GoodCascade NotSelected LowLimited GoodCascade NotSelected HighLimited GoodCascade NotSelected Constant GoodCascade DoNotSelect NotLimited GoodCascade DoNotSelect LowLimited
Quality GoodCascade
Sub-Status InitilizationRequest
Limit NotLimited
201
GoodCascade
InitilizationRequest
LowLimited
202
GoodCascade
InitilizationRequest
HighLimited
203
GoodCascade
InitilizationRequest
Constant
204
GoodCascade
NotInvited
NotLimited
205
GoodCascade
NotInvited
LowLimited
206
GoodCascade
NotInvited
HighLimited
207 208
GoodCascade GoodCascade
NotInvited NotSelected
Constant NotLimited
209
GoodCascade
NotSelected
LowLimited
210
GoodCascade
NotSelected
HighLimited
211
GoodCascade
NotSelected
Constant
212
GoodCascade
DoNotSelect
NotLimited
213
GoodCascade
DoNotSelect
LowLimited
37
Status Value GoodCascade DoNotSelect HighLimited GoodCascade DoNotSelect Constant GoodCascade LocalOverride NotLimited GoodCascade LocalOverride LowLimited GoodCascade LocalOverride HighLimited GoodCascade LocalOverride Constant GoodCascade FaultStateActive NotLimited GoodCascade FaultStateActive LowLimited GoodCascade FaultStateActive HighLimited GoodCascade FaultStateActive Constant GoodCascade InitiateFaultState NotLimited GoodCascade InitiateFaultState LowLimited GoodCascade InitiateFaultState HighLimted GoodCascade InitiateFaultState Constant
Quality GoodCascade
Sub-Status DoNotSelect
Limit HighLimited
215
GoodCascade
DoNotSelect
Constant
216
GoodCascade
LocalOverride
NotLimited
217
GoodCascade
LocalOverride
LowLimited
218
GoodCascade
LocalOverride
HighLimited
219
GoodCascade
LocalOverride
Constant
220
GoodCascade
FaultStateActive
NotLimited
221
GoodCascade
FaultStateActive
LowLimited
222
GoodCascade
FaultStateActive
HighLimited
223
GoodCascade
FaultStateActive
Constant
224
GoodCascade
InitiateFaultState
NotLimited
225
GoodCascade
InitiateFaultState
LowLimited
226
GoodCascade
InitiateFaultState
HighLimited
227
GoodCascade
InitiateFaultState
Constant
38
39
40
Parameters can be dynamic, static, or non-volatile, depending on how they are restored after power failure: Dynamic parameters are calculated by the block algorithm and do not need to be restored after power failure because the block recalculates the value. Static parameters have a specific value that must be restored by a device for use after power failure. Non-volatile parameters are written on a frequent basis and the last saved value (in most cases) is restored by a device after power failure.
Some parameters are extensible. That is, you can extend or increase the number of these parameters in a function block. Some parameters are option bitstrings. They contain bit-encoded information that specify control strategy options, I/O value processing, status handling and processing, or the type of control logic used in the block. Each parameter is transmitted in a certain data type format. This data can be transmitted between blocks for control, trending, alarming, and diagnostics. The parameters visible in Control Studio may vary depending on level of configuration completed. For example, certain function blocks must be assigned to I/O before all the parameters are visible.
41
Function block parameter data can be one of the following types: Boolean a logic value that is True (1) or False (0). Boolean - Status a True or False value with status indicator. Discrete - Status an unsigned 8-bit integer value with a status indicator. Simulate Discrete a discrete value that enables/disables simulation and a simulated discrete value and status. Dynamic Reference a type of external parameter used to define a path to a value selected at run time. External Reference a reference to a parameter outside the current module. Floating Point a number whose decimal point location is not fixed. This allows the calculation to consider significant digits information. Floating Point Array an aggregate of floating point values. Floating Point with Status a floating point value with a status indicator. Simulate Float a discrete value that enables/disables simulation and a simulated floating point value and status. I/O Reference a value that assigns channel names in an I/O device. Integer a whole number. A signed integer has a positive or negative sign associated with it; an unsigned integer does not. Integer values can be 8-, 16-, or 32-bit values. Internal Reference a reference to a parameter within the current module. Mode a collection of bitstrings that describe the target, actual, permitted, and normal modes of a block. Named Set a value from 0 to 255 that displays an assigned text message. Option Bitstring an unsigned 16-bit value that indicates the chosen options. Scaling a number that is used to convert a floating point value to the required engineering units. You view the data type of each parameter by expanding the Parameter View window in Control Studio. Because data of different types can be transmitted between function blocks, there are rules that govern data compatibility and conversions. The data conversions are performed automatically by the DeltaV software. Data types that have a status associated with them are treated in one of three ways, depending on the conversion: When a data type with a status field is converted to another data type with a status field, the status field is copied from one to the other. When a data type with a status field is converted to a data type without a status field, the status field is lost. When a data type without a status field is converted to one with a status field, a Good status field is created.
42
The following table lists parameter data type compatibility information: Function Block Parameter Compatibility Parameter Data Type 8-bit Signed Integer Accepted Links 8-bit Signed Integer 16-bit Signed Integer 32 bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean Comments Bit copy full parameter. Current value converted; no data loss. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Bit copy full parameter. Current value converted; no data loss.
Option Bitstring Named Set 16-bit Signed Integer 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer
43
Accepted Links 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with Status Discrete with Status Mode Boolean
Comments Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Bit copy full parameter. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type.
Function Block Reference
Option Bitstring Named Set 32-bit Signed Integer 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status
44
Accepted Links Floating Point Floating Point with status Discrete with status Mode Boolean
Comments Current value converted; precision loss. Current value converted; precision loss. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; no data loss. Bit copy full parameter. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss.
Option Bitstring Named Set 8-bit Unsigned Integer 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with Status
45
Comments Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; no data loss. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Bit copy full parameter. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one.
Option Bitstring Named Set 16-bit Unsigned Integer 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean
46
Comments Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Bit copy full parameter. Current value converted; clamped to extremes of destination type. Current value converted; precision loss. Current value converted; precision loss. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type.
Option Bitstring Named Set 32-bit Unsigned Integer 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean
47
Comments Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Bit copy full parameter. Current value converted; precision loss. Current value converted; precision loss. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss.
16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean
Option Bitstring Named Set Boolean 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer
48
Accepted Links 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Boolean Boolean with status Option Bitstring Named Set
Comments Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Bit copy full parameter. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss.
8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point
49
Accepted Links Floating Point with status Discrete with status Boolean Boolean with status Option Bitstring Named Set
Comments Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Bit copy full parameter. Current value converted; no data loss. Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Bit copy full parameter. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one.
Floating Point
8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean
50
Comments Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Bit copy full parameter. Current value converted; clamped to extremes of destination type. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type. Compatible only when dimensions match exactly. Bit copy full parameter.
8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean
Option Bitstring Named Set Floating Point Array Floating Point Array
51
Accepted Links None 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean
Comments
Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Bit copy full parameter. Current value converted into Target Mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; no data loss. Current value converted; no data loss.
Option Bitstring Named Set Simulate Discrete Option Bitstring None 8-bit Signed Integer 16-bit Signed Integer
Current value converted; clamped to extremes of destination type. Current value converted; clamped to extremes of destination type.
52
Accepted Links 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Boolean
Comments Current value converted; no data loss. Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value set to zero if source current value equals zero. Else, current value set to one. Bit copy full parameter. Current value converted; clamped to extremes of destination type. Bit copy full parameter. Actual mode converted into current value. Actual mode converted into current value. Actual mode converted into current value. Actual mode converted into current value. Actual mode converted into current value.
Option Bitstring Named Set Scaling Mode Scaling 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer
53
Accepted Links 32-bit Unsigned Integer 32-bit Unsigned Integer with status Floating Point Floating Point with status Discrete with status Mode Option Bitstring Named Set
Comments Actual mode converted into current value. Actual mode converted into current value. Actual mode converted into current value. Actual mode converted into current value. Actual mode converted into current value. Bit copy full parameter. Actual mode converted into current value. Actual mode converted into current value.
None None 8-bit Signed Integer 16-bit Signed Integer 32-bit Signed Integer 8-bit Unsigned Integer 16-bit Unsigned Integer 32-bit Unsigned Integer 32-bit Unsigned Integer with status Boolean Current value converted; clamped to extremes of destination type. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value converted; no data loss. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; no data loss.
Floating Point
54
Accepted Links Floating Point with status Discrete with status Mode Boolean with status
Comments Current value converted; no data loss. Current value converted; no data loss. Current value converted into target mode. Current value set to zero if source current value equals zero. Else, current value set to one. Current value converted; no data loss. Bit copy plus pointer duplication. Set strings must match.
For more detailed information about parameter data types, refer to the following topics: Floating Point Parameter Dynamic Reference Parameter External Reference Parameter Internal Reference Parameter
Parameter Filtering
Some function blocks have a large number of parameters. To help you quickly access the parameter information you need, the parameters are filtered. The Parameter View window in Control Studio shows the filtering that is currently applied to the parameters. When you want to change the system parameter filtering, use the DeltaV Explorer. Standard system parameters have been put into filtered subsets to show you the parameters that are likely to be most meaningful to you for different tasks. These categories are not hierarchical or mutually exclusive. The system parameter subsets are: Common Configurable the parameters most commonly used during configuration. Advanced Configurable the parameters less commonly used during configuration or those used to configure advanced functions. I/O References the parameters that reference I/O signals from field devices. Connectors the parameters that reference the wired inputs and outputs of a function block or module. Online Parameters the parameters used for debugging an algorithm or for operating the process. You can choose the subset(s) you want to view by clicking the filter buttons corresponding to the subsets you want to display. Turning on all five system parameter subsets ensures that you see all the system parameters associated with the block. Some parameters are in more than one system subset, but they are displayed only once in the parameter list regardless of the subsets you choose to view.
55
During configuration, you can select or define a grouping of all available parameters that best meets your needs. You do this by setting up the user-defined filter groups: Select the desired parameter and select Properties | Filter.... Assign the parameter to one or more of the user groups.
The user parameter groups are: Quick Config a group of parameters often used for the configuration of new modules. This grouping has a default list of parameters, but you can change them according to your needs. The parameters in this list have default values, which can help you configure a module quickly. However, you should examine each default value and modify the values that are not correct for your application. User-defined 1 a group of parameters you define for your process User-defined 2 a group of parameters you define for your process
You create custom parameter filtering when you configure a custom block. In a custom block, the default action assigns user-defined parameters to the Common Configurable and Online system subsets. However, you can assign the parameters to any system subset and user group you prefer.
Mathematical operations resulting in numbers that exceed these limits will result in the limit value (for example, 3.4E10^38 + 100 = 3.4E10^38).
56
Integer
No
Yes -3 means 'external reference not resolved' -2 means 'parameter not configured' -1 means 'module not configured' 0 means 'good' 1 means 'not communicating' Yes -4 means 'write rejected' -3 means 'external reference not resolved' -2 means 'parameter not configured' -1 means 'module not configured' 0 means 'success' 1 means 'not communicating' 2 means 'write pending' Yes
No
.AWST (Asynchronous Write Status) - Provides a means to tell if the last attempt to write the referenced parameter was successful
Integer
No
No
.ST - The value of the ST field of the referenced parameter. Use this field to copy the ST value from the dynamically referenced field to a local parameter's ST field for use in subsequent ST sensitive calculations.
Integer
No
No
57
Note In the Expression Editor, the .CST field represents the communication status of the workstation and is parsed and validated as such in an expression. However, when the expression is downloaded, the .CST field is resolved as the reference parameter's communication status. To allow flexibility when constructing or selecting dynamic reference paths, the use of strings is supported. A dynamic reference can be assigned a string constant (enclosed in quotation marks) or a string variable (enclosed in single quotes). Supported string functions, as described in the Strings topic, include the following: Numeric value to string conversion String to numeric value conversion Equal and not equal string comparison String concatenation A string selection function (SELSTR) that allows selection from five string constants or string parameters, based on an integer input to the string selection function
Dynamic references are established by assigning a parameter reference path string to the .$REF field of a dynamic reference parameter. For example, if a tank has two input valves, INLETA and INLETB, the value for the dynamic reference parameter, INLET.$REF, can be assigned the setpoint of INLET_A using a statement, such as:'INLET.$REF' := "//INLETA/SP" Dynamic references should point to the parameter, not the field. You can now use 'INLET.CV' or 'INLET.ST', for example, in expressions to refer to the .CV and .ST fields of INLETA/SP. If you do not specify a field when using a reference in an expression, .CV is assumed. Following is an example using a string variable to store the parameter reference path:'STRINGVAR' := "INLETA/SP" 'INLET.$REF' := 'STRINGVAR' The use of the .CV field of named set parameters in string expressions is not prevented. However, it only functions if the states to be used in assignments are configured to be user selectable, and, therefore, the state names are held in controllers. The use of named sets to convert integer values to path strings is not recommended since named sets are system global and, for this purpose, they must be specific to the unit module or the unit class. Note If you do not include a reference field when using a dynamic reference, .CV is assumed. To use another field you must include that field in your reference. Dynamic references can be bound to module parameters or node parameters (including I/O parameters) in another node. You can also use existing (that is, non-dynamic) external reference parameters to place specific values into modules on this node. Establishing a dynamic reference to a parameter in a unit module phase that is not loaded will not cause the phase to be loaded. Therefore, the phase attribute will not be read. Writing a new string to the .$REF field immediately causes the values read from .CST and .AWST to go bad unless the connection is immediately established. It is recommended that the user test the value of these fields as needed.
58
59
External Reference Parameter Fields Name and Purpose .$REF - Provides a means to read the path currently in use .CST (Connection Status) Provides a means to tell if the reference has been resolved (that is, the value has been found and can be read). This is particularly useful if the external parameter is in another node. Type String Configurabl e Yes Readable Yes Writable No
Integer
No
Yes -3 means 'external reference not resolved' -2 means 'parameter not configured' -1 means 'module not configured' 0 means 'good' 1 means 'not communicating' Yes -4 means 'write rejected' -3 means 'external reference not resolved' -2 means 'parameter not configured' -1 means 'module not configured' 0 means 'success' 1 means 'not communicating' 2 means 'write pending' Yes
No
.AWST (Asynchronous Write Status) - Provides a means to tell if the last attempt to write the referenced parameter was successful
Integer
No
No
.ST - The value of the ST field of the referenced parameter. Use this field to copy the ST value from the externally referenced field to a local parameter's ST field for use in subsequent ST sensitive calculations. For more details, refer to the Function Block Status Values topic.
Integer
No
No
Note When using a reference field other than the .CV field, you will need to type the field name. The available fields are listed in the following table. For syntax rules regarding External references, refer to the External References topic.
60
External references can be bound to module parameters or node parameters (including I/O parameters) in another node. Establishing an external reference to a parameter in a unit module phase that is not loaded will not cause the phase to be loaded. Therefore, the phase attribute will not be read.
To verify such external references, the CALC expression could be written as follows: Set one of the OUT parameters equal to the .CST value of the remote node integrity or to a specific parameter such as RemoteNode1/OINTEG.CST or RemoteModule1/FB1/Parameter1.CST. Use the value of the CALC OUT parameter to adjust your logic based on the remote node or module being unavailable. Every time the module executes, the .CST value is updated with the current remote status.
61
.AWST (Asynchronous Write Status) - Provides a means to tell if the last attempt to write the referenced parameter was successful
Integer
No
No
.ST - For more details, refer to the Function Block Status Values topic.
Integer
No
No
Note When using a reference field other than the .CV field, you will need to type the field name. The available fields are listed in the following table. For syntax rules regarding internal references, refer to the Syntax Rules | Internal Reference topic.
62
Extensible Parameters
Some function blocks have extensible parameters. That is, you can extend or increase the number of this type of parameters. For example, you might need to extend the number of inputs on a function block so that you can input more values to the block without having to add more blocks to your diagram. The function blocks that are extensible are: Add, And, Boolean Fan Input, Boolean Fan Output, Calculation/Logic, Multiply, Multiplex, Or, and Signal Selector. For example, the standard Add block from the palette has two inputs. When you want to add four values together, you extend the number of inputs by selecting the block, clicking the right mouse button, and changing the inputs number from 2 to 4. The following picture shows the dialog that you use to increase the inputs of an Add block:
Function Block Extensible Parameters Dialog Window After you increase the number, the additional parameters show on the function block diagram and you can wire inputs to these parameters. Add blocks with two and four inputs are shown in the following figure.
63
64
Caution Avoid the following words in user-defined named sets. These names are used as system state names and are always interpreted with the following values, regardless of the user-defined value. NO0 YES1 MAN8 AUTO16 CAS32, 48 RCas64 ROut128 OOS1 IMan2 LO4
65
Control Options
The control options parameter (CONTROL_OPTS) allows you to select control strategy options. You can set control options in Manual or Out of Service mode only. The following are the control options in the DeltaV system: Use BKCAL_OUT With IN_1 Normally, BKCAL_OUT is associated with initialization of an upstream block that is providing CAS_IN. If this option is set, then BKCAL_OUT is associated with the upstream block providing IN_1. This option is used with the Ratio and Bias/Gain block to determine the value and status that must be provided in BKCAL_OUT for proper initialization and handshaking. No OUT Limits in Manual Do not apply OUT_HI_LIM or OUT_LO_LIM when target and actual modes are Man. Obey SP Limits if Cas or RCas Normally the setpoint will not be restricted to the setpoint limits except when entered by a human interface device. However, if this option is selected, the setpoint will be restricted to the setpoint absolute limits in the Cas and RCas modes. Act on IR Used to back calculate for bumpless transfer. In the Bias/Gain function block as well as the Ratio function block, if this option is true, when the block is in a nonautomatic mode or transitions to an automatic mode, the SP will be back calculated for purposes of bumpless transfer. The back calculated SP will be limited to the range defined by the SP limits. Any difference between the value required for bumpless transfer will be added to OUT and then ramped out over BAL_TIME. In the PID block, if this option is true and the STRUCTURE parameter is set to PD, then, when the block transitions to an automatic mode from a non-automatic mode the BIAS is back calculated for bumpless transfer.
66
Use PV for BKCAL_OUT Normally, BKCAL_OUT contains the value of the working setpoint (SP_WRK). When necessary, use the process variable (PV) instead by turning on the Use PV for BKCAL_OUT control option. Note that even when this control option is turned on, it is enforced only when the block is in Cas mode. When the block is in a non-Cas mode, SP_WRK is used for BKCAL_OUT. Track in Manual Enables external tracking for target mode of MAN when Track Enable option has been selected. If Track In Manual is not selected then external tracking is prevented with a target mode of MAN, and, switching to a target mode of MAN will stop external tracking if external tracking had previously been initiated. Track Enable Enables external tracking function. If Track Enable option is selected, then, when TRK_IN_D is true, and, the target mode is not MAN or the Track In Manual option is selected, the block is placed in LO, the block output is set to the value of TRK_VAL. Direct Acting Defines the relationship between a change in PV and the corresponding change in output. When Direct Acting is enabled (True), an increase in PV results in an increase in the output. SP Track Retained Target Permits the setpoint to track the RCas or Cas parameter based on the retained target mode when the actual mode of the block is IMan, LO, Man, or ROut. SP Track Retained Target has precedence over the other SP-PV track options in the selection of the value to track when the actual mode is IMan, LO, Man, or ROut. SP-PV Track in LO or IMan Permits the SP to track the PV when the actual mode of the block is LO or IMan. SPPV Track in Man takes precedence over SP-PV Track in LO or IMan. SP-PV Track in Man must be enabled in order for SP-PV Track in LO or IMan to track when Target mode is MAN. SP-PV Track in ROut Permits the setpoint to track the process variable when the actual mode of the block is ROut. SP-PV Track in Man Permits the SP to track the PV when the target mode of the block is Man. Bypass Enable This parameter, if true, allows BYPASS to be set. Some control algorithm applications cannot provide closed loop control if bypassed. The following table lists the supported control options in specific function blocks. Supported Control Options for Function Blocks Function Block Bias/Gain Function Block Supported Control Options (CONTROL_OPTS) No OUT limits in Manual Obey SP limits if Cas or Rcas Use BKCAL_OUT with IN_1 Act on IR Track in Manual Track Enable Act on IR Use PV for BKCAL_OUT Track in Manual Track Enable Direct Acting SP-PV Track in LO or IMan SP-PV Track in Man Bypass Enable No OUT limits in Manual Track in Manual Track Enable
67
Supported Control Options (CONTROL_OPTS) No OUT limits in Manual Obey SP limits if Cas or RCas Act on IR Use PV for BKCAL_OUT Track in Manual Track Enable Direct Acting SP Track Retained Target SP-PV Track in LO or IMan SP-PV Track in ROut SP-PV Track in Man Bypass Enable No OUT limits in Manual Obey SP limits if Cas or RCas Use BKCAL_OUT with IN_1 Act on IR Use PV for BKCAL_OUT Track in Manual Track Enable SP Track Retained Target SP-PV Track in Lo or Iman SP-PV Track in Man Bypass Enable
I/O Options
The I/O options parameter (IO_OPTS) allows you to select how the I/O signals are processed. You can set I/O options in Manual or Out of Service mode only. The following are the I/O options in the DeltaV system: Low Cutoff Changes any calculated output below this value to a zero output value. This is useful for zero-based measurement devices such as flowmeters. Use PV for BKCAL_OUT Changes the BKCAL_OUT value to the PV value. When the Use PV for BKCAL_OUT option is not enabled (False), the BKCAL_OUT value is the working setpoint value. Target to Man if Fault State activated Set the target mode to Man, thus losing the original target, if Fault State is activated. This latches an output block into the manual mode. Use Fault State value on restart Use the value of FSTATE_VAL(_D) if the device is restarted, otherwise use the non-volatile value. This does not act like Fault State, it only uses the value of FSTATE. Fault State to value The output action to take when fault occurs. (0: freeze, 1: go to preset value) Increase to Close Indicates whether or not the output value is inverted before it is communicated to the I/O channel.
68
SP-PV Track in LO or IMan Permits the SP to track the PV when the actual mode of the block is LO or IMan. SPPV Track in Man takes precedence over SP-PV Track in LO or IMan. SP-PV Track in Man must be enabled in order for SP-PV Track in LO or IMan to track when Target mode is MAN. SP-PV Track in Man Permits the SP to track the PV when the target mode of the block is Man. Invert Indicates whether the discrete input should be logically inverted before it is stored in the process variable. A discrete value of zero (0) will be considered to be a logical zero (0) and a non-zero discrete value will be considered to be a logical one (1). For example, if invert is selected, the logical NOT of a non-zero field value would result in a zero (0) discrete output, and the logical NOT of a zero field value would result in a discrete output value of one (1). Note IMan is not possible in an I/O block. The following table lists the supported I/O options for specific function blocks. Supported I/O Options for Function Blocks Function Block Analog Input Function Block Analog Output Function Block Supported I/O Options (IO_OPTS) Low Cutoff Use PV for BKCAL_OUT Increase to Close SP_PV Track in Man Invert Use PV for BKCAL_OUT Tgt to Man if Fault St Act Use Fault st val on restart Fault State to value PS_PV Track in LO or IMan* SP_PV Track in Man Invert Low cutoff Use PV for BKCAL_OUT Use Fault st val on restart Increase to close SP-PV Track in LO or IMan SP-PV Track in Man Invert Invert Use PV for BKCAL_OUT Tgt to Man if Fault State Active Use fault st val on restart Fault State to value SP-PV Track in Man SP-PV Track in LO or Iman Invert
Multiple Discrete Input Function Block Multiple Discrete Output Function Block
69
Supported I/O Options (IO_OPTS) Low cutoff Low cutoff Use PV for BKCAL_OUT Use Fault st val on restart Increase to close SP-PV Track in LO or IMan SP-PV Track in Man Invert
* These parameters are only visible when the function block is extended to a Fieldbus device.
Status Options
The status options parameter (STATUS_OPTS) allows you to select options for status handling and processing. You can set status options in Manual or Out of Service mode only. The following are the status options in the DeltaV system: Uncertain if Man mode Set the output status of an input or calculation block to Uncertain if the actual mode of the block is Man. BAD if Limited Sets the output status to Bad if the sensor is at or beyond a high or low limit. Uncertain if Limited Set the output status of an input or calculation block to Uncertain if the measured or calculated value is limited. Target to Manual if Bad IN Sets the target mode to Man if the status of the IN parameter is BAD. Propagate Fault Backward If the status from the actuator is Bad - Device Failure or Fault State Active or Local Override is active, propagate this as Bad, Device Failure or Good Cascade, Fault State Active or Local Override to BKCAL_OUT respectively without generating an alarm. The use of these substatuses in BKCAL_OUT is determined by this option. Through this option, the user can determine whether alarming (sending of an alert) will be done by the block or propagated upstream for alarming. Propagate Fault Forward If the status from the sensor is Bad - Device Failure or Bad - Sensor Failure, propagate it to OUT without generating an alarm. The use of these substatuses in OUT is determined by this option. Through this option, the user can determine whether alarming (sending of an alert) will be done by the block or propagated downstream for alarming. Use Uncertain as Good If the status of the IN parameter is Uncertain, treat it as GOOD. IFS if Bad CAS_IN Set Initiate Fault State status in the OUT parameter if the status of the CAS_IN parameter is BAD. IFS if Bad IN Set Initiate Fault State status in the OUT parameter if the status of the IN parameter is BAD. The following table lists the supported status options for specific function blocks.
70
Supported Status Options for Function Blocks Function Block Analog Input Function Block Supported Status Options (STATUS_OPTS) Uncertain if Man mode BAD if Limited Uncertain if Limited Propagate Fault Backward IFS if Bad CAS_IN Target to Man if Bad IN Use Uncertain as Good IFS if Bad CAS_IN IFS if Bad IN Uncertain if Man mode Propagate Fault Forward* Propagate Fault Backward* Bad if Limited Target to Manual if Bad IN Uncertain if Man mode Use Uncertain as Good Uncertain if Man mode BAD if Limited Uncertain if Limited Propagate Fault Forward If block is not in a Fieldbus device: Bad if Limited Uncertain if Limited Target to Manual if Bad IN Use Uncertain as Good Ratio Function Block
Discrete Input Function Block Discrete Output Function Block FLC Function Block Input Selector Function Block Multiplexed Analog Input Function Block
If block is in a Fieldbus device: Target to Manual if Bad IN Use Uncertain as Good IFS if Bad CAS_IN IFS if Bad IN Target to Man if Bad IN Use Uncertain as Good IFS if Bad CAS_IN IFS if Bad IN
* These parameters are only visible when the function block is extended to a Fieldbus device.
71
Integration Options
The integration options parameter (INTEG_OPTS) allows you to specify integration and reset behavior. You can set integration options in any mode. The following integration options are supported in the Integrator function block: Carry Determines what to do with the integration value after a reset condition is reached. When the Carry option is not enabled (False), the integrated value starts over (at zero or SP) when it is reset. When the Carry option is enabled (True), the excess values are carried over past the trip point into the next integration cycle as the initial value of the integrator. Flow Reverse Determines the net flow direction. When Flow Reverse is selected (True), negative increments are included in the integration. Flow Forward Determines the net flow direction. When Flow Forward is selected (True), positive increments are included in the integration. When both Flow Forward and Flow Reverse are selected, positive and negative increments are included in the integration.
Device Options
The device options parameter (DEVICE_OPTS) allows you to select device controller logic options. You can set device options in any mode. The following device options are supported in the Device Control function block: Interlock When the Interlock option is enabled (True) and the INTERLOCK_D input is False, OUT_D is set to the Passive state and is held there until INTERLOCK_D is set to True. SP Track When the SP Track option is enabled (True), SP_D tracks OUT_D when the actual mode is Local Override (LO). Warning Disabling this option can potentially start the equipment when unattended if the SP is left Active following a failed start due to an interlock. Permissive Allows OUT_D to transition from a Passive state to an Active state or from one Active state to another when SP_D requests. When the Permissive is enabled (True) and the PERMISSIVE_D input is set True, OUT_D is allowed to transition from the Passive state to an Active state or from one Active state to the other when SP_D requests. Reset Required When the Reset Required option is enabled (True) and OUT_D is forced to Passive because of an interlock, shutdown, or run confirmation failure, OUT_D remains at Passive until RESET_D is set to True. Trip When the Trip option is enabled (True) and an Active Confirm is lost for a time greater than TRIP_TIME, OUT_D is set to Passive. The SP_D value must return to Passive to clear the tripped condition. When the Reset Required option is enabled (True), RESET_D must also be set to True to clear the tripped condition. Passive when Confirmed When the Passive when Confirmed option is enabled (True) and the field device is confirmed to the desired Active state, OUT_D is changed to the Passive state. Passive on Active Timeout When the Passive on Active Tim-out option is enabled (True) and an Active state is not confirmed within the confirm time following a command to an Active state, OUT_D is changed to the Passive state.
72
Algorithm Options
The algorithm options parameter (ALGO_OPTS) allows you to specify abort or no-abort on read errors. The ALGO_OPTS parameter is supported in the Action, Calculation/Logic, and Condition function blocks. AbortOnReadErrors When selected, the expression algorithm aborts after encountering a read error on any parameter. A read error occurs, for example when a parameter in another controller cannot be read because the controllers are not communicating. When the expression aborts, the following occurs: Condition block PRE_OUT_D retains its value from the previous scan Action block None of the assignment statements are executed Calc/Logic block None of the assignment statements are executed.
Input Options
The input options (INPUT_OPTS) allow you to set the options for using IN and IN_LO when Uncertain. They also allow you to set the options for using IN_1, IN_2 and IN_3 when any are either Bad or Uncertain. When a particular option is not selected and the status is Bad or Uncertain, the last usable value is used. A value is usable if the status is Good or if the status is not Good but the input option for that status (Bad or Uncertain) is selected to use it. To change the input options while using the on-line view, first change the mode to OOS. The following input options are supported in the Arithmetic function block: IN_3 Use Bad If selected, the IN_3 Use Bad option uses the value of IN_3, even if the status equals Bad. IN_3 Use Uncertain If selected, the IN_3 Use Uncertain option uses the value of IN_3, even if the status equals Uncertain. IN_2 Use Bad If selected, the IN_2 Use Bad option uses the value of IN_2, even if the status equals Bad. IN_2 Use Uncertain If selected, the IN_2 Use Uncertain option uses the value of IN_2, even if the status equals Uncertain. IN_1 Use Bad If selected, the IN_1 Use Bad option uses the value of IN_1, even if the status equals Bad. IN_1 Use Uncertain If selected, the IN_1 Use Uncertain option uses the value of IN_1, even if the status equals Uncertain. IN_LO Use Uncertain If selected, the IN_LO Use Uncertain option uses the value of IN_LO, even if the status equals Uncertain. IN Use Uncertain If selected, the IN Use Uncertain option uses the value of IN, even if the status equals Uncertain.
73
Seconds
74
Parameter HI_HI_DELAY_ON HI_DELAY_ON LO_DELAY_ON LO_LO_DELAY_ON DV_HI_DELAY_ON DV_LO_DELAY_ON HI_HI_ENAB_DELAY HI_ENAB_DELAY LO_ENAB_DELAY LO_LO_ENAB_DELAY DV_HI_ENAB_DELAY DV_LO_ENAB_DELAY HI_HI_HYS HI_HYS LO_HYS LO_LO_HYS DV_HI_HYS DV_LO_HYS
Units Seconds
Description When true, this parameter delays the time (in seconds) that it takes for corresponding _ACT parameter to be true after a primary alarm condition occurs. Every time the conditional event becomes false, the timer resets. When alarm_ENAB becomes nonzero, this parameter continues to force corresponding _ACT parameter to zero for the time specified (in seconds). The timer resets only when alarm_ENAB goes from zero to 1. This parameter is used as a deadband when resetting base alarm conditions for analog values. The block uses the value of alarm_HYS instead of the standard alarm_HYS, regardless of the value of the alarm_ENAB parameters.
Seconds
Percent of EU range
75
76
I/O Blocks
This chapter contains information on input/output function blocks in the DeltaV system.
Alarm Detection Function Block The IN is a floating point value and status.
I/O Blocks
77
78
DEFAULT
EU of IN_SCALE
DV_HI_ACT
None
DV_HI_LIM
EU of IN_SCALE
DV_LO_ACT
None
DV_LO_LIM
EU of IN_SCALE
ENABLE
None
I/O Blocks
79
Parameter HI_ACT
Units None
Description The result of alarm detection associated with HI_LIM. If HI_ACT equals True, HI_LIM has been exceeded. The result of alarm detection associated with HI_HI_LIM. If HI_HI_ACT equals True, HI_HI_LIM has been exceeded. The setting for the alarm limit used to detect the high high alarm condition. If SCALE_ENABLE is not set, the raw value will not be scaled. The setting for the alarm limit used to detect the high alarm condition. If SCALE_ENABLE is not set, the raw value will not be scaled. The analog input value and status. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with IN or value from IO_IN. Defines the input DST for the I/O channel used for the PV. The result of alarm detection associated with LO_LIM. If LO_ACT equals True, LO_LIM has been exceeded. The setting for the alarm limit used to detect the low alarm condition. If SCALE_ENABLE is not set, the raw value will not be scaled. The result of alarm detection associated with LO_LO_LIM. If LO_LO_ACT equals True, LO_LO_LIM has been exceeded. The setting for the alarm limit used to detect the low low alarm condition. If SCALE_ENABLE is not set, the raw value will not be scaled. The process variable used in block execution and alarm limit detection. Enables/disables scaling. The block's setpoint value.
HI_HI_ACT
None
HI_HI_LIM
EU of IN_SCALE
HI_LIM
EU of IN_SCALE
IN IN_SCALE
IO_IN LO_ACT
None None
LO_LIM
EU of IN_SCALE
LO_LO_ACT
None
LO_LO_LIM
EU of IN_SCALE
PV SCALE_ENABLE SP
80
I/O Blocks
81
AI Function Block With Simulation Enabled SIMULATE_IN is the simulated value from another block that is used by the Analog Input function block when simulation is enabled. OUT is the block output value and status.
82
I/O Blocks
83
You select the manner of processing the analog measurement value by configuring the I/O selection, signal conversion, and filtering parameters. I/O Selection When you configure the Analog Input function block, you select the I/O channel associated with an analog measurement by configuring the Device Signal Tag (DST) of the IO_IN parameter. You select the Device Tag and the parameter the AI block accesses on that channel. When the channel type is configured as Analog Input Channel, the only selectable channel parameter for IO_IN is: FIELD_VAL_PCT the 4 to 20 mA signal, in percent of range. HART status is applied. You should configure XD_SCALE as 0 100%. When the channel type is configured as HART Analog Input Channel, you can select one of the following parameters: HART_FIELD_VAL the 4 to 20 mA signal of the HART transmitter, in the range and engineering units defined by XD_SCALE or OUT_SCALE, depending on L_TYPE. HART Status is applied. The range and units are automatically sent to the transmitter to set its range and units. The specified units must be supported by the transmitter. HART_PV the Primary Variable of a HART transmitter, in engineering units. This value is read digitally. HART_SV the Secondary Variable of a HART transmitter, in engineering units. This value is read digitally. HART_TV the Tertiary Variable of a HART transmitter, in engineering units. This value is read digitally. HART_FV the Fourth Variable of a HART transmitter, in engineering units. This value is read digitally. For more information on the DeltaV systems implementation of HART communications, refer to the HART Devices and the DeltaV System topic. You can configure anti-aliasing filtering, NAMUR limit detection, and overrange/underrange detection for the channel parameters. For information on these capabilities, refer to the I/O Configuration topic. Simulation To support testing, you can enable simulation. This allows the measurement value and status to be supplied manually or from another block. During configuration, decide whether you want the simulated value/status to be entered manually during operation or you will use a value/status from another block for the simulated value/status. When the value is entered manually: The operator first enables simulation by selecting the SIMULATE parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field. In online operation, the operator can enter a simulated status value in the Simulate Status field. If SIMULATE_IN is not connected (status = Bad: NotConnected), the SIMULATE value is used. If SIMULATE_IN has any status except Bad: NotConnected, the SIMULATE_IN value is used. In this case, the SIMULATE_IN value always overrides the SIMULATE value.
Note Use the SIMULATE parameter to enter values manually and make sure SIMULATE_IN is not connected. If SIMULATE_IN is connected or a value is entered manually into SIMULATE_IN, the SIMULATE_IN value overrides the SIMULATE value.
84
When the value/status from another block is used: During configuration, connect SIMULATE_IN to the desired block output or parameter. Do not enter a value in the Simulate Value field of the SIMULATE_IN input; the block uses the connected value automatically. During operation, the operator enables simulation by selecting the SIMULATE parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field.
Note Do not enter a value for the SIMULATE_IN parameter. If you do and the status of SIMULATE_IN is not Bad: NotConnected, the manually entered value for SIMULATE_IN overrides any value you enter in SIMULATE. Signal Conversion You choose direct, indirect, or indirect square root signal conversion with the linearization type parameter (L_TYPE). Refer to the HART Devices and the DeltaV System topic for information on signal conversion for HART devices. Select one of the following signal conditioning options: Direct signal conditioning simply passes through the accessed channel input value (or the simulated value when simulation is enabled). For direct conversion, OUT_SCALE is written to XD_SCALE in controller-resident blocks. Indirect signal conditioning linearly converts the accessed channel input value (or the simulated value when simulation is enabled) from its specified range (XD_SCALE) to the range and units of the PV and OUT parameters (OUT_SCALE). Indirect square root signal conditioning converts the accessed channel input value (or the simulated value when simulation is enabled) from its specified range (XD_SCALE) by taking the square root of the value and scaling it to the range and units of the PV and OUT parameters (OUT_SCALE). Direct Independent signal conditioning simply passes through the accessed channel input values (or the simulated value when simulation is enabled). OUT_SCALE is independent of XD_SCALE. You view the accessed value (in percent of XD_SCALE) through the FIELD_VAL parameter. When the converted input value is below the limit specified by the LOW_CUT parameter and the Low Cutoff I/O option (IO_OPTS) is enabled (True), a value of zero is used for the converted value (PV). This option can be useful with zero-based measurement devices, such as flowmeters. Note You can set the I/O option in Manual or Out of Service mode only. Filtering You apply filtering to the converted value (PV) by specifying the filter time constant (in seconds) in the PV_FTIME parameter. When you specify a value of zero, no filtering is applied. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Block configuration error The block is wired to a HART channel and the HART device indicates that the function block's units are not compatible with the device. In this case, the Out of Service block error is also set. Simulate active Simulation is enabled and the block is using a simulated value in its execution. Input failure/process variable has Bad status The source of the block's process variable is bad. Indicates a hardware failure, a non-existent Device Signal Tag (DST), or a Bad status on the SIMULATE parameter. Out of Service The block is in Out of Service (OOS) mode.
I/O Blocks
85
NAMUR Alarming If the high high and low low alarm limits are changed to a value outside the range defined in OUT_SCALE and the PV exceeds the alarm limits, the PV status high and low limits, respectively, are set. In this case, the associated active alarm parameters indicate that the measurement is overrange/underrange. If these alarm limits are set more than 3% outside the span of OUT, the active alarm condition is set after the overrange condition elapsed time exceeds four seconds.
86
The (STATUS_OPTS) parameter allows you to choose how the PV and OUT status are determined. There are three AI block status options: Uncertain if Man mode -- Sets the OUT status to Uncertain if the block's mode is Manual Bad if Limited -- Sets the PV status to Bad if the channel input status is limited. Uncertain if Limited -- Sets the PV status to Uncertain if the channel input status is limited.
Note You can set the status option in Out of Service mode only. The analog input block PV status normally reflects the channel input status. However, if the channel status is limited, then PV status is set to Uncertain limited or Bad Limited if you choose the status option Uncertain if Limited and Bad if limited respectively In Auto mode, OUT normally reflects the value and status quality of the PV. However, if the PV status is Good but the PV value is more than -10% to 110% outside the span defined by PV_SCALE, then the OUT status is change to Uncertain. In Man mode, the OUT status limit indication is set to constant and the OUT status is Good unless you have selected the Uncertain in Man mode status option. In Out of Service mode, the OUT status is set to BAD. NAMUR Limit Detection If NAMUR limit detection is enabled for I/O channels (by setting the NAMUR_ENA parameter to True when configuring the AI card) and the IO_IN type is FIELD_VAL_PCT or HART_FIELD_VAL, the PV status of the input is set to Bad if the signal level is above 21 mA or below 3.6 mA for more than four seconds. The Bad status is cleared when the signal returns within these limits. You can use this feature when the transmitter is designed to flag a device failure by setting its current signal outside the normal 4-20 mA range. Note The actual mode of a control block will automatically go to Man if the input has a Bad status. Thus, NAMUR limit detection should not be enabled if a measurement is used in control unless this behavior (control going to manual ) is an appropriate action on limit detection.
I/O Blocks
87
ACK_OPTION
None
ALARM_HYS
BAD_ACTIVE
BAD_MASK
None
BLOCK_ERR
None
CHANNEL
None
FIELD_VAL
Percent
88
Description The result of alarm detection associated with HI_LIM. If HI_ACT equals True, HI_LIM has been exceeded. The result of alarm detection associated with HI_HI_LIM. If HI_HI_ACT equals True, HI_HI_LIM has been exceeded. The setting for the alarm limit used to detect the high high alarm condition. The priority of the alarm detection associated with HI_HI_LIM and activated by HI_HI_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority).* The setting for the alarm limit used to detect the high alarm condition. The priority of the alarm detection associated with HI_LIM and activated by HI_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority).* Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 only if the following conditions are true: - The Write to Inspect Alarm context menu item has been selected from Inspect for this block. - With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition exists for Variability only if both the Variability Index and the Standard Deviation have exceeded their defined limits.) Defines the input DST for the I/O channel used for the PV. I/O options. Allow you to select how the I/O signals are processed. The supported I/O option for the Analog Input function block is Low Cutoff. Linearization type. Determines whether the field value is used directly (Direct or Direct Independent), is converted linearly (Indirect), or is converted with the square root (Indirect Square Root). The result of alarm detection associated with LO_LIM. If LO_ACT equals True, LO_LIM has been exceeded.
HI_HI_LIM HI_HI_PRI
EU of PV None
HI_LIM HI_PRI
EU of PV None
INSPECT_ACT
None
IO_IN IO_OPTS
None None
L_TYPE
None
LO_ACT
None
I/O Blocks
89
Units EU of PV None
Description The setting for the alarm limit used to detect the low alarm condition. The result of alarm detection associated with LO_LO_LIM. If LO_LO_ACT equals True, LO_LO_LIM has been exceeded. The setting for the alarm limit used to detect the low low alarm condition. The priority of the alarm detection associated with LO_LO_LIM and activated by LO_LO_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority).* The priority of the alarm detection associated with LO_LIM and activated by LO_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority).* Activated when the Low Cutoff I/O option is enabled (True). When the converted measurement is below the LOW_CUT value, the PV is set to 0.0. Parameter used to request and show the source of the output used by the block. The primary value and status calculated by the block in Auto mode. OUT can be set manually in Man mode. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The process variable used in block execution and alarm limit detection. The time constant of the first-order PV filter. It is the time required for a 63% change in the FIELD_VAL to be reflected in the PV. Enables simulation and allows you to enter an input value and status. The SIMULATE value is used by the block only when SIMULATE_IN is not connected.
LO_LO_LIM LO_LO_PRI
EU of PV None
LO_PRI
None
LOW_CUT
EU of PV
PV PV_FTIME
EU of OUT Seconds
SIMULATE
EU of XD_SCALE
90
Parameter SIMULATE_IN
Units EU of XD_SCALE
Description The input connector value and status used by the block instead of the analog measurement when simulation is enabled. If SIMULATE_IN is connected or has a manually entered value, SIMULATE_IN always overrides SIMULATE. Note When SIMULATE_IN is wired from an input source on the function block diagram, it always overrides a manually entered value. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.* The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
ST_REV
None
STDEV_CAP
STDEV_TIME
STDEV
EU of OUT_SCALE or EU of PV_SCALE
The standard deviation of PV. For analog control blocks in AUTO, mean is assumed to be the SP. Refer to Loop Performance Calculations for more details on how this parameter is calculated. Status options. Allow you to select options for status handling and processing. The supported status options for the Analog Input function block are: - Uncertain if Man mode - Bad if Limited - Uncertain if Limited
STATUS_OPTS
None
I/O Blocks
91
Parameter SUBSTITUTE_IN
Description If there is a problem communicating with the field device and SUBSTITUTE_IN has a non-Bad status, the controller passes the SUBSTITUTE_IN value through to the output parameter(s) of the shadow block.* The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the channel input value.
XD_SCALE
None
* These parameters are only visible when the function block is extended to a Fieldbus device. Note Default values and data type information for the parameters are available by expanding the Parameter View window.
92
Analog Input Function Block IO_IN Parameter Selections for HART Transmitters Variable Access IO_IN Selection Engineering Units Primary Primary Secondary Tertiary 4th 4 to 20 mA Digital Digital Digital Digital HART_FIELD_VAL HART_PV HART_SV HART_TV HART_FV Percent FIELD_VAL_ PCT N/A N/A N/A N/A
Note When a channel value is accessed digitally, the update rate of the analog input channel value depends on the number of channels on the associated I/O card that are configured as HART Analog Input channels. When all eight channels are configured as HART channels, each channel is updated every six seconds. When there is only one such channel on the card, the channel is updated approximately every 0.5 seconds. Therefore, when you are using the primary measurement in closed loop control of a fast or moderately fast process, we recommend that you define IO_IN to access the 4 to 20 mA signal. You can use the digital value when you require the improved accuracy and range of the digital value for a monitoring application or for a control application involving a slow process. Analog Input block L_TYPE parameter: Select Direct to use an I/O parameter that provides its signal in the engineering units that you want for the block output. Select Indirect when you want to convert the I/O parameter value to engineering units based on the input and output ranges defined by XD_SCALE and OUT_SCALE. Select Indirect Square Root when the block I/O parameter value represents a flow measurement made using differential pressure, and when square root extraction is not performed by the transmitter. Select Direct Independent for RTD and Thermocouple inputs to allow OUT_SCALE to be set to a narrower range than XD_SCALE. Analog Input block OUT_SCALE parameter: Set the desired ranges and engineering units for the PV and OUT parameters to correspond to the XD_SCALE range and the L_TYPE conversion. Analog Input block XD_SCALE parameter: When the IO_IN channel type is FIELD_VALUE_PCT, configure XD_SCALE as 0 100%. When any other channel type is selected, configure XD_SCALE to match the range and units of the transmitter. Note When you select HART_FIELD_VAL as the channel type, the range and units defined by the XD_SCALE or the OUT_SCALE parameter are written to the transmitter. This assumes that the specified engineering units are supported by the transmitter. If the transmitter units you specify are not supported by the transmitter, the channel status is set to Bad. When the range or units of the transmitter's primary variable for your application is different than that defined in OUT_SCALE, set L_TYPE to Indirect and define the input and output ranges in XD_SCALE and OUT_SCALE.
I/O Blocks
93
Application Example: Traditional Temperature Transmitter Assume a temperature transmitter is calibrated for a range of 200 to 400F and is used in a monitor (non-control) application in which accuracy is important. You configure the associated input channel and Analog Input function block as follows. Analog Input Function Block Configuration Example for a Traditional Temperature Transmitter Configuration Setting Channel Type AI Block IO_IN Parameter L_TYPE XD_SCALE OUT_SCALE Traditional 4 to 20 mA Transmitter Analog Input FIELD_VAL_PCT Indirect 0 to 100% 200 to 400F HART Transmitter HART Analog Input HART_PV Direct 200 to 400F 200 to 400F
The following figure is the function block diagram for this example.
Analog Input Function Block Diagram Example for a Traditional Temperature Transmitter Application Example: Traditional Pressure Transmitter Assume the level of a small open tank is to be measured using a pressure tap near the bottom of the tank. Based on the tap location and the density of the material in the tank, the pressure transmitter is calibrated at 0 to 200 in. H2O for a tank level of 0 to 10 ft. The level measurement is used to control the tank level. You configure the associated input channel and Analog Input function block as follows. Analog Input Function Block Configuration Example for a Traditional Pressure Transmitter Configuration Setting Channel Type AI Block IO_IN Parameter L_TYPE XD_SCALE OUT_SCALE Traditional 4 to 20 mA Transmitter Analog Input FIELD_VAL_PCT Indirect 0 to 100% 0 to 10 ft. HART Transmitter HART Analog Input HART_FIELD_VAL Indirect 0 to 200 in. 0 to 10 ft.
94
The following figure is the function block diagram for this example.
Analog Input Function Block Diagram Example for a Traditional Pressure Transmitter Application Example: Traditional Differential Pressure Transmitter Assume the liquid flow in a line is to be measured using the differential pressure across an orifice plate in the line. Based on the orifice specification sheet, the differential pressure transmitter was calibrated for 0 to 20 in. H20 for a flow of 0 to 800 gal/min. The flow measurement is used in a flow control loop. If the transmitter was not set up to take the square root of the differential pressure, you configure the associated input channel and Analog Input function block as follows. Analog Input Function Block Configuration Example for a Traditional Differential Pressure Transmitter Configuration Setting Channel Type AI Block IO_IN Parameter L_TYPE XD_SCALE OUT_SCALE Traditional 4 to 20 mA Transmitter Analog Input FIELD_VAL_PCT Indirect Square Root 0 to 100% 0 to 800 gal/min HART Transmitter HART Analog Input HART_FIELD_VAL Indirect Square Root 0 to 20 in. 0 to 800 gal/min
The following figure is the function block diagram for this example.
Analog Input Function Block Diagram Example for a Traditional Differential Pressure Transmitter
I/O Blocks
95
96
Analog Output Function Block Used in a Simulation CAS_IN is the remote setpoint value from another function block. BKCAL_OUT is the value and status required by the BKCAL_IN input of another block to prevent reset windup and to provide bumpless transfer to closed loop control. OUT is the block output and status.
I/O Blocks
97
98
Analog Output Function Block Timing Diagram You select the manner of processing the SP and the channel output value by configuring setpoint limiting options, tracking options, and conversion and status calculations. Setpoint Limit Scaling On download, the limits are set to the high and low end of the scale. They might be changed by subsequent overrides, which are part of the download. On run time, the following restrictions apply: SP_HI_LIM is restricted to PV_SCALE_HI+.1*(PV_SCALE_HI-PV_SCALE_LO). SP_LO_LIM is restricted to PV_SCALE_LO-.1*(PV_SCALE_HI-PV_SCALE_LO).
If the new scale causes a limit to be outside of these rules, the DeltaV system forces the limit within the rules. The SP parameters are not changed as a result of changing the scale or limits. However, the algorithm might change SP on the next pass. Setpoint Selection and Limiting You use the MODE parameter to select the source of the SP value. In Automatic (Auto) mode, the local, manually entered SP is used. In Cascade (Cas) mode, the SP comes from another block through the CAS_IN input connector. The range and units of the SP are defined by the PV_SCALE parameter. In Manual (Man) mode, the SP automatically tracks the PV value when you select the following I/O option (IO_OPTS): SP-PV Track in Man This option is enabled (True) as a default. SP becomes a copy of PV when the block's target mode is Man. A manually entered SP value is overwritten on the block's next execution cycle. You can disable this option in Man or OOS mode only. The SP value is limited to the range defined by the setpoint high limit parameter (SP_HI_LIM) and the setpoint low limit parameter (SP_LO_LIM).
I/O Blocks
99
In Auto mode, the rate at which a change in the SP is passed to OUT is limited by the values of the setpoint upward rate limit parameter (SP_RATE_UP) and the setpoint downward rate limit parameter (SP_RATE_DN). A limit of zero prevents rate limiting, even in Auto mode. Conversion and Status Calculation The working setpoint (SP_WRK) is the setpoint value after limiting. You can choose to reverse the range for conversion for fail-open actuators by selecting the following I/O option: Increase to Close The converted percent value is inverted and stored in the OUT parameter, except in Man mode. In Man mode, the OUT parameter is set manually. The OUT value is used to set the analog output or the pulse discrete output of the I/O channel defined by the IO_OUT parameter. When you use a pulse discrete output I/O channel, we recommend you set the PULSE_PERIOD of the associated I/O properties to agree with the module's execution period. You access the actuator position analog input that is associated with the output channel through the IO_READBACK parameter. The channel input is shown in the READBACK parameter (in percent) and in the PV parameter (in engineering units). When no input channel is defined, the PV and READBACK values are based on the OUT parameter. The working setpoint (SP_WRK) is the value normally used for the BKCAL_OUT parameter. However, for those cases where the READBACK signal directly (linearly) reflects the OUT channel, you can choose to allow the PV to be used for BKCAL_OUT by selecting the following I/O option: Use PV for BKCAL_OUT Note You can set I/O options in Manual or Out of Service mode only. Scaling for HART and Fieldbus Devices XD_SCALE converts the displayed value of OUT to engineering units when the channel or port for IO_OUT is HART Analog output or Fieldbus. Note For DVC4000/5000 series Fisher valves, you cannot write a value to XD_SCALE while the device is active. This causes a mismatch between the device and the configuration. You must take the device out of service using AMS before it can accept an XD_SCALE change. Simulation When simulation is enabled, the last value of OUT is maintained and is reflected in the field value of the SIMULATE parameter. In this case, the PV and READBACK values and statuses are based on the SIMULATE value and status you enter. Initial Value and Failure Action During I/O configuration, you can configure the following channel parameters: FAIL_ACTION_MODE Controls the behavior of the channel when the card goes into failure action condition due to lost communication with the controller. You can configure the channel to hold the value at the start of the failure action condition or to go to the failure action value (FAIL_ACTION_VAL). FAIL_ACTION_VAL The value the channel transitions to when the card goes into failure action condition, in percent. This value is used only when FAIL_ACTION_MODE is configured to set the value to FAIL_ACTION_VAL. INIT_VAL the value (in percent) that the channel goes to upon initial download before any function block action drives the output.
100
Refer to the I/O Configuration topic for more information on channel parameters. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Input failure/process variable has Bad status The source of the block's process variable is bad. Indicates a hardware failure, a non-existent Device Signal Tag (DST), or a Bad status on the SIMULATE parameter. Out of Service The block is in Out of Service (OOS) mode. Output failure The write to the output failed or the DST is bad. Readback failed The I/O readback failed. Simulate active Simulation is enabled and the block is using a simulated value in its execution. I/O Readback Options When the channel type is HART Analog Output Channel, the following options are available for the IO_READBACK parameter: HART_DV_SLOT0 the slot 0 device variable value. This value is read digitally. HART_DV_SLOT1 the slot 1 device variable value. This value is read digitally. HART_DV_SLOT2 the slot 2 device variable value. This value is read digitally. HART_DV_SLOT3 the slot 3 device variable value. This value is read digitally. HART_FIELD_VAL the 4 to 20 mA signal of the HART device. HART_PV the Primary Variable of a HART transmitter, in engineering units. This value is read digitally. HART_SV the Secondary Variable of a HART transmitter, in engineering units. This value is read digitally. HART_TV the Tertiary Variable of a HART transmitter, in engineering units. This value is read digitally. HART_FV the Fourth Variable of a HART transmitter, in engineering units. This value is read digitally. For more information on the DeltaV systems implementation of HART communications, refer to the HART Devices and the DeltaV System topic.
I/O Blocks
101
ALERT_KEY
None
BAD_ACTIVE
None
BAD_MASK
None
BKCAL_OUT
EU of PV_SCALE
BLOCK_ERR
None
102
Description The remote SP value from another function block. The number of the logical hardware channel that is connected to the I/O block. It defines the transducer to be used going to or from the physical world.* The time in seconds from detection of fault of the output block remote setpoint to the output action of the block output if the condition still exists.* The preset analog SP value to use when fault occurs. Ignored if the I/O option Fault State to value is false.* Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 only if the following conditions are true: - The Write To Inspect Alarm context menu item has been selected from Inspect for this block. - With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition exists for Variability only if both the Variability Index and the Standard Deviation have exceeded their defined limits.) I/O options. Allow you to select how the I/O signals are processed. The supported I/O options for the Analog Output function block are SP_PV Track in Man, Increase to Close, and Use PV for BKCAL_OUT. Defines the output DST for the block. Defines the Device Signal Tag (DST) for the input channel that provides readback for the value written to the channel defined by IO_OUT. Parameter used to request and show the source of the setpoint and/or output used by the block. The primary value and status calculated by the block in Auto mode. OUT can be set manually in Man mode. The process variable used in block execution and alarm limit detection. The high and low scale values, the engineering units code, and the number of digits to the right of the decimal point associated with the PV.
FSTATE_TIME
Seconds
FSTATE_VAL INSPECT_ACT
EU of PV None
IO_OPTS
None
IO_OUT IO_READBACK
None None
MODE OUT
None Percent
PV PV_SCALE
EU of PV_SCALE None
I/O Blocks
103
Description The remote analog setpoint value and status. Input provided by a device or the output of another block. The remote analog setpoint value and status after ramping. Output provided to a device for back calculation and to allow action to be taken under limiting conditions or mode change. The percent value of the measured or implied actuator position associated with the OUT value. Defines action to be taken on remote control device time out. The maximum allowable time between RCAS_IN and ROUT_IN updates. If exceeded, mode shedding takes place. Enables simulation and allows you to enter an input value and status. When simulation is enabled, the block does not attempt to write to the hardware. The block's setpoint value. The highest SP value allowed. The lowest SP value allowed. Ramp rate at which downward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. Ramp rate at which upward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. The working setpoint of the block. It is the result of setpoint rate-of-change limiting. The value is converted to percent to obtain the block's OUT value. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.*
SIMULATE
Percent
SP_RATE_UP
SP_WRK
EU of PV_SCALE
ST_REV
None
104
Parameter STDEV_CAP
Description The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
STDEV_TIME
Seconds
STDEV
The standard deviation of PV. For analog control blocks in AUTO, mean is assumed to be the SP. Refer to Loop Performance Calculations for more details on how this parameter is calculated. Status options. Allow you to select options for status handling and processing. The status options are Target to Manual if Bad IN and BAD if Limited. Each function block uses one or none of the status options.* The strategy field can be used to help group blocks. This data is not checked or processed by the block.* The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the channel input value.
STATUS_OPTS
STRATEGY XD_SCALE
None None
* These parameters are only visible when the function block is extended to a Fieldbus device. Note Default values and data type information for the parameters are available by expanding the Parameter View window.
I/O Blocks
105
AO Block Assigned to a Fieldbus Valve If a fieldbus valve loses air, or a fieldbus valve positioner loses power, the valve will either go fully open or fully closed. This state is determined by the valve itself and is often termed its shelf position or air fail position. This state is different from the Fault State parameter (FSTATE_VAL) of the Analog Output function block when it is assigned to a fieldbus valve. By default the Analog Output function block's FSTATE_VAL and FSTATE_TIME parameters are set to 0. This causes the block to hold the last value when communication on the fieldbus is lost. It is highly recommended that you configure the FSTATE_VAL parameter to correctly set the valve position if fieldbus communications to the valve cease for the time period that you configure with the FSTATE_TIME parameter. Note The FSTATE_VAL and FSTATE_TIME parameters only appear in the parameter list after the block has been assigned to a fieldbus device. Limit Write Requests to Static or Non-Volatile Parameters It is recommended that you limit the number of periodic writes to all static or non-volatile parameters, such as HI_HI_LIM, LOW_CUT, SP, TRACK_IN_D, OUT, IO_OPTS, BIAS, STATUS_OPTS, SP_HI_LIM, and so on. Static parameter writes increment the static revision counter, ST_REV, and are written to the device's non-volatile memory. Fieldbus devices have a non-volatile memory write limit. If a static or non-volatile parameter is configured to be written periodically, the device can stop its normal operation after it reaches its limit or fail to accept new values. Consult the device documentation to determine if a parameter is static or non-volatile. Another way to configure your system to avoid burning out non-volatile memory is to link a CALC block or PID block running in the controller to the AO block running in the device. This method avoids the use of asynchronous writes by writing to the AO block through a publisher/subscriber mechanism. To link a CALC block to the AO block: 1 2 Set the AO block mode to CAS, AUTO, or MAN. Link the CALC block's OUT parameter to the AO block's CAS_IN parameter.
To link a PID block to the AO block: 1 2 3 4 5 Set the AO block mode to CAS, AUTO, or MAN. Link the PID block's OUT parameter to the AO block's CAS_IN parameter. Link the AO block's BKCAL_OUT parameter to the PID block's BKCAL_IN parameter. Set the PID parameter CONTROL_OPTS to Track Enable. Write a value to the AO block using the TRK_IN_D and TRK_VAL parameters.
Actuator Requiring Traditional 4 to 20 mA Input When an actuator is designed to accept a 4 to 20 mA signal, use the AO Card, 4 to 20 mA for the output channel. You configure the associated output channel and the Analog Output block as follows: Channel Type: Analog Output Channel Analog Output block IO_OUT parameter: Select OUT. Analog Output block IO_READBACK parameter: Select FIELD_VAL_PCT when the input is 4 to 20 mA. Analog Output block PV_SCALE parameter: Set the range and engineering units to values that correspond to the Analog Output block's 4 to 20 mA output. In many cases, PV_SCALE is set to 0 100%. Analog Output block IO_OPTS parameter: Select Increase to Close when the actuator is designed to fail open.
106
If you are using the CAS_IN connector wired from another block, the Analog Output block's BKCAL_OUT parameter should be wired to the other block's BKCAL_IN parameter. Application Example: Actuator Requiring Traditional 4 to 20 mA Input Assume a regulating valve equipped with an air-operated actuator interfaces to the analog output channel through an I/P transducer that requires 4 to 20 mA input. The Analog Output (AO) function block is used with an Analog Input (AI) function block and a PID function block to control flow in a pipe. The configuration differs depending on whether the valve actuator with the I/P transducer is designed to allow the valve to fail closed or to fail open on the loss of the 4 to 20 mA signal. The following table shows configuration settings for each of these cases. Analog Output Function Block Configuration Example for an Actuator Requiring 4 to 20 mA Input Configuration Setting Channel Type IO_OUT PV_SCALE IO_OPTS Increase to Close Fail Close Analog Output OUT 0 to 100% Not selected Fail Open Analog Output OUT 0 to 100% Selected
The following diagram is the function block diagram for this example.
Analog Output Function Block Diagram Example for an Actuator Requiring 4 to 20 mA Input Actuator Requiring HART Communications Protocol 4 to 20 mA Input When an actuator is designed to accept a 4 to 20 mA signal using the HART Communications Protocol, use the AO Card, 4 to 20 mA, HART for the output channel. Configure the associated output channel and the Analog Output block as follows: Channel Type: HART Analog Output Channel Analog Output block IO_OUT parameter: Select OUT. Analog Output block IO_READBACK parameter: Select the HART device or dynamic variable that holds the desired value. Define the available variables through the DeltaV Explorer. Analog Output block PV_SCALE parameter: Set the range and engineering units to values that correspond to the Analog Output block's 4 to 20 mA output. In many cases, PV_SCALE is set to 0 100%. Analog Output block XD_SCALE parameter: Set the range and engineering units to values that correspond to PV_SCALE. Set the engineering units to match those appropriate to the field device. Analog Output block IO_OPTS parameter: Select Increase to Close when the actuator is designed to fail open.
I/O Blocks
107
If you are using the CAS_IN connector wired from another block, the Analog Output block's BKCAL_OUT parameter should be wired to the other block's BKCAL_IN parameter. Application Example: Actuator Requiring 4 to 20 mA Input Using HART Communications Protocol Assume a regulating valve and actuator that communicates using the HART Communications Protocol interfaces to the analog output channel. The Analog Output (AO) function block is used with an Analog Input (AI) function block and a PID function block to control flow in a pipe. The configuration differs depending on whether the valve actuator with the I/P transducer is designed to allow the valve to fail closed or to fail open on the loss of the 4 to 20 mA signal. The following table shows configuration settings for each of these cases. Analog Output Function Block Configuration Example for an Actuator Requiring 4 to 20 mA Input Configuration Setting Channel Type IO_OUT PV_SCALE IO_OPTS Increase to Close Fail Close HART Analog Output OUT 0 to 100% Not selected Fail Open HART Analog Output OUT 0 to 100% Selected
The following diagram is the function block diagram for this example:
Analog Output Function Block Diagram Example for an Actuator Requiring 4 to 20 mA Input Field Device Requiring Discrete Pulse Duration Input When a field device, such as a heater band, is designed to accept a pulse duration input, you use a DO card type for the output channel and you configure the output channel and Analog Output function block as follows: Channel Type: Continuous Pulse Output Channel. Define the PULSE_PERIOD (in seconds) equal to the AO block execution period. Note that PULSE_PERIOD will probably be different than the module scan rate. Analog Output block IO_OUT parameter: Select ON_TIME. Analog Output block IO_READBACK parameter: Select FIELD_VAL_PCT when the input is 4 to 20mA. (Refer to the Analog Input function block information for HART input options.) Analog Output block PV_SCALE parameter: Set the range and engineering units to the values that correspond to the Analog Output block's output. In many cases, PV_SCALE is set to 0 100%. Analog Output block IO_OPTS parameter: Do not select Increase to Close.
108
When the Analog Output function block is used for pulse duration output through a discrete channel, the OUT value (in percent) is used to determine the time on during the defined pulse period. For example, when OUT = 50%, the discrete output channel is turned on for 50% of the defined PULSE_PERIOD. The discrete output is turned on by the discrete card and is accurate to within 2 msec of the value determined by OUT and PULSE_PERIOD. Application Example: Field Device Requiring Pulse Duration Input Assume a heater band on an extruder interfaces to the discrete output channel through a contactor that requires a pulse duration discrete input. The Analog Output (AO) function block is used with an Analog Input (AI) function block and a PID function block to control temperature by regulating duty cycle (percent time on). The module containing these blocks is defined to execute on a ten-second period. With continuous heat applied (100% duty cycle), the energy input is 50 kW. The configuration differs depending on whether the AO block setpoint is to be set in kW or in percent energy input. The following table shows configuration settings for each of these cases. Analog Output Function Block Configuration Example for an Actuator Requiring Pulse Duration Input Configuration Setting Channel Type AO Block IO_OUT Parameter PV_SCALE IO_OPT Increase to Close Setpoint in Percent Continuous Pulse Output, 10 sec ON_TIME 0 to 100% Not selected Setpoint in kW Continuous Pulse Output, 10 sec ON_TIME 0 to 50 kW Not selected
The following figure is the function block diagram for this example:
Analog Output Function Block Diagram for Actuator Requiring Pulse Duration Input
I/O Blocks
109
DI Function Block with Simulation Enabled SIMULATE_IN_D is the simulated discrete value used by the block when simulation is enabled. OUT_D is the discrete output value and status.
110
Note Make sure SIMULATE_IN_D is not connected if you want to enter the value or status manually. When SIMULATE_IN_D is connected, the value from the SIMULATE_IN_D Value field is used as the simulated value.
I/O Blocks
111
When the value/status from another block is used: During configuration, connect SIMULATE_IN_D to the desired block output or parameter. Do not enter a value in the Simulate Value field of the SIMULATE_IN_D input; the block uses the connected value automatically. During operation, the operator enables simulation by selecting the SIMULATE_D parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field.
Note Do not enter a value for the SIMULATE_IN_D parameter. If you do and the status of SIMULATE_IN_D is not Bad: NotConnected, the manually entered value for SIMULATE_IN_D overrides any value you enter in SIMULATE_D. When SIMULATE_D is not enabled, the hardware value becomes the FIELD_VAL_D parameter value in the block. When SIMULATE_D is enabled, the value and status of the SIMULATE_IN_D parameter become the value and status of FIELD_VAL_D. Field Value Processing You can configure the Invert I/O option (IO_OPTS) to process FIELD_VAL_D: Invert The output of the Invert processor is PV_D. This value goes to the mode switch where it becomes OUT_D when the mode is Auto. OUT_D is tested for an alarm state. You might choose this option when the field contact is normally closed, so an open contact or a broken wire represents the active state of the condition being sensed. PV Filter Filtering in a Discrete Input function block is performed with on and off delays. FIELD_VAL_D must be on (or off) for PV_FTIME without changing before the block passes a change to PV_D. Note You can set the I/O option in Manual or Out of Service mode only.
112
ALERT_KEY BAD_ACTIVE
None None
I/O Blocks
113
Parameter BAD_MASK
Units None
Description The set of active error conditions that triggers a user-defined Bad condition. The user selects a subset of block error (BLOCK_ERR) conditions in the BAD_MASK parameter. When any of these conditions are True, the BAD_ACTIVE parameter becomes True. When any of the BLOCK_ERR conditions that are not included in BAD_MASK are True, ABNORM_ACTIVE becomes True. The summary of active error conditions associated with the block. The block errors for the Discrete Input function block are Simulate active, Input failure/process variable has Bad status, and Out of Service. The number of the logical hardware channel that is connected to the I/O block. It defines the transducer to be used going to or from the physical world.* The result of alarm detection associated with DISC_LIM. If the state of OUT_D matches the value of DISC_LIM, DISC_ACT equals True. The state of the discrete input that causes an alarm. Any number from 0 to 255 can be entered, although only 0 and 1 produce an alarm. State 255 specifies that no alarm indication is to be shown. The value and status of the discrete input from a field device. Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 only if the following conditions are true: - The Write to Inspect Alarm context menu item has been selected from Inspect for this block. - With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition exists for Variability only if both the Variability Index and the Standard Deviation have exceeded their defined limits.) Defines the input DST for the I/O channel used for the PV. I/O options. Allow you to select options for I/O value processing. The supported I/O option for the Discrete Input function block is Invert. The mode record of the block. Contains the actual, target, permitted, and normal modes. The discrete output value and status. Index to the text describing the states of a discrete for the value obtained from the transducer.*
BLOCK_ERR
None
CHANNEL
None
DISC_ACT
None
DISC_LIM
None
FIELD_VAL_D INSPECT_ACT
None None
IO_IN IO_OPTS
None None
114
Description The discrete process variable used in block execution. The time that FIELD_VAL_D must be on or off before PV_D changes. Enables simulation and allows you to enter an input value and status when SIMULATE_IN_D is not connected. The simulated discrete input value used when simulation is enabled. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.* Status options. Allow you to select options for status handling and processing. The status options are Target to Manual if Bad IN and BAD if Limited. Each function block uses one or none of the status options. The strategy field can be used to help group blocks. This data is not checked or processed by the block.* The substituted (from a field device) discrete input value and status.* Index to the text describing the states of a discrete for the value obtained from the transducer.*
STATUS_OPTS
None
* These parameters are only visible when the function block is extended to a Fieldbus device. Note Default values and data type information for the parameters are available by expanding the Parameter View window.
I/O Blocks
115
DO Function Block Used in a Simulation CAS_IN_D is the remote setpoint value from another function block. BKCAL_OUT_D is the output value and status required by the BKCAL_IN_D input of another block for output tracking. OUT_D is the discrete output value and status.
116
I/O Blocks
117
You can select setpoint inversion by configuring the Invert I/O option: Invert When this option is enabled (True), OUT_D becomes an inverted copy of SP_D. When this option is not enabled (False), OUT_D is a straight copy of SP_D. When you configure the Discrete Output function block, you select the I/O channel associated with a discrete output by configuring the Device Signal Tag (DST) of the IO_OUT parameter. You select the Device Tag and the parameter the DO block accesses on that channel. If you select Discrete Output Channel for the channel type, the only selectable channel parameter is: OUT_D The current Boolean value driven to the card and the status of the output channel. If you select Momentary Output Channel for the channel type, the only selectable channel parameter is: OUT_D Writing a True (1) value to this parameter causes the channel to output a pulse of a fixed duration. You configure the pulse duration during I/O configuration. You configure a failure action and value for the output during I/O configuration. Simulation When SIMULATE_D is not enabled, and the mode is not Out of Service (OOS), the value of OUT_D is sent to the hardware. When SIMULATE_D is enabled, the status of OUT_D is forced to Good regardless of the condition of the hardware. Getting Feedback from the Hardware You can configure the IO_READBACK parameter to determine the pair of field wires that are used for confirming the hardware output of this block. To select the DST, you enter the Device Tag of the desired discrete input, or you can browse for it among all of the available Device Tags. There is only one possible parameter of the Device Tag that can be used (FIELD_VAL_D), so it is entered automatically. When IO_READBACK is not configured, a copy of OUT_D is used in its place (with a delay of one execution time). This signal goes through the SIMULATE_D switch to become READBACK_D. You can enter a value and status for READBACK_D in SIMULATE_D when it is enabled. The readback value is processed through the Invert I/O option to become PV_D, which normally matches SP_D in Auto or Cas mode. Usually, BKCAL_OUT_D has the value of SP_D and the status of the hardware. When SIMULATE_D is enabled, the status is forced to Good: Cascade. You can configure the Use PV for BKCAL_OUT I/O option: Use PV for BKCAL_OUT Note You can set I/O options in Manual or Out of Service mode only. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Simulate active SIMULATE_D is enabled; therefore, PV_D is not real. Input failure/process variable has Bad status The source of the block's process variable is bad. For the DO block, this might indicate a hardware failure, a non-existent Device Signal Tag (DST), or a Bad status on the SIMULATE_D parameter. Output failure The output hardware or the DST is bad. Readback failed The hardware or DST providing readback is bad. Out of Service The block is not being processed.
118
I/O Blocks
119
ALERT_KEY BAD_ACTIVE
None None
BAD_MASK
None
BKCAL_OUT_D BLOCK_ERR
None None
CAS_IN_D CHANNEL
None None
FSTATE_TIME
Seconds
FSTATE_VAL_D
EU of PV
120
Parameter INSPECT_ACT
Units None
Description Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 only if the following conditions are true: - The Write To Inspect Alarm context menu item has been selected from Inspect for this block. - With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition exists for Variability only if both the Variability Index and the Standard Deviation have exceeded their defined limits.) I/O options. Allow you to select how the I/O signals are processed. The supported I/O options for the Discrete Output function block are SP_PV Track in Man, Invert, and Use PV for BKCAL_OUT. Defines the output DST for the block. Defines the Device Signal Tag (DST) for the input channel that provides readback for the value written to the channel defined by IO_OUT. The mode record of the block. Contains the actual, target, permitted, and normal modes. The discrete output value and status. The discrete process variable calculated from READBACK_D. The readback indication of the current output.* The remote discrete setpoint value and status. Input provided by a device or the output of another block.* The remote discrete setpoint value and status after ramping. Output provided to a device for back calculation and to allow action to be taken under limiting conditions or mode change.* The discrete process value from IO_READBACK. Defines action to be taken on remote control device time out.* Enables simulation. The discrete target block output value (setpoint). The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.*
IO_OPTS
None
IO_OUT IO_READBACK
None None
None None None PV EU of SP_SCALE EU of PV_SCALE None None None None None
I/O Blocks
121
Parameter STATUS_OPTS
Units None
Description Status options. Allow you to select options for status handling and processing. The status options are Target to Manual if Bad IN and BAD if Limited. Each function block uses one or none of the status options.* The strategy field can be used to help group blocks. This data is not checked or processed by the block.* Index to the text describing the states of a discrete for the value obtained from the transducer.*
STRATEGY XD_STATE
None None
* These parameters are only visible when the function block is extended to a Fieldbus device. Note Default values and data type information for the parameters are available by expanding the Parameter View window.
122
Multiple Discrete Input Function Block OUT_INT is the 8-bit integer output value and status.
I/O Blocks
123
Input card. FIELD_VAL_D is the last 8-bit integer value reported by the card and the current status of the carrier. Refer to the Status Handling Multiple Discrete Input Function Block topic for more details. Simulation To support testing, you can enable simulation. This allows the measurement value and status to be supplied manually. When the value is entered manually: The operator first enables simulation by selecting the SIMULATE_D parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field. The operator enters the value to be used in the SIMULATE_D parameter Simulate Value field. In online operation, the operator can enter a simulated status value in the Simulate Status field.
When SIMULATE_D is not enabled, the hardware value becomes the FIELD_VAL_D parameter value in the block. When SIMULATE_D is enabled, the simulated value and status becomes the value and status of FIELD_VAL_D. Field Value Processing Invert You can configure the Invert I/O option (IO_OPTS) to process FIELD_VAL_D. Selecting the invert option causes all channel values to be inverted. The output of the Invert processor is PV_D. You might choose this option when the field contact is normally closed so that an open contact or a broken wire represents the active state of the condition being sensed. Note You can set the I/O option in Out of Service mode only. PV Filter Filtering in a Multiple Discrete Input function block is performed with on and off delays. FIELD_VAL_D must be on (or off) for PV_FTIME without changing before the block passes a change to PV_D. PV_FTIME is applicable for all of the channels. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Simulate active SIMULATE_D is enabled; therefore, OUT_INT is not real. Input failure/process variable has Bad status The source of the block's process variable is bad. Out of Service The block is not being processed. Other Error The block is not communicating with the carrier.
124
When SIMULATE_D is enabled, FIELD_VAL_D, PV_D, and OUT_INT are set to the simulation status. When the block is set to Man mode, OUT_INT is set to Good: Non-cascade, Constant status, unless the status option (STATUS_OPTS) of Uncertain if Man Mode is set. For more information regarding status options, refer to the Status Options topic.
BAD_ACTIVE BAD_MASK
None None
BLOCK_ERR
None
FIELD_VAL_D
None
I/O Blocks
125
Parameter IO_OPTS
Units None
Description I/O options. Allow you to select options for I/O value processing. The supported I/O option for the Multiple Discrete Input function block is Invert. The mode record of the block. Contains the actual, target, permitted, and normal modes. The 8-bit integer output value and status. The 8-bit integer process variable used in block execution. The time that each bit of FIELD_VAL_D must be on or off before the corresponding bit of PV_D changes. Enables simulation and allows you to enter a discrete value and status. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written ,but the value is not changed. Status options. Allow you to select options for status handling and processing. The applicable status option for this block is Uncertain if Man mode. When this option is selected and the fault state is Active, the substatus on BKCAL_OUT is Fault State Active. The strategy field can be used to help group blocks. This data is not checked or processed by the block. The substituted (from a field device) discrete input value and status. This parameter is used to provide user-entered value and status to OUT_INT when either the device placeholder is not commissioned or the device is not communicating with the H1 card.
SIMULATE_D ST_REV
None None
STATUS_OPTS
None
STRATEGY
None
SUBSTITUTE_IN_D
None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
126
I/O Blocks
127
Multiple Discrete Output Function Block CAS_IN_D is the remote setpoint value from another function block. BKCAL_OUT_D is the output value and status required by the BKCAL_IN_D input of another block. OUT_D is the 8-bit integer output value and status.
128
I/O Blocks
129
The block goes to IMan mode under the following conditions: No DO card or the wrong card is present. Communication with the H1 carrier is bad. The transducer block in the H1 carrier is in OOS mode.
The block goes to LO mode when the fault state is active. Tgt to Man if Fault State Active This option causes the target mode of the block to become Man when the fault state is active. Any of the following conditions causes the fault state to be active: The actual mode of the block is Cas and the status of CAS_IN_D is BAD. The actual mode of the block is Cas, and the substatus of CAS_IN_D is Initiate Fault State. The fault state is set manually in the resource block in the H1 carrier.
Use Fault st val on Restart This option causes OUT_D to have the value of FSTATE_VAL_D on a restart (that is, when the carrier is powered up). Fault State to value This option causes OUT_D to have the value of FSTATE_VAL_D when the fault state is active. This occurs FSTATE_TIME seconds after the fault state is detected if the condition still exists. When the option is not selected, OUT_D keeps its value when the fault state is active. Use PV for BKCAL_OUT This option results in the value of BKCAL_OUT_D being that of PV_D. Normally BKCAL_OUT is the value of SP_D. Invert When this option is enabled (True), OUT_D becomes an inverted copy of SP_D. When this option is not enabled (False), OUT_D is a straight copy of SP_D. Inversion is done on a bit by bit basis. Note You can set I/O options in Out of Service mode only. Simulation When SIMULATE_D is not enabled and the mode is not Out of Service (OOS), the value of OUT_D is sent to the hardware. When SIMULATE_D is enabled, the status of OUT_D is forced to Good, regardless of the condition of the hardware. In addition, READBACK_D and PV_D take on the value and status of SIMULATE_D. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Simulate active SIMULATE_D is enabled; therefore, PV_D is not real. Input failure/process variable has Bad status The source of the block's process variable is bad. For the FFMDO block, this might indicate a hardware failure or a Bad status on the SIMULATE_D parameter. Output failure The output hardware is Bad. Out of Service The block is not being processed.
130
I/O Blocks
131
Description The value and status required by the BKCAL_IN_D input of another block. The summary of active error conditions associated with the block. The block errors for the Multiple Discrete Output function block are Simulate active, Input failure/process variable has Bad status, Output failure, and Out of Service. The remote setpoint value from another block. The time in seconds from detection of fault of the output block remote setpoint to the output action of the block output if the condition still exists. The preset discrete SP_D value to use when fault occurs. Ignored if the I/O option Fault State to value is false. I/O options. Allow you to select how the I/O signals are processed. The supported I/O options for the Multiple Discrete Output function block are: Use PV for BKCAL_OUT, Tgt to Man if Fault State Active, Use fault st val on restart, Fault State to value, SP-PV Track in Man, SP-PV Track in LO or IMan, and Invert. The mode record of the block. Contains the actual, target, permitted, and normal modes. The 8-bit integer output value and status. The 8-bit integer process variable calculated from READBACK_D. The remote setpoint value and status. Input provided by a device or the output of another block. The remote setpoint value and status output provided to a device to allow action to be taken under mode change. The value and status of OUT_D unless simulation is enabled, in which case it is the simulated value and status. Defines action to be taken on remote control device time out. Enables simulation and allows you to enter an 8-bit integer value and status. The discrete target block output value (setpoint). The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.
CAS_IN_D FSTATE_TIME
None Seconds
FSTATE_VAL_D IO_OPTS
EU of PV None
MODE OUT_D PV_D RCAS_IN_D RCAS_OUT_D READBACK_D SHED_OPT SIMULATE_D SP_D ST_REV
None None None EU of SP_SCALE EU of PV_SCALE None None None None None
132
Parameter STATUS_OPTS
Units None
Description Status options. Allow you to select options for status handling and processing. The applicable status option for this block is Propagate Fault Backward. When this option is selected and the fault state is Active, the substatus on BKCAL_OUT is Fault State Active. The strategy field can be used to help group blocks. This data is not checked or processed by the block.
STRATEGY
None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Use Example for FFMDI and FFMDO The FFMDI and FFMDO blocks are typically used in conjunction with the Boolean Fan Input (BFI) and Boolean Fan Output (BFO) function blocks. When the FFMDI block is assigned to an H1 carrier, the block is associated with the Discrete Input card connected to the carrier. When the FFMDO block is assigned to an H1 carrier, the block is associated with the Discrete Output card connected to the carrier. Boolean fan blocks can be used to isolate the values associated with the channels. Caution One or more bad inputs to a BFI function block results in a bad output. This causes an FFMDO block to shed mode and hold outputs. In the application shown, bad inputs are not likely. Review your application to determine the potential for bad inputs to the BFI block and the possible consequences. Use the Calculation/Logic function block as an alternative. Also, refer to the sample code at the end of this application example.
I/O Blocks
133
Schematic for Use Example In this example, module blocks VLV101, VLV102, and PMP101 are references to modules containing Device Control function blocks. The module block FSL101 is a reference to a module containing an input parameter used to generate an alarm for the flow switch.
134
Schematic of Module Blocks for the Use Example In the example, FFMDI1 reads the Discrete Input card channels. BFO1 distributes these values to the module blocks. The outputs of these blocks are brought into BFI1 and are then output to FFMDO1 to drive the channels on the Discrete Output card on the H1 carrier. The input parameter in FSL101 contains a low flow alarm. When the flow is low, PV_D goes to zero, triggering an alarm. Note that the input and output parameters in the module blocks must be Discrete with Status.
I/O Blocks
135
Sample Code for Calc/Logic Block Application The following code is an example of how you can use the Calc/Logic block as an alternative to the Boolean Fan Input block for applications that use the Multiple Discrete Output function block. OPTION EXPLICIT VAR VAL1; VAL2; END_VAR; VAL1 := OUT1; IF 'IN1.ST' = GOOD THEN IF IN1 = TRUE THEN VAL1 := VAL1 | 1; ELSE VAL1 := VAL1 & 254; ENDIF; ENDIF; IF 'IN2.ST' = GOOD THEN IF IN2 = TRUE THEN VAL1 := VAL1 | 2; ELSE VAL1 := VAL1 & 253; ENDIF; ENDIF; IF 'IN3.ST' = GOOD THEN IF IN3 = TRUE THEN VAL1 := VAL1 | 4; ELSE VAL1 := VAL1 & 251; ENDIF; ENDIF; IF 'IN4.ST' = GOOD THEN IF IN4 = TRUE THEN VAL1 := VAL1 | 8; ELSE VAL1 := VAL1 & 247; ENDIF; ENDIF; IF 'IN5.ST' = GOOD THEN IF IN5 = TRUE THEN VAL1 := VAL1 | 16; ELSE VAL1 := VAL1 & 239; ENDIF; ENDIF; IF 'IN6.ST' = GOOD THEN IF IN6 = TRUE THEN VAL1 := VAL1 | 32; ELSE VAL1 := VAL1 & 223; ENDIF; ENDIF; IF 'IN7.ST' = GOOD THEN IF IN7 = TRUE THEN
136
VAL1 := VAL1 | 64; ELSE VAL1 := VAL1 & 191; ENDIF; ENDIF; IF 'IN8.ST' = GOOD THEN IF IN8 = TRUE THEN VAL1 := VAL1 | 128; ELSE
I/O Blocks
137
Multiplexed Analog Input Function Block Note that the MAI block uses many of the same parameters to support all eight inputs. One consequence of this is that the RTDs or thermocouples connected to an MAI block must all have the same range. In a similar way, the simulation value and mode handling applies to all outputs as well. The MAI block is ideal for higher density fieldbus transmitters, such as the Rosemount Model 848T transmitter.
138
Multiplexed Input Function Block Timing Diagram You select the manner of processing the analog measurement value by configuring signal conversion and filtering parameters. Signal Conversion You choose direct, indirect, or indirect square root signal conversion with the linearization type parameter (L_TYPE). The block applies transducer scaling (XD_SCALE) to the value from the channel to produce the FIELD_VAL in percent. The XD_SCALE units code must match the channel units code (if one exists), or the block remains in OOS mode after configuration. The OUT_SCALE is normally the same as the transducer, but if L_TYPE is set to Indirect or Ind Sqr Root, OUT_SCALE determines the conversion from FIELD_VAL to the output. PV and OUT always have identical scaling. OUT_SCALE provides scaling for PV. The PV is always the value that the block puts in OUT if the
I/O Blocks
139
mode is Auto. If Man is allowed, someone may write a value to the output. The status prevents any attempt at closed loop control using the Man value by setting the Limit value to Constant. Equations:FIELD_VAL = 100 * (channel value - EU @ 0%) / (EU @ 100% - EU @ 0%) [XD_SCALE] Direct: PV = channel value Indirect: PV = (FIELD_VAL/100) * (EU @ 100% - EU @ 0%) + EU @ 0% [OUT_SCALE] Ind Sqr Root: PV = sqrt(FIELD_VAL/100) * (EU @ 100% - EU @ 0%) + EU @ 0% [OUT_SCALE] Select one of the following signal conditioning options: Direct signal conditioning simply passes through the accessed channel input value (or the simulated value when simulation is enabled). Indirect signal conditioning linearly converts the accessed channel input value (or the simulated value when simulation is enabled) from its specified range (XD_SCALE) to the range and units of the PV and OUT parameters (OUT_SCALE). Indirect square root signal conditioning converts the accessed channel input value (or the simulated value when simulation is enabled) from its specified range (XD_SCALE) by taking the square root of the value and scaling it to the range and units of the PV and OUT parameters (OUT_SCALE). You view the accessed value (in percent of XD_SCALE) through the FIELD_VAL parameter. When the converted input value is below the limit specified by the LOW_CUT parameter and the Low Cutoff I/O option (IO_OPTS) is enabled (True), a value of zero is used for the converted value (PV). This option can be useful with zero-based measurement devices, such as flowmeters. Note You can set the I/O option in Out of Service mode only. Filtering You apply filtering to the converted value (PV) by specifying the filter time constant (in seconds) in the PV_FTIME parameter. When you specify a value of zero, no filtering is applied. Block Errors The following 16 conditions can be reported in the BLOCK_ERR parameter: Other Block Configuration Error: the selected channel carries a measurement that is incompatible with the engineering units selected in XD_SCALE, the L_TYPE parameter is not configured, or CHANNEL = zero. Link Configuration Error Simulate Active: Simulation is enabled and the block is using a simulated value in its execution. Local Override Device Fault State Set Device Needs Maintenance Soon Input Failure/Process Variable has Bad Status: The hardware is bad, or a bad status is being simulated. Output Failure: The output is bad based primarily upon a bad input. Memory Failure Lost Static Data Lost NV Data Readback Failed
140
Device Needs Maintenance Now Power Up Out of Service: The actual mode is Out of Service.
Note You can set the status option (STATUS_OPTS) in Out of Service mode only. In Auto mode, OUT_n reflects the value and status quality of the measurement. In Man mode, the OUT_n status high and low limits are set to indicate that the value is a constant and the OUT_n status is always Good.
I/O Blocks
141
ALERT_KEY BAD_ACTIVE
None None
BAD_MASK
None
BLOCK_ERR CHANNEL
None None
None
None
L_TYPE
None
142
Parameter LOW_CUT
Units Percent
Description Activated when the Low Cutoff I/O option is enabled (True). When the converted measurement is below the LOW_CUT value, the PV is set to 0.0. Parameter used to request and show the source of the output used by the block. The primary value and status calculated by the block in Auto mode. OUT can be set manually in Man mode. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The time constant of the first-order PV filter. It is the time required for a 63% change in the FIELD_VAL to be reflected in the PV. Enables simulation and allows you to enter an input value and status. The SIMULATE value is used by the block only when SIMULATE is enabled. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed. Status options. Allow you to select options for status handling and processing. The supported status options for the Multiplexed Analog Input function block are: Uncertain if Man mode BAD if Limited Uncertain if Limited Propagate Fault Forward
None EU of OUT_SCALE
None
PV_FTIME
Seconds
SIMULATE
None
ST_REV
None
STATUS_OPTS
None
STRATEGY SUBSTITUTE_IN
Use the strategy field to group blocks. This data is not checked or processed by the block. If there is a problem communicating with the field device and SUBSTITUTE_IN has a non-Bad status, the controller passes the SUBSTITUTE_IN value through to the output parameter(s) of the shadow block.* The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the channel input value.
XD_SCALE
I/O Blocks
143
144
Pulse Input Function Block The PIN function block supports block alarming, signal scaling, signal filtering, signal status calculation, mode control, and simulation. In Automatic mode, the block's output parameter (OUT) reflects the process variable (PV) value and status. In Manual mode, OUT can be set manually. To support testing, you can enable simulation. This allows the measurement value and status to be supplied manually or from another block through the SIMULATE_IN input.
I/O Blocks
145
146
When the value is entered manually: The operator first enables simulation by selecting the SIMULATE parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field. In online operation, the operator can enter a simulated status value in the Simulate Status field. If SIMULATE_IN is not connected (status = Bad: NotConnected), the SIMULATE value is used. If SIMULATE_IN has any status except Bad: NotConnected, the SIMULATE_IN value is used. In this case, the SIMULATE_IN value always overrides the SIMULATE value.
Note Use the SIMULATE parameter to enter values manually and make sure SIMULATE_IN is not connected. If SIMULATE_IN is connected or a value is entered manually into SIMULATE_IN, the SIMULATE_IN value overrides the SIMULATE value. When the value/status from another block is used: During configuration, connect SIMULATE_IN to the desired block output or parameter. Do not enter a value in the Simulate Value field of the SIMULATE_IN input; the block uses the connected value automatically. During operation, the operator enables simulation by selecting the SIMULATE parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field.
Note Do not enter a value for the SIMULATE_IN parameter. If you do and the status of SIMULATE_IN is not Bad: NotConnected, the manually entered value for SIMULATE_IN overrides any value you enter in SIMULATE. Filtering You apply filtering to the converted value (PV) by specifying the filter time constant (in seconds) in the PV_FTIME parameter. When you specify a value of zero, no filtering is applied. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Simulate active Simulation is enabled and the block is using a simulated value in its execution. Input failure/process variable has Bad status The source of the block's process variable is bad. Indicates a hardware failure, a non-existent Device Signal Tag (DST), or a Bad status on the SIMULATE parameter. Out of Service The block is in Out of Service (OOS) mode. Calculation of OUT OUT equals PV and status when in Auto mode. The operator sets OUT when in Manual mode. The DeltaV Multifunction card calculates the frequency of pulses in counts per second. Therefore, the block does not use scan rate in the calculation of OUT. Calculation of PV The Pulse Input function block's PV is calculated by frequency times pulse value times time units factor. The DeltaV Multifunction card calculates the frequency of pulses in counts per second. Therefore, the block does not use scan rate in the calculation of PV. Calculation of FIELD_VAL The Pulse Input function block's FIELD_VAL is calculated as the percent value of PV within the range defined by OUT_SCALE.
I/O Blocks
147
148
Bias/Gain Function Block IN_1 is the input value and status. BKCAL_IN is the analog input value and status from another block's BKCAL_OUT output that is used for backward output tracking. TRK_IN_D is the Boolean input used to initiate the external tracking function. TRK_VAL is the input value OUT is set to in Local Override (LO) mode (while TRK_IN_D is true). OUT is the biased analog output value and status. BKCAL_OUT is the output value connected to the BKCAL_IN input of another block to prevent reset windup and to provide bumpless transfer to closed loop control.
149
There are two ways to modify the input. Either offset the input from its original value by a specific amount or scale the input. The following figure illustrates each of these cases for a single input. The figure shows the two methods of modification separately. However, these methods can be combined so that Bias/Gain delivers scaling and offset together.
150
Bias/Gain Control Signal Modification Diagram SP offsets the input by a given amount, and GAIN scales the modified input. In the first example in the above figure, SP is 0, and OUT is GAIN * IN_1. However, in the second example, SP has a non-zero value, and GAIN is set to 1 (no scaling). Therefore, OUT is IN_1 + SP. Note To pass the input directly through unchanged, set SP = 0 and GAIN = 1. Tracking You specify output tracking with control options and parameters. The Track Enable control option (CONTROL_OPTS) must be True for the track function to operate. When the Track in Manual control option is True, tracking can be activated and maintained when the block is in Man mode. When Track in Manual is False, the operator might override the tracking function when the block is in Man mode. Activating the track function causes the block's actual mode to go to Local Override (LO). You can set control options in Manual or Out of Service mode only. The tracking value parameter (TRK_VAL) specifies the value to be converted and tracked into the output when the track function is operating. The tracking scale parameter (TRK_SCALE) specifies the range of TRK_VAL. When the track control parameter (TRK_IN_D) is True and the Track Enable control option is True, the TRK_VAL input is converted to the appropriate value and output in units of OUT_SCALE. Setpoint Limiting You limit the setpoint by configuring the SP_HI_LIM and SP_LO_LIM parameters. You limit the rate of change of the setpoint by configuring the SP_RATE_UP and SP_RATE_DN parameters. The value of the setpoint after limiting is shown in the working setpoint (SP_WRK) parameter.
151
Output Limit Constraints As part of download the output high and low limits are set to the configured values. If these limits have not been configured OUT_HI_LIM will be set to OUT_SCALE_HI and OUT_LO_LIM will be set to OUT_SCALE_LO. The following constraints apply as part of download or on-line entry: OUT_HI_LIM is restricted to OUT_SCALE_HI+.1*(OUT_SCALE_HI-OUT_SCALE_LO). OUT_LO_LIM is restricted to OUT_SCALE_LO-.1*(OUT_SCALE_HI-OUT_SCALE_LO).
If a new scale entry causes a limit to be outside of these rules, the DeltaV system forces the limit within the rules. The OUT parameter is not immediately changed as a result of changing the scale or limits. However, if OUT violates the new limits, the algorithm will change OUT on the subsequent execution in order to satisfy the new limits if required. Output Selection and Limiting Output selection is determined by mode. In an automatic control mode, the output is computed by bias/gain control. In Man mode, the output can be entered manually. In LO mode the output is determined by TRK_VAL and its scaling. You limit the output by configuring the OUT_HI_LIM and OUT_LO_LIM parameters. Bumpless Transfer on Mode Transitions The BAL_TIME parameter determines bumpless transfer operations. When the mode transitions from a nonautomatic mode to an automatic mode, an internal balancing bias is calculated that maintains OUT. The internal bias is then ramped to zero over a period of time specified by BAL_TIME. When BAL_TIME is zero, the internal bias and ramp to 0 (zero) are not applied. When BAL_TIME is non-zero, the internal bias and ramp to 0 are applied. When ACT_ON_IR in CONTROL_OPTS is chosen the setpoint is back calculated for bumpless transfer on transition from a non-automatic to an automatic mode. Since the SP could be outside the SP limits, and therefore a bump is possible, it is wise to have a non-zero BAL_TIME to cushion or ramp the bump as described in the previous paragraph. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Local Override The block is in Local Override (LO) mode. Out of Service The block is in Out of Service (OOS) mode.
BAL_TIME
Seconds
153
Parameter BKCAL_IN
Units EU of OUT_SCALE
Description The analog input value and status from another block's BKCAL_OUT output that is used by an upstream block for bumpless transfer. The value and status required by the BKCAL_IN input of another block to prevent reset windup and to provide bumpless transfer to closed loop control. The summary of active error conditions associated with the block. The block errors for the Bias/ Gain function block are Local override and Out of Service. The remote analog setpoint value from another block. Control options. Allow you to specify control strategy options. The supported control options for the Bias/Gain function block are No OUT Limits in Manual, Obey SP Limits if Cas or RCas, Use BKCAL_OUT With IN_1, Act on IR, Track in Manual, Track Enable, and SP Track Retained Target. FRSI RB options. The supported option is Treat_IN_1 As Wild. When Treat_IN_1 As Wild is true regardless of cascade or non-cascade connection IN_1 is treated as a noncascade input and if Use_Bkcal_out_With_IN_1 is true Bkcal_out sub-status will be set to keep cascade closed. The multiplier applied in GAIN * (SP + IN_1). The input with status to which the bias (SP) is applied. Parameter used to show and set the block operating state. The block output value and status. The maximum output value allowed. The minimum output value allowed. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The remote setpoint value and status. Input provided by a remote device or the output of another block. The output provided for bumpless mode transfer and reset limiting by the source of RCAS_IN. Essentially the equivalent of BKCAL_OUT for RCAS_IN. Defines action to be taken on remote control device time out.* The block's setpoint value.
BKCAL_OUT
EU of OUT_SCALE
BLOCK_ERR
None
CAS_IN CONTROL_OPTS
EU of PV_SCALE None
FRSIRB_OPTS
None
RCAS_IN RCAS_OUT
EU of SP_SCALE EU of PV_SCALE
SHED_OPT SP
None EU of OUT_SCALE
154
Units EU of OUT_SCALE EU of OUT_SCALE EU of OUT_SCALE per second EU of OUT_SCALE per second EU of OUT_SCALE None
Description The highest setpoint value allowed. The lowest setpoint value allowed. Rate of change limit for decreasing setpoint. When SP change violates the limit the effect is a ramp into the working setpoint (SP_WRK). Rate of change limit for increasing setpoint. When SP change violates the limit the effect is a ramp into the working setpoint (SP_WRK). The working setpoint of the block. It is the result of setpoint limiting and setpoint rate of change limiting. Status options. Allows you to select options for status handling and processing. The supported status options are Target to Manual if Bad IN and Use Uncertain as Good. Discrete input that initiates external tracking. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the external tracking value (TRK_VAL). The input value with status applied to OUT in LO mode.
SP_RATE_UP
SP_WRK STATUS_OPTS
TRK_IN_D TRK_SCALE
None None
TRK_VAL
EU of TRK_SCALE
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
155
Bias/Gain Function Block Diagram Example The master controller OUT parameter determines the setpoints of two slave PID blocks through a splitter and two BIAS/GAIN blocks. The Bias/Gain blocks allow each setpoint to be modified so that parallel field devices (for example, valves, pumps, fans) can be properly synchronized to the demands of a single master. Suppose the two slave PIDs control the speed of two variable-speed fans supplying a furnace. In this situation, the master controller monitors the total air demand and its OUT sets the total demand. The BIAS/GAIN blocks provide the means to apply more or less of the demanded control action through one or the other of the fans (by SP or GAIN adjustment).
156
Calculation/Logic Function Block IN1 through IN[n] are the inputs to the block (as many as 16 inputs). OUT1 through OUT[n] are the block outputs (as many as 16 outputs).
157
Refer to the Expressions topic for syntax guidelines for writing expressions and information on the supported operands, operators, functions, constants, and keywords. The Calculation/Logic function block supports IF-THEN-ELSE-END_IF structures. When the IF {Expression} evaluates to True or non-zero, any commands following IF and prior to ELSE or END_IF (whichever occurs first) are executed. When the IF {Expression} is False and ELSE is included, any commands after ELSE and before END_IF are executed. When the IF {Expression} is False and ELSE is not included, all commands between IF and END_IF are ignored. In this case, program execution continues with the first command following END_IF. You can nest an IF ... END_IF block within another IF ... END_IF block. Comments can be placed on the same line after IF, ELSE, and END_IF. Multiple statements can be placed between the THEN and ELSE keywords, as well as between the ELSE and ENDIF keywords. In the following example, the condition tests whether '/Block1.mode.ACTUAL' is equal to manual. Notice that the '=' operator is not used as an assignment operator; it tests the two operands for equality. If the condition is True, the '/ Block1.mode.TARGET' is set to AUTO; otherwise, OUT1 is set to the value of IN1. IF '/Block1.mode.ACTUAL' = MAN THEN '/Block1.mode.TARGET' := AUTO; ELSE OUT1 := IN1; ENDIF; Note In the Calc/Logic block, the OUT(n) and IN(n) parameters refer to the OUT(n).CV and IN(n).CV fields respectively. It is not always necessary to use the ELSE portion of the statement. For example, if you want to set the MERROR parameter to True when the PV of LIC549 goes above 75, you write the expression as follows: IF '//LIC549/PV.CV' > 75 THEN '//LIC549/MERROR.CV' := TRUE; ENDIF; Note The CV extension in this example stands for current value. Some parameters also support a status value, ST. If the Calculation Logic function block executes a divide by zero expression, the only effect is that status of the output is set to BAD.
158
ALGO_OPTS BAD_ACTIVE
None None
BAD_MASK
None
BLOCK_ERR
None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
159
Application Example: Signal Correction Assume you need to apply the following nonlinear equation to an input value to calculate a corrected signal: y = 3*x^3 + 2*x^2 + x + 1 Where: y = corrected signal x = raw input signal This is an ideal application for the Calculation/Logic block. The following figure is the function block diagram for this application.
Calculation/Logic Function Block Diagram Example for Nonlinear Equation Correction You configure the following expression in the Calculation/Logic block for this application: OUT1 := 3 * expt( IN1, 3.0 ) + 2 * expt ( IN1, 2.0 ) + IN1 + 1.0;
160
Application Example - Signal Ordering Assume you want to arrange four input measurements in ascending order based on value and you want to write the sum of the four measurements to another function block. The following figure is the function block diagram for this application:
Module Block Logic For Signal Sorting You could wire the Analog Input function blocks to the Calculation/Logic block and write the expression to utilize IN1 - IN4. However, this example illustrates the syntax for external references within a module. You configure the expressions as follows: Note The expressions sort four external reference inputs from lowest to highest and writes the sorted values to the four outputs. The fifth output is set equal to the sum of the four external reference inputs. OUT1 := '/FI101.CV'; OUT2 := '/FI102.CV'; OUT3 := '/FI103.CV'; OUT4 := '/FI104.CV'; OUT5 := '/FI101.CV' + '/FI102.CV' + '/FI103.CV' + '/FI104.CV'; swap := FALSE; REM First pass swap check IF (OUT1 > OUT2) THEN temp := OUT1; OUT1 := OUT2; OUT2 := temp;
161
swap := TRUE; END_IF; IF (OUT2 > OUT3) THEN temp := OUT2; OUT2 := OUT3; OUT3 := temp; swap := TRUE; END_IF; IF (OUT3 > OUT4) THEN temp := OUT3; OUT3 := OUT4; OUT4 := temp; swap := TRUE; END_IF; REM Second pass swap check IF swap then swap := FALSE; IF (OUT1 > OUT2) THEN temp := OUT1; OUT1 := OUT2; OUT2 := temp; swap := TRUE; END_IF; IF (OUT2 > OUT3) THEN temp := OUT2; OUT2 := OUT3; OUT3 := temp; swap := TRUE; END_IF; IF (OUT3 > OUT4) THEN temp := OUT3; OUT3 := OUT4; OUT4 := temp; swap := TRUE; END_IF; END_IF; REM Third pass swap check IF swap then swap := FALSE; IF (OUT1 > OUT2) THEN temp := OUT1; OUT1 := OUT2; OUT2 := temp; swap := TRUE; END_IF; IF (OUT2 > OUT3) THEN temp := OUT2; OUT2 := OUT3; OUT3 := temp; swap := TRUE; END_IF; IF (OUT3 > OUT4) THEN
162
temp := OUT3; OUT3 := OUT4; OUT4 := temp; swap := TRUE; END_IF; END_IF; REM Fourth pass swap check IF swap then swap := FALSE; IF (OUT1 > OUT2) THEN temp := OUT1; OUT1 := OUT2; OUT2 := temp; swap := TRUE; END_IF; IF (OUT2 > OUT3) THEN temp := OUT2; OUT2 := OUT3; OUT3 := temp; swap := TRUE; END_IF; IF (OUT3 > OUT4) THEN temp := OUT3; OUT3 := OUT4; OUT4 := temp; swap := TRUE; END_IF; END_IF;
163
Control Selector Function Block BKCAL_IN is the analog input value and status from a downstream block's BKCAL_OUT output that is used for backward output tracking for bumpless transfer. SEL_1 is the first input value to the selector. SEL_2 is the second input value to the selector. SEL_3 is the third input value to the selector. BKCAL_SEL1 is the selector output value associated with SEL_1 for backward output tracking to an upstream PID function block. BKCAL_SEL2 is the selector output value associated with SEL_2 for backward output tracking to an upstream PID function block. BKCAL_SEL3 is the selector output value associated with SEL_3 for backward output tracking to an upstream PID function block. OUT is the output value and status.
164
Note In Auto mode, when any of the connected SEL_ 1, SEL_2 or SEL_3 inputs have Bad status during block execution, the block transitions its actual mode to Man. When the Bad SEL_1, SEL_2 or SEL_3 input transitions back to Good status, the block resumes Auto operation. All the output parameter status values are set to indicate the status of the block and the status of the corresponding parameter. Output Limit Scaling On download, the limits are set to the high and low end of the scale. They might be changed by subsequent overrides, which are part of the download.
165
On run time, the following restrictions apply: OUT_HI_LIM is restricted to OUT_SCALE_HI+.1*(OUT_SCALE_HI-OUT_SCALE_LO). OUT_LO_LIM is restricted to OUT_SCALE_LO-.1*(OUT_SCALE_HI-OUT_SCALE_LO).
If the new scale causes a limit to be outside of these rules, the DeltaV system forces the limit within the rules. The OUT parameters are not changed as a result of changing the scale or limits. However, the algorithm might change OUT on the next pass. Output Selection and Limiting You can limit the output by configuring the OUT_HI_LIM and OUT_LO_LIM parameters.
166
When the SEL_TYPE is Low value, the limit status of the non-selected BKCAL_SEL(x) parameters are set to High Limited. When the SEL_TYPE is High value, the limit status of the non-selected BKCAL_SEL(x) parameters are set to Low Limited. When the SEL_TYPE is Middle value, the limit status of the BKCAL_SEL(x) that corresponds to the lowest SEL(x) input is set to Low Limited. The limit status of the BKCAL_SEL(x) that corresponds to the highest SEL(x) input is set to High Limited. Initialization Manual Mode When the BKCAL_IN status indicates Initiate Request (IR), the status of OUT is set to Good: Cascade, Initiate Acknowledge (IA). Otherwise, the status of OUT is set to Good: Cascade. The value of OUT is set equal to the value of BKCAL_IN. The value and status of BKCAL_SEL1, BKCAL_SEL2 and BKCAL_SEL3 are set to the value and status of BKCAL_IN. Out of Service Mode The statuses of all output parameters are set to Bad: Out of Service.
BAD_ACTIVE
None
BAD_MASK
None
BKCAL_IN
Supplied by source
BKCAL_SEL1
EU of OUT_SCALE
167
Description The selector output value associated with SEL_2 for backward output tracking. The selector output value associated with SEL_3 for backward output tracking. The summary of active error conditions associated with the block. The mode record of the block. Contains the actual, target, permitted, and normal modes. The analog output value and status. The maximum output value allowed. The minimum output value allowed The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The first input value to the selector. The second input value to the selector. The third input value to the selector. The selector type: High, Low, or Middle value.
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
168
Control Selector Function Block Diagram Example Use the Control Selector function block in a situation where flow is the primary control variable but pressure must be controlled in the event that it rises to a dangerous level. The following figure illustrates this example:
169
In this example, both the flow and pressure PID blocks control a supply valve. The flow PID operates in a pressure regime below a safety limit. Since this is a low pressure for the pressure PID, it sends a high output signal to the supply valve, telling it to open more to increase the pressure. At normal operating pressures, the pressure PID's high SP requests a maximum valve opening to increase pressure. The flow PID's signal is lower than that of the pressure PID. In this case, SEL_TYPE is set to Low so that the Control Selector function block sends the flow PID's signal on to the supply valve and blocks the pressure PID's signal. If the flow stream's pressure rises to a dangerous level, the pressure PID sends a low signal to the supply valve, telling it to close. When this output signal falls below that from the flow PID, the Control Selector function block begins to pass the pressure PID's signal and block the flow PID's signal.
170
Deadtime Function Block IN is the analog input value and status. FOLLOW allows OUT to track IN. DEAD_TIME is the delay time introduced in the input value, in seconds. OUT is the analog output value and status.
171
Deadtime Function Block Timing Diagram You select the way the input signal is processed with parameter configuration and input wiring. Delay Value and Status The time delay to be introduced to the IN input is normally determined by the DEAD_TIME parameter. You enter the value of DEAD_TIME (in seconds), or another function block connected to IN can perform a calculation and enter the value automatically. When the FOLLOW input parameter is active (True), no delay is introduced and the delayed input values stored by the block are initialized to the IN value and status. Balance Output In Man mode, the OUT value of the block can be entered manually. Thus, the delayed input value might not match the current block output. To avoid bumping the output on a mode change from Man to Auto, a bias value is added to the delayed signal so the resulting value matches the OUT value. In Auto mode, the delayed input plus the bias is the value of the OUT parameter. The bias value added during the transition from Man to Auto mode is ramped from the OUT value calculation over the time defined by BAL_TIME. Block Errors The following condition is reported in the BLOCK_ERR parameter: Out of Service The block is in Out of Service (OOS) mode.
172
BAD_ACTIVE
None
BAD_MASK
None
BAL_TIME
Seconds
173
Parameter BLOCK_ERR
Units None
Description The summary of active error conditions associated with the block. The block errors for the Deadtime function block are Block configuration error and Out of Service. Time delay introduced in the input signal to generate the output value. Allows OUT to track IN (True [1] = active, False [0] = inactive). The input value and status to be delayed by the block. Parameter used to request and show the source of the output used by the block. The primary value and status calculated by the block in Auto mode. OUT can be set manually in Man mode.
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Deadtime Function Block Application Example for a Heater Process The following diagram shows the difference in deadtime between the manipulated input and the measured load disturbance for this process:
174
Deadtime Function Block Timing Diagram Example for a Heater Process In this example, the Deadtime function block can be used to compensate for the differences in deadtime. When the flow rate to the heater is constant, the DEAD_TIME parameter should be set to a value of:
The following figure is an example function block diagram for this application:
175
Filter Function Block IN is the analog input value and status. FOLLOW selects whether to filter the input or track the input. OUT is the analog output value and status.
176
If TIMECONST = 0:
where: x = the value of OUT at the cycle when IN last changed t = the elapsed time since the cycle when IN last changed, in seconds When the FOLLOW parameter is set True (1), the filter algorithm is disabled and the block output (OUT) equals the input signal (IN).
IN OUT TIMECONST
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
177
Filter Function Block Filtering Effect Example You can use the Filter function block to filter a noisy analog input and keep the process stable. The amount of time for the output to equal the input is specified according to process considerations. The TIMECONST parameter is used to vary the amount of time it takes for the output to equal the input. When the time required for the new input value to equal the output is 10 seconds:
A time constant of 2 means that after 2 seconds, the output represents 63% of the new input value.
178
Input Selector Function Block Note The Input Selector function block is not designed for use in forward control paths. DISABLE_1 when True, is used to disable IN_1. Disabled inputs are not used in by any of the select algorithms. DISABLE_2 when True, is used to disable IN_2. Disabled inputs are not used in by any of the select algorithms. DISABLE_3 when True, is used to disable IN_3. Disabled inputs are not used in by any of the select algorithms. DISABLE_4 when True, is used to disable IN_4. Disabled inputs are not used in by any of the select algorithms. IN_1 is the first input value. IN_2 is the second input value. IN_3 is the third input value. IN_4 is the fourth input value. OP_SELECT if non-zero, selects the corresponding input (that is, 2 selects IN_2). If zero, the algorithm selected by SELECT_TYPE selects input. OUT is the output value and status. SELECTED indicates the selected input or the number of usable inputs.
179
180
Substatus For SELECT_TYPE = MAX, MIN, FIRST_GOOD, and MID with an odd number of inputs, propagate substatus as is. For AVG or MID with even numbers of inputs, propagate NonSpecific.
Limit status If SELECT_TYPE = MID with an even number of inputs, set OUT limit status to NotLimited.
ALERT_KEY BAD_ACTIVE
None None
BAD_MASK
None
181
Parameter BLOCK_ERR
Units None
Description The summary of active error conditions associated with the block. The possible block errors are Block configuration error, Simulate active, Local override, Input failure/process variable has Bad status, Output failure, Readback failed, Out of Service, and Other. Each function block reports none or a subset of these error conditions. This parameter, when true, disables IN_1. A disabled input is not used by SELECT_TYPE configured algorithms. This parameter, when true, disables IN_2. A disabled input is not used by SELECT_TYPE configured algorithms. This parameter, when true, disables IN_3. A disabled input is not used by SELECT_TYPE configured algorithms. This parameter, when true, disables IN_4. A disabled input is not used by SELECT_TYPE configured algorithms. The first analog input value and status.
None None None None Determined by supplying block or source. Determined by supplying block or source. Determined by supplying block or source. Determined by supplying block or source. None None
IN_2
IN_3
IN_4
MIN_GOOD MODE
Minimum number of usable inputs for the result to be not bad. The mode record of the block. MODE contains the actual, target, permitted, and normal modes. In some function blocks, this parameter is used to request and show the source of the setpoint, the source of the output, and/or the block operating state. If non-zero, selects the corresponding input (that is, 2 selects IN_2). If zero, the algorithm selected by SELECT_TYPE selects input. The analog output value and status. The number of outputs is an extensible parameter in some blocks.
OP_SELECT OUT
182
Description If OP_SELECT is zero, determines the selection type. The following are valid selection types: Maximum Hot Backup Output indicating the selected input or the number of usable inputs. Status options. Allows you to select options for status handling and processing. The status options are Target to Manual if Bad IN and BAD if Limited. Each function block uses one or none of the status options. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed. The strategy field can be used to help group blocks. This data is not checked or processed by the block.
ST_REV
None
STRATEGY
None
183
The first Input Selector function block continuously monitors average temperature and validates data only if three or more field inputs are present. The second and third Input Selector function blocks monitor the maximum and minimum temperatures in the zone and which indicators are responsible for reporting those temperatures.
Input Selectors Used in Temperature Monitoring This example provides a simple way of handling input data from a continuous process furnace for subsequent reporting and burner/blower management.
184
Input Selector Extended Function Block Note The Input Selector Extended function block is not designed for use in forward control paths. DISABLE_1 through DISABLE_8, when True, disable the corresponding IN_n input. For example, DISABLE_1 disables IN_1, DISABLE_2 disables IN_2, and so on. The SELECT_TYPE algorithms do not use disabled inputs. IN_1 through IN_8 are the input values. OP_SELECT, if non-zero, selects the corresponding input (for example, 2 selects IN_2). If zero, the algorithm selected by the SELECT_TYPE parameter selects input. OUT is the analog output value and status. SELECTED indicates the selected input or the number of usable inputs. OUT_D is the discrete output value and status that signals a selected alarm condition.
185
186
Block Errors The following 16 conditions can be reported in the BLOCK_ERR parameter: Other Block Configuration Error: the selected channel carries a measurement that is incompatible with the engineering units selected in XD_SCALE, the L_TYPE parameter is not configured, or CHANNEL = zero. Link Configuration Error Simulate Active: Simulation is enabled and the block is using a simulated value in its execution. Local Override Device Fault State Set Device Needs Maintenance Soon Input Failure/Process Variable has Bad Status: The hardware is bad, or a bad status is being simulated. Output Failure: The output is bad based primarily upon a bad input. Memory Failure Lost Static Data Lost NV Data Readback Failed Device Needs Maintenance Now Power Up Out of Service: The actual mode is Out of Service.
You can configure the ALM_SEL parameter to select the above alarm conditions which, when detected, set the OUT_D parameter, which can be linked to other function blocks for use in alarm detection.
187
Substatus For SELECT_TYPE = MAX, MIN, FIRST_GOOD, and MID with an odd number of inputs, simply propagate substatus as is. For AVG or MID with even numbers of inputs, propagate NonSpecific.
Limit status If SELECT_TYPE = MID with an even number of inputs, set OUT limit status to NotLimited.
ACK_OPTION
None
188
Parameter ALERT_KEY
Units None
Description The identification number of the plant unit. This information can be used in the host for sorting alarms, and so on. Used to select the process alarm conditions that cause the OUT_D parameter to be True (Active). The minimum number of parameters the averaging calculation uses. An equal number of high and low values are dropped, leaving a number of values equal to or one greater than the value specified in AVG_USE. Example 1: AVG_USE is 4 and the number of connected inputs is 6. The highest and lowest values are dropped before calculating the average. Example 2: AVG_USE is 2 and the number of connected inputs is 7. The two highest and two lowest values are dropped and the average is calculated from the middle three inputs. The indication that a block error condition selected in BAD_MASK (at the function block level) is True (Active) or the indication that an error condition (at the module level) selected in MERROR_MASK is True (Active) or a module status selected in MSTATUS_MASK is True (Active). The set of active error conditions that triggers a userdefined BAD condition. The user selects a subset of block error (BLOCK_ERR) conditions in the BAD_MASK parameter. When any of these conditions are True, the BAD_ACTIVE parameter becomes True. When any of the BLOCK_ERR conditions that are not included in BAD_MASK are True, ABNORM_ACTIVE becomes True. The summary of active error conditions associated with the block. This parameter, when true, disables the corresponding input IN_n. A disabled input is not used by SELECT_TYPE configured algorithms. The result of alarm detection associated with HI_LIM. If HI_ACT equals True, HI_LIM has been exceeded. The result of alarm detection associated with HI_HI_LIM. If HI_HI_ACT equals True, HI_HI_LIM has been exceeded. The setting for the alarm limit used to detect the high high alarm condition.
ALM_SEL AVG_USE
None None
BAD_ACTIVE
None
BAD_MASK
None
None None
None None
HI_HI_LIM
EU of OUT_RANGE
189
Parameter HI_HI_PRI
Units None
Description The priority of the alarm detection associated with HI_HI_LIM and activated by HI_HI_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority). The setting for the alarm limit used to detect the high alarm condition. The priority of the alarm detection associated with HI_LIM and activated by HI_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority). The analog input value and status corresponding to input number n. The result of alarm detection associated with LO_LIM. If LO_ACT equals True, LO_LIM has been exceeded. The setting for the alarm limit used to detect the low alarm condition. The result of alarm detection associated with LO_LO_LIM. If LO_LO_ACT equals True, LO_LO_LIM has been exceeded. The setting for the alarm limit used to detect the low low alarm condition. The priority of the alarm detection associated with LO_LO_LIM and activated by LO_LO_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority). The priority of the alarm detection associated with LO_LIM and activated by LO_ACT. The value must be between 3 and 15 with 3 being a logged event. The values of 4 through 15 are priorities in ascending order of importance (that is, the higher the number, the greater the priority). Minimum number of usable inputs for the result to be not bad.
HI_LIM HI_PRI
EU of OUT_RANGE None
LO_LO_LIM LO_LO_PRI
EU of OUT_RANGE None
LO_PRI
None
MIN_GOOD
None
190
Parameter MODE
Units None
Description The mode record of the block. MODE contains the actual, target, permitted, and normal modes. In some function blocks, this parameter is used to request and show the source of the setpoint, the source of the output, and/or the block operating state. If non-zero, selects the corresponding input (that is, 2 selects IN_2). If zero, the algorithm selected by SELECT_TYPE selects input. The analog output value and status. The discrete output value and status. The display scaling for the output (OUT). It has no effect on the block. You can set the high and low values, the engineering units, and the number of digits to the right of the decimal point. If OP_SELECT is zero, determines the selection type. The following are valid selection types: First Good Minimum Maximum Middle Average Hot Backup Output indicating the selected input or the number of usable inputs. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed. Status options. Allows you to select options for status handling and processing. The status options available for the ISELX block are: Uncertain if Man mode Use Uncertain as Good
OP_SELECT
None
SELECT_TYPE
None
SELECTED ST_REV
None None
STATUS_OPTS
None
STRATEGY
None
The strategy field can be used to help group blocks. This data is not checked or processed by the block.
191
192
Lead/Lag Function Block FOLLOW is the value that allows OUT to track IN * GAIN. IN is the input value and status. LAG_TIME specifies the lag time constant. LEAD_TIME specifies the lead time constant. OUT is the output value and status.
193
194
You select the way the input signal is processed with parameter configuration and input wiring. Dynamic Compensation The dynamic compensation that is applied to the IN input is normally determined by the LAG_TIME and LEAD_TIME parameters. You can enter the value of these parameters manually, or another block can provide the value. The compensated input multiplied by the GAIN parameter is the block process variable (PV). In Auto mode, the PV is normally reflected in the OUT parameter. However, when the PV value exceeds the output limits defined by OUT_HI_LIM and OUT_LOW_LIM, the limit value is used. When the FOLLOW parameter is active (True), no dynamic compensation is applied and the result of IN multiplied by GAIN is reflected in the OUT parameter. Balance Output In Man mode, the OUT value can be entered manually. Thus, the dynamically compensated input value shown in PV might not match the current block output. To avoid bumping the output on a mode change from Man or OOS to Auto, a bias value is added to the compensated signal so the resulting value matches OUT. In Auto mode, the compensated input plus the bias value is the OUT value. The bias value added during the transition from Man or OOS to Auto mode is ramped down to zero over the time defined by the BAL_TIME parameter.
195
BAD_ACTIVE
None
BAD_MASK
None
BAL_TIME BLOCK_ERR
Seconds None
196
Units None EU of IN
Description Parameter used to request and show the source of the output used by the block. The primary value and status calculated by the block in Auto mode. OUT can be set manually in Man mode. The maximum output value allowed. The minimum output value allowed. The process variable used in block execution and alarm limit detection.
OUT_HI_LIM OUT_LO_LIM PV
EU of IN EU of IN EU of IN
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
197
The following diagram shows the difference in lag time between the manipulated input and the measured load disturbance for this process:
Lead/Lag Function Block Timing Diagram Example for a Mixing Process In this example, the Lead/Lag function block can be used to compensate the feedforward control action for the controlled parameter's differences in gain and dynamic response to changes in the load disturbance and the manipulated input. To do this, you include a Lead/Lag function block in the feedforward path. You set the LEAD_TIME parameter to Tm and the LAG_TIME parameter to Td. If
where: KL = process gain for load disturbance input CL = steady state change in the controlled parameter for a step change in the load disturbance input (% of range) L = step change in the load disturbance input (% of range) and
where: KM = process gain for manipulated input CM = steady state change in the controlled parameter for a step change in the manipulated input (% of range) M = step change in the manipulated input (% of range), you set the GAIN parameter to:
198
When the process response also includes significant delay, you can use a Deadtime function block to compensate for the delay. The following figure is an example of the function block diagram for this application:
199
Limit Function Block IN is the analog input value and status. OUT is the analog output value and status. LIM_INDICATOR is set True (1) when the input is limited to the maximum value. It remains True until the input is limited to the minimum value, at which time it is set False (0). OUT_LO_ACT is a Boolean value set True when the input is limited to the minimum value. OUT_HI_ACT is a Boolean value set True when the input is limited to the maximum value.
200
OUT OUT_HI_ACT
Determined by IN None
201
Description The maximum output value allowed. Boolean value set True when the input is limited to the minimum value. The minimum output value allowed.
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
202
Manual Loader Function Block BKCAL_IN is the value from another block's BKCAL_OUT used for backward output tracking for bumpless transfer. IN is the analog input value and status. TRK_IN_D is the discrete input that initiates the external tracking function. TRK_VAL is the value applied to OUT in Local Override (LO) mode. OUT is the analog output value and status.
203
Manual Loader Function Block Timing Diagram The Manual Loader function block allows an operator to control devices directly by setting the block output. You select the way the output is generated with parameter configuration and input wiring.
204
Input Filtering You can filter the input value (IN) before it is stored in the PV parameter. You specify the filtering applied to the IN parameter with the filter time constant (PV_FTIME). The PV value is used in block alarm detection. Track Input Conversion The track input parameter (TRK_VAL) is converted to the range of the block output based on the track range parameter (TRK_SCALE) and the output range parameter (OUT_SCALE). In Local Override (LO) mode, the scaled value is used to set OUT. Output Limit Scaling On download, the limits are set to the high and low end of the scale. They might be changed by subsequent overrides, which are part of the download. On run time, the following restrictions apply: OUT_HI_LIM is restricted to OUT_SCALE_HI+.1*(OUT_SCALE_HI-OUT_SCALE_LO). OUT_LO_LIM is restricted to OUT_SCALE_LO-.1*(OUT_SCALE_HI-OUT_SCALE_LO).
If the new scale causes a limit to be outside of these rules, the DeltaV system forces the limit within the rules. The OUT parameters are not changed as a result of changing the scale or limits. However, the algorithm might change OUT on the next pass. Output Selection and Limiting In Manual (Man) mode, the value of OUT is determined by the operator. In LO mode, the converted track input is used as the output value. In Initialization Manual (IMan) mode, the path to the output is not complete and OUT is set to BKCAL_IN. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Local override The block is in Local Override (LO) mode. Out of Service The block is in Out of Service (OOS) mode. For complete descriptions of the supported control options, refer to the Control Options topic.
Manual (Man) The target mode can be restricted to one or more of the modes that are set by an operator (Man mode and OOS mode). During operation, you can only set the Man and OOS modes directly. For complete descriptions of the supported modes, refer to the Function Block Modes topic.
205
Note You can set control options in Manual or Out of Service mode only. Refer to the Control Options topic for more information on control options.
206
ALARM_HYS
Percent of PV_SCALE
BAD_ACTIVE
None
BAD_MASK
None
BKCAL_IN
EU of OUT_SCALE
BLOCK_ERR
None
CONTROL_OPTS
None
HI_ACT HI_HI_ACT
None None
207
Description The setting for the alarm limit used to detect the high high alarm condition. The setting for the alarm limit used to detect the high alarm condition. The input value that is filtered to obtain PV. The result of alarm detection associated with LO_LIM. If LO_ACT equals True, LO_LIM has been exceeded. The setting for the alarm limit used to detect the low alarm condition. The result of alarm detection associated with LO_LO_LIM. If LO_LO_ACT equals True, LO_LO_LIM has been exceeded. The setting for the alarm limit used to detect the low low alarm condition. Parameter used to request and show the source of the output used by the block. The primary value and status of the block. OUT can be set by an operator in Man mode. The maximum output value allowed. The minimum output value allowed. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The process variable used in block execution and alarm limit detection. The time constant of the first-order PV filter. It is the time required for a 63% change in the IN value. The high and low scale values, the engineering units code, and the number of digits to the right of the decimal point associated with PV. Discrete input that initiates output tracking (True [1] = active, False [0] = inactive). TRK_IN_D is acted on only when the Track Enable and/or Track in Manual control options are selected. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the external tracking value (TRK_VAL). The analog input used in the external tracking function.
PV PV_FTIME PV_SCALE
TRK_IN_D
None
TRK_SCALE
None
TRK_VAL
EU of OUT_SCALE
208
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
209
PID Function Block BKCAL_IN is the analog input value and status from a downstream block's BKCAL_OUT output that is used by a block for bumpless transfer. This connection is necessary if the PID is a master to another controller in a cascade. Without the connection the slave controller will not make the transition to CAS and the master PID will never be active. CAS_IN is the remote SP value from another block. FF_VAL is the feedforward control input value and status. IN is the connection for the process variable (PV) from another function block. SIMULATE_IN is the input value and status used by the block instead of the analog measurement when simulation is enabled. TRK_IN_D initiates the external tracking function. TRK_VAL is the value after scaling applied to OUT.
210
BKCAL_OUT is the value and status sent to an upstream block to prevent reset windup and provide bumpless transfer to closed loop control. OUT is the block output value and status.
211
For L = OUT (which is the same as OUT being unconstrained) and P = D = E the equations reduce to: A conventional Standard PID with feedforward,
and Series PID with derivative filter applied only to derivative action, with feedforward
Where:E(s) is error (SP-PV) is + for reverse acting and for direct acting (Direct_Acting in CONTROL_OPTS) KNL is nonlinear gain applied to P + I terms but not to D term. Nonlinear action is activated in FRSIPID_OPTS by selecting Use_Nonlinear_Gain_Modification. P(s) is the variable to which proportional action is applied. P(s) is determined by parameters STRUCTURE and BETA (which sets the weighting factor for proportional action applied to SP change). D(s) is the variable to which derivative action is applied. D(s) is determined by parameters STRUCTURE and GAMMA (which sets the weighting factor derivative action on SP change). L(s) is the external reset input which is either from BKCAL_IN or OUT. is reset time (parameter RESET) in seconds. is derivative time (parameter RATE) in seconds GAINa is normalized gain after scaling the parameter GAIN from PV to OUT (Delta V works in engineering units so it is necessary that the parameter GAIN be scaled to maintain the meaning of the normalized entry). F(s) is the feedforward contribution.
212
The following diagram illustrates how the nonlinear tuning parameters are used in the calculation of KNL.
KNL Calculation where: NL_MINMOD is the gain applied when the absolute value of error is less than NL_GAP. To get deadband behavior, set NL_MINMOD to 0. NL_GAP is the control gap. When the absolute value of error is less than NL_GAP, KNL = NL_MINMOD. NL_TBAND is the transition band over which KNL is linearly adjusted as a function of error. NL_HYST is a hysteresis value. Until absolute value of error exceeds NL_GAP + NL_HYST, KNL = NL_MINMOD. Once absolute value of error has exceeded NL_GAP + NL_HYST, absolute value of error must return to a value less than NL_GAP before KNL returns to a value of NL_MINMOD. If NL_GAP is 0, then the value of NL_HYST has no meaning (effectively assumed to be 0). You can select the specifics of block execution by configuring I/O selection, signal conversion and filtering, feedforward calculations, tracking variables, setpoint and output limiting, PID equation structures, and block output action. The mode of the block determines setpoint and output selection. I/O Selection When you configure the PID function block, you select whether the source of the input value is a wired function block connection or a process input channel. Input from Another Block When you want the source to be an input from another function block, the input source (usually another block's output value) is connected to the IN connector on the PID function block. With a fieldbus extension, the connection to IN must be from another function block. Input from a Process Input Channel When you want the source to be an input from a process input channel, you configure the Device Signal Tag (DST) of the desired channel in the IO_IN parameter. There is no IO_IN parameter in the fieldbus extension. Note When IO_IN is configured and IN is connected, the I/O input channel referenced by IO_IN takes precedence and IN is ignored.
213
You can configure anti-aliasing filtering, NAMUR limit detection, and overrange/underrange detection for the channel parameters. For information on these capabilities, refer to the I/O Configuration topics. Simulation To support testing, you can enable simulation. This allows the measurement value and status to be supplied manually or from another block. During configuration, decide whether you want the simulated value/status to be entered manually into the function block or whether it will be supplied by another block. When the value is entered manually: The operator first enables simulation by selecting the SIMULATE parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field. When SIMULATE_IN is not connected (status = Bad: NotConnected), the operator enters the value to be used in the SIMULATE parameter Simulate Value field. In online operation, the operator can enter a simulated status value in the Simulate Status field.
Note Make sure SIMULATE_IN is not connected if you want to enter the value or status manually. When SIMULATE_IN is connected, the value entered in the SIMULATE_IN Simulate Value field is used as the simulated value. When the value/status from another block is used: During configuration, connect SIMULATE_IN to the desired block output or parameter. Do not enter a value in the Simulate Value field of the SIMULATE_IN input; the block uses the connected value automatically. During operation, the operator enables simulation by selecting the SIMULATE parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field.
Note Do not enter a value for the SIMULATE_IN parameter. If you enter a value and the status of SIMULATE_IN is not Bad: NotConnected, the value entered for SIMULATE_IN overrides any value you enter in SIMULATE. There is no SIMULATE_IN in fieldbus. Signal Conversion Choose direct, indirect, or indirect square root signal conversion with the linearization type (L_TYPE) parameter: Direct signal conditioning simply passes through the value accessed from the I/O channel (or the simulated value when simulation is enabled). Indirect signal conditioning converts the accessed channel input value (or the simulated value when simulation is enabled) to the range and units of the PV parameter (PV_SCALE). Indirect square root signal conditioning converts the accessed channel input value (or the simulated value when simulation is enabled) by taking the square root of the value and scaling it to the range and units of the PV parameter (PV_SCALE). You can view the accessed value (in percent) through the FIELD_VAL parameter. When the converted input value is below the limit specified by the LOW_CUT parameter and the Low Cutoff I/O option (IO_OPTS) is enabled (True), a value of 0.0 is used for the converted value (PV). This option can be useful with zero-based measurement devices such a flowmeters. You can choose to reverse the range for conversion to account for fail-open actuators by selecting the following I/O option:
214
Increase to Close This option has an impact when a device signal tag is configured in IO_OUT. Increase to Close causes the milliamp signal on the analog output channel to be inverted in Man mode (and in Auto mode). That is, a full scale value on OUT will result in 4 mA on the channel. When IO_OUT is configured, the OUT value is the implied valve position and is not inverted when Increase to Close is True. Note You can set I/O options in Manual or Out of Service mode only. For complete descriptions of the supported I/O options, refer to the I/O Options topic. Feedforward Calculation You can activate the feedforward function with the FF_ENABLE parameter. When FF_ENABLE is True, the feedforward value (FF_VAL) is scaled (FF_SCALE) to a common range for compatibility with the output scale (OUT_SCALE). A gain value (FF_GAIN) is applied to achieve the total feedforward contribution. Tracking You can specify output tracking with control options and parameters. You can set control options in Out of Service mode only. The Track Enable control option (CONTROL_OPTS) must be True for the track function to operate. When the Track in Manual control option is True, tracking can be activated and maintained when the block is in Man mode. When Track in Manual is False, tracking is disabled in Manual mode. Activating the track function causes the block's actual mode to go to Local Override (LO). The tracking value parameter (TRK_VAL) specifies the value to be converted and tracked into the output when the track function is operating. The track scale parameter (TRK_SCALE) specifies the range of TRK_VAL. When the track control parameter (TRK_IN_D) is True and the Track Enable control option is True, the TRK_VAL input is converted to the appropriate value and output in units of OUT_SCALE. Setpoint and Output Limit Constraints As part of download the output high and low limits are set to the configured values. If these limits have not been configured OUT_HI_LIM will be set to OUT_SCALE_HI and OUT_LO_LIM will be set to OUT_SCALE_LO. The following constraints apply to download or direct entry: SP_HI_LIM is restricted to PV_SCALE_HI+.1*(PV_SCALE_HI-PV_SCALE_LO). SP_LO_LIM is restricted to PV_SCALE_LO-.1*(PV_SCALE_HI-PV_SCALE_LO). OUT_HI_LIM is restricted to OUT_SCALE_HI+.1*(OUT_SCALE_HI-OUT_SCALE_LO). OUT_LO_LIM is restricted to OUT_SCALE_LO-.1*(OUT_SCALE_HI-OUT_SCALE_LO).
If the new scale causes a limit to be outside of these rules, the DeltaV system forces the limit within the rules. The SP or OUT parameters are not changed as a result of changing the scale or limits. However, if OUT violates the new limits OUT will be forced within the limits on the next pass.
215
Setpoint Selection and Limiting Setpoint selection is determined by the mode. The following diagram shows the method for setpoint selection:
PID Function Block Setpoint Selection You can limit the setpoint by configuring the SP_HI_LIM and SP_LO_LIM parameters. In Cas mode, the setpoint comes from the CAS_IN input. In Auto mode, the setpoint is adjusted by the operator. You can limit the setpoint rate of change by configuring the SP_RATE_UP and SP_RATE_DN parameters. Output Selection and Limiting Output selection is determined by mode. In Auto, Cas, and RCas modes, the output is computed by the PID control equation. In Man and ROut modes, the output can be entered manually. Note If the IO_OUT parameter is defined for direct output, use any connection to OUT for calculation purposes only (for example, an input to a calculation block). You can limit the output by configuring the OUT_HI_LIM and OUT_LO_LIM parameters. Bumpless Transfer and Setpoint Tracking You can select setpoint tracking by configuring the following control options (CONTROL_OPTS): SP-PV Track in LO or IMan SP-PV Track in Man SP-PV Track in ROut When one of these options is set, the SP value is set to the PV value while in the specified mode. You can select the value that an upstream controller uses for bumpless transfer and reset limiting by configuring the following control option: Use PV for BKCAL_OUT When this option is not selected, the working setpoint (SP_WRK) is used for BKCAL_OUT. With the Use PV for BKCAL_OUT control option, the BKCAL_OUT value tracks the PV value. A master controller whose BKCAL_IN parameter receives the slave PID block's BKCAL_OUT in an open cascade strategy forces its OUT to match BKCAL_IN, thus tracking the PV from the slave PID block. If the master is another PID, then if the master PID has selected Dynamic_Reset_Limiting in FRSIPID_OPTS the external reset portion of the master PID now uses the PV of the secondary as its input. This provides an automatic adjustment of reset action in the master based on the performance of the slave. You can set control options in Out of Service mode only.
216
PID Equation Structures Parameter STRUCTURE in the PID is used to select which of the three PID actions (Proportional, Integral and Derivative) are active and how the actions are applied. You can select the PID equation structure to apply controller action by configuring the STRUCTURE parameter. Select one of the following choices: PID Action on Error Proportional, integral and derivative action are applied to the error (SP - PV). If RATE is non-zero, a setpoint change will exhibit both a proportional and derivative kick. This structure is typically used to get fastest possible setpoint response when derivative action is used (RATE>0) and RATE is not so large as to make the resultant kick too great. A small SPFILTER value or SP RATE limiting can be used to reduce the worst case kick. PI Action on Error, D Action on PV Proportional and integral action are applied to error; derivative action is applied to PV. A setpoint change will exhibit a proportional kick. I Action on Error, PD Action on PV Integral action is applied to error; proportional and derivative action are applied to PV. There is no proportional or derivative kick on a setpoint change. PD Action Error Proportional and derivative actions are applied to error; there is no integral action. This structure will result in a steady state offset of PV from SP; the size of the offset will be determined by GAIN of the PID and the process gain. Offset is typically adjusted with BIAS of the PID. A setpoint change will exhibit a proportional and derivative (if RATE>0) kick. P Action on Error, D Action on PV Proportional action is applied to error; derivative action is applied to PV; there is no integral action. This structure will result in a steady state offset of PV from SP; the size of the offset will be determined by GAIN of the PID and the process gain. Offset is typically adjusted with BIAS of the PID. A setpoint change will exhibit a proportional kick. ID Action on Error Integral and derivative action are applied to error; there is no proportional action. This structure is typically selected for use in integral-only applications (RATE=0). It is also used in cases where the process exhibits the tendency to first move in the opposite direction from its final steady state value. There is a derivative kick on an SP change. I Action on Error, D Action on PV Integral action applied to error; derivative action applied to PV; there is no proportional action. This structure is typically selected for use in integral-only applications (RATE=0). It is also used in cases where the process exhibits the tendency to first move in the opposite direction from its final steady state value. There is no derivative kick on an SP change. Two Degrees of Freedom Controller Two parameters (BETA and GAMMA) can be adjusted to determine the degree of proportional (BETA) action and derivative (GAMMA) that will be applied to SP changes. The range for BETA and GAMMA is 0-1. BETA=0 means no proportional action is applied to SP change. BETA=1 means full proportional action is applied to SP change. GAMMA=0 means no derivative action applied to SP change. GAMMA=1 means full derivative action is applied to SP change. For values greater than 0 and less than 1, the number represents the decimal fraction of the action applied to SP change. This structure then can be used to get any of the structures that include all three (actions) with adjustable action on SP changes for proportional and derivative action. Often, when tuning a control loop for disturbance rejection, the setpoint response exhibits considerable overshoot. This is particularly true when there is derivative action required and the derivative action is taken only on PV (to avoid large bumps in output as the result of modest setpoint changes). The Two Degrees of Freedom structure provided by the DeltaV system allows shaping of the setpoint response by adjusting the proportional and derivative action applied to setpoint. The adjustment parameters are BETA (for proportional) and GAMMA (for derivative). Tuning range is from no action to full action (0 to 1). Two Degrees of Freedom is selected with the STRUCTURE parameter. The following figure illustrates the setpoint response for a loop tuned for good disturbance rejection with little or no overshoot in the disturbance response.
217
Adjustment of BETA and GAMMA can significantly reshape the setpoint response and drastically reduce the overshoot from that of a PID that has full proportional and no derivative action on setpoint.
SP Response for Different Structures When Use Nonlinear Gain Modification is selected in FRSIPID_OPTS, proportional action (if called for by STRUCTURE) is applied to error and standard form equation is applied. Reverse and Direct Action You can select the block output action by configuring the Direct Acting control option. Note You can set control options in Out of Service mode only. Reset Limiting The PID function block provides a selection between clamped integral action or dynamic reset limiting (external reset) that prevents windup when output or input constraints are encountered. By selecting Dynamic_Reset_Limiting in FRSIPID_OPTS a master PID in a cascade uses the BKCAL_OUT of the slave block. If the slave block passes back PV then the reset action dynamically tracks the PV of the slave. The Dynamic_Reset_Limiting option is what you will want to use in most control selector applications. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Out of Service The block is in Out of Service (OOS) mode.
218
Readback failed The I/O readback failed. Output failure Either the output hardware or the DST is bad. Local Override The block is in Local Override (LO) mode. Simulate active Simulation is enabled, and the block is using a simulated value in its execution. Input failure/process variable has Bad status The source of the block's process variable is bad. Indicates a bad status on a linked IN parameter, a hardware failure (if the block directly references DSTs) a non-existent Device Signal Tag (DST), or a Bad status on the SIMULATE parameter.
You can configure the following alarm limits to compare to the difference between the SP and PV values (process error) for deviation alarm detection: Deviation high (DV_HI_LIM) Deviation low (DV_LO_LIM)
Note Deviation alarms are suppressed on SP changes. When the PV comes within the deviation limits, the deviation alarm is enabled again.
219
Note that the options available in a fieldbus block are different: Target to Manual if Bad IN Use Uncertain as Good IFS if Bad CAS_IN IFS if BAD IN
Note You can set the status options in Out of Service mode only.Note You can set the status options in Out of Service mode only. If the input status is limited, the PV status is set to Bad or Uncertain when you select the Bad if Limited or Uncertain if Limited options respectively. Similarly, if the status of the input is Uncertain, then the PV status is set to Good or Bad based on your selection of enabled or disabled for the Use Uncertain as Good option. Note When the option Uncertain if Limited is selected, then as long as the input status is limited, the PV status will be set to Uncertain (even when the input status is Bad). Selecting this option and the Use Uncertain as Good disables the mode from changing to Man under these condition when the target mode is Auto. If you select the Target to Manual if Bad IN status option and the PV status evaluates to Bad during operation, the target mode and the actual mode are set to Man. If the status of the PV changes back to Good, the target mode (and actual mode) remain in Man.
220
ALERT_KEY
None
ALPHA
None
ARW_HI_LIM
OUT
ARW_LO_LIM
OUT
BAD_ACTIVE BAD_MASK
None None
BAL_TIME
Seconds
221
Parameter BETA
Units None
Description Fraction of proportional action applied to SP change. For a value of 0.6, 60% of the proportional action applied to SP change. The value of BETA can be changed over a range of 0-1 if STRUCTURE is set to Two Degrees of Freedom Control. Otherwise, it is automatically set to a value of 1 or 0 based on the Structure selection. The bias value. The analog input value and status from another block's BKCAL_OUT output that is used by an upstream block for bumpless transfer. The value and status required by the BKCAL_IN input of another block to prevent reset windup and provide bumpless transfer to closed loop control. The summary of active error conditions associated with the block. The block errors for the PID function block are Simulate active, Local override, Input failure/process variable has Bad status, Output failure, Readback failed, and Out of Service. When enabled and the block is in AUTO mode, bypasses the normal control algorithm by transferring the SP value (in percent) to OUT. When disabled, the block operates normally. To turn BYPASS on or off, select the CONTROL_OPTS Bypass Enable option and set the block to MAN mode. The remote analog setpoint value from another block. Control options. Allows you to specify control strategy options. The supported control options for the PID function block are No Out Limits in Manual, Obey SP Limits if Cas or RCas, Act on IR, Use PV for BKCAL_OUT, Track in Manual, Track Enable, Direct Acting, SP Track Retained Target, SP-PV Track in LO or IMan, SP-PV Track in ROut, SP-PV Track in Man, and Bypass Enable. The result of alarm detection associated with DV_HI_LIM. If DV_HI_ACT equals True, DV_HI_LIM has been exceeded. The amount by which PV can deviate above SP before the deviation high alarm is triggered. When this limit is exceeded, DV_HI_ACT is set to True. The result of alarm detection associated with DV_LO_LIM. If DV_LO_ACT equals True, DV_LO_LIM has been exceeded.
BIAS BKCAL_IN
None EU of OUT_SCALE
BKCAL_OUT
EU of PV_SCALE
BLOCK_ERR
None
BYPASS
None
CAS_IN CONTROL_OPTS
EU of PV_SCALE None
DV_HI_ACT
None
DV_HI_LIM
EU of PV_SCALE
DV_LO_ACT
None
222
Parameter DV_LO_LIM
Units EU of PV_SCALE
Description The amount by which PV can deviate below SP before the deviation low alarm is triggered. When this limit is exceeded, DV_LO_ACT is set to True. Note that DEV_LO_LIM is a negative number and is compared against (PV - SP). The difference between SP (setpoint) and PV (process variable). Enables/disables feedforward control. The feedforward gain value. FF_VAL is multiplied by FF_GAIN before it is added to the calculated control output. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the feedforward value (FF_VAL). The feedforward control input value and status. The value and status from the I/O card or from the simulated input if simulation is enabled. Selects equation form (series or standard). If Use Nonlinear Gain Modification is selected in FRSIPID_OPTS, the form automatically becomes standard, regardless of the configured selection of FORM. FRSI add-on control options. Supported options are Dynamic Reset Limiting, Use Nonlinear Gain Modification. The normalized proportional (multiplier) gain value. Fraction of derivative action taken on SP. For a value of 0.6, 60% of the derivative action is applied to SP. The value of GAMMA can be changed over a range of 0-1 if STRUCTURE is set to Two Degrees of Freedom Control. Otherwise, it is automatically set to a value of 1 or 0 based on the Structure selection. The result of alarm detection associated with HI_LIM. If HI_ACT equals True, HI_LIM has been exceeded. The result of alarm detection associated with HI_HI_LIM. If HI_HI_ACT equals True, HI_HI_LIM has been exceeded. The setting for the alarm limit used to detect the high high alarm condition. The setting for the alarm limit used to detect the high alarm condition.
HI_ACT HI_HI_ACT
None None
HI_HI_LIM HI_LIM
EU of PV_SCALE EU of PV_SCALE
223
Parameter IDEADBAND
Units EU of PV_SCALE
Description The dead band value. When the error gets within IDEADBAND, the integral action stops. The proportional and derivative action continue. The analog input value and status (for example, the connection for the PV input from another block). Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 only if the following conditions are true: The Write to Inspect Alarm context menu item has been selected from Inspect for this block. With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition exists for Variability only if both the Variability Index and the Standard Deviation have exceeded their defined limits.) Defines the input DST for the I/O channel used for the PV. I/O options. Allows you to select how the I/O signals are processed. The supported I/O options for the PID block are Increase to Close and Low Cutoff. Defines the output DST for the block. Defines the Device Signal Tag (DST) for the input channel that provides readback for the value written to the channel defined by IO_OUT. Linearization type. Determines whether the field value is used directly (Direct), is converted linearly (Indirect), or is converted with the square root (Indirect Square Root). The result of alarm detection associated with LO_LIM. If LO_ACT equals True, LO_LIM has been exceeded. The setting for the alarm limit used to detect the low alarm condition. The result of alarm detection associated with LO_LO_LIM. If LO_LO_ACT equals True, LO_LO_LIM has been exceeded. The setting for the alarm limit used to detect the low low alarm condition. Activated when the Low Cutoff I/O option is enabled. When the converted measurement is below the LOW_CUT value, the PV is set to 0.0.
IN INSPECT_ACT
EU of PV_SCALE None
IO_IN IO_OPTS
None None
IO_OUT IO_READBACK
None None
L_TYPE
None
LO_LO_LIM LOW_CUT
EU of PV_SCALE EU of PV_SCALE
224
Parameter MODE
Units None
Description Parameter used to show and set the block operating state. MODE contains the actual, target, permitted, and normal modes. The configured range of ERROR, positive or negative, where the gain modifier is at a minimum value. The range is 0->(PV_SCALEHI-PV_SCALELO). Gap action hysteresis value. The range is 0>(PV_SCALEHI-PV_SCALELO). The configured minimum gain modifier. The range is 0>1.0. The configured range of ERROR, positive or negative, where the gain modifier transitions between NL_MINMOD and 1.0. The range is 0->(PV_SCALEHI-PV_SCALELO). The analog output value and status. The maximum output value allowed. The minimum output value allowed. The value and status of the output channel referenced by IO_READBACK. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The process variable used in block execution and alarm limit detection. The time constant of the first-order PV filter. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with PV. The derivative action time constant. The remote analog setpoint value and status. Input provided by a device or the output of another block. The output provided for bumpless mode transfer and reset limiting by the source of RCAS_IN. Essentially the equivalent of BKCAL_OUT for RCAS_IN. The integral action time constant. Remote output value and status. Input provided by a device to the control block for use as the output (ROut mode)
NL_GAP
EU of PV Scale
PV PV_FTIME PV_SCALE
RESET ROUT_IN
225
Parameter ROUT_OUT
Units EU of OUT_SCALE
Description The output provided for bumpless mode transfer and reset limiting by the source of ROUT_IN. Essentially the equivalent of BKCAL_OUT for ROUT_IN. Defines action to be taken on remote control device timeout.* The maximum allowable time between RCAS_IN or ROUT_IN updated. If exceeded, mode shedding takes place. Enables simulation and allows you to enter an input value and status. The SIMULATE value is used by the block only when SIMULATE_IN is not connected. The input connector value and status used by the block instead of the analog measurement when simulation is enabled. If SIMULATE_IN is connected or has a manually entered value, SIMULATE_IN always overrides SIMULATE. Note When SIMULATE_IN is wired from an input source on the function block diagram, it always overrides a manually entered value in SIMULATE.
SHED_OPT SHED_TIME
None Seconds
SIMULATE
Percent
SIMULATE_IN
Percent
The block's setpoint value. Time constant of the first order SP filter. The highest SP value allowed. The lowest SP value allowed. Ramp rate at which downward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. Ramp rate at which upward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. The working setpoint of the block subjected to SP_RATE_DN and SP_RATE_UP.
SP_RATE_UP
SP_WRK
EU of PV_SCALE
226
Parameter ST_REV
Units None
Description The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.* Status options. Allows you to select options for status handling and processing. The supported status option for the PID block depends on whether or not the block is in a fieldbus device. In a Fieldbus device: Target to Manual if Bad IN Use Uncertain as Good IFS if Bad CAS_IN IFS if BAD IN In a DeltaV Controller: Bad if Limited Uncertain if Limited Target to Manual if Bad IN Use Uncertain as Good The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
STATUS_OPTS
None
STDEV_CAP
STDEV_TIME
STDEV
The standard deviation of PV. For analog control blocks in AUTO, mean is assumed to be the SP. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The strategy filed can be used to help group blocks. This data is not checked or processed by the block.* Defines PID equation structure to apply controller action.
STRATEGY STRUCTURE
227
Parameter TRACK_OPT
Units None
Description Tracking Option. Allows you to select the tracking behavior when the status of the TRK_IN_D is Bad. The three tracking options are Always Use Value - The block reacts to the current value of TRK_IN_D regardless of the status. Use Last Good Value - The block uses the value of TRK_IN_D the last time its status was not Bad. This is the default value for TRACK_OPT. Track if Bad - If the status of TRK_IN_D is Bad, the block reacts as if the value if True, even if the value is False.
TRK_IN_D TRK_SCALE
None None
Discrete input that initiates external tracking. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the external tracking value (TRK_VAL). The analog input used in the external tracking function.
TRK_VAL
EU of TRK_SCALE
* These parameters are only visible when the function block is located in a Fieldbus device. Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Application Example: Basic PID Block for Steam Heater Control A process fluid is heated by steam in a heat exchanger, as in the following example:
Basic Setup for PID Steam Heater Control In this example, the PID controller accepts the heated fluid temperatures as an input and provides a signal to the AO block, which sends the control signal to the steam feed valve. Note You can configure the PID function block by referencing the I/O directly and not using AI and AO function blocks. In this case, I/O channels are addressed with the parameters IO_IN and IO_OUT. Status information is communicated to the block when you define the card and channel parameters. The BKCAL communication between the PID and AO blocks is a necessary part of this example. For more information on this BKCAL communication, refer to the Advanced Topics - BKCAL Communications topic. Application Example: Feedforward Control In the above example, control problems can arise because of a time delay caused by thermal inertia between the two flow streams. If, for example, steam flow declines, it can take some time for this disturbance to cause a drop in the heated fluid's temperature. Control can be improved by measuring this disturbance and reacting to it before it manifests itself at the temperature transmitter. In the following figure, steam flow is measured (FT). A feedforward signal is sent to the controller to augment the signal to the valve if flow drops or to lower this signal if steam flow rises. (This applies to a configuration where the higher the signal, the greater the valve opening.)
229
In this steam heater system, adding feedforward control improves the process outlet temperature response. The inlet steam flow is input to an AI function block and is connected to the FF_VAL connector on the PID block. Enable feedforward control (FF_ENABLE), scale the feedforward value (FF_SCALE), and apply a gain determined by tuning (FF_GAIN). The following figure shows the process and function block configuration for feedforward control:
PID Function Block Feedforward Control Example Application Example: Cascade Control with Master and Slave Loops The feedforward scheme in the above example requires that some correlation be predetermined between steam flow changes and the steam valve opening adjustments they make. Another way to deal with the time delay problem is to use cascaded controllers. This approach does not require finding a correlation between steam flow changes and their steam valve opening adjustments. In the cascade loop in the following figure, the output from the master temperature loop is used as the setpoint for the slave steam flow loop. The following diagram shows the process instrumentation for this example:
230
PID Function Block Cascade Control Example The cascaded blocks shown can all be installed in a single module. Another method of configuring function blocks for this example is to put the temperature AI block and the master loop PID block in one module. The flow, slave PID block, and AO block are in a second module. Choose this method when you want to reference faceplates and alarms separately. In the PID function block, BYPASS is used when the control function block is a slave block in a cascade. If a transmitter failure or some other problem occurs that causes the slave controller to see a Bad input signal, BYPASS can be activated so that the signal coming from the master controller passes through the slave to the field. In this manner, the loop still has some control; however, dynamic performance will suffer because a cascaded loop has effectively been replaced with a single PID. Application Example: Cascade Control with Override You might need override with cascaded PIDs. For more information on the use of override control, refer to Application Information - Control Selector Function Block. Note Cascaded blocks use BKCAL_IN and BKCAL_OUT to pass statuses during cascade initialization and in limited states. Refer to Advanced Topics - BKCAL Communications for more information. Application Example: PID Control with Tracking An example where tracking is useful is a process operating outside of its normal operating range (for example, during a process startup). In the following figure, a flow control valve is used to regulate the flow rate supplied by a pump. When the pump is started, the output flow from the pump is low for a short period while the pump is coming up to speed. The flow control valve and controller do not operate effectively at this low flow.
231
PID Control Using Tracking Tracking can be used in this situation to set the valve at a predetermined opening for a given amount of time. The signal to start the pump is also directed through a timed pulse block to turn tracking on for the time duration specified in the timed pulse block. The tracking value is set at the needed valve opening. When the pump starts, tracking starts. The valve opens to the specified value for the duration of the timed pulse. At the end of the pulse, tracking is turned off, and the PID can initiate its normal control, regulating the valve to adjust the output flow.
232
Application Example: Error-Squared Proportional Only Control Applied to Integrating Process A PID block, configured for proportional only control, is applied to a liquid level (for example, a surge tank level control might be performed this way).
Proportional Only Control Applied to a Liquid Level Use Nonlinear Gain Modification in FRSIPID_OPTS is selected. Gain=2; Reset=0; Rate=0; NL_GAP=0; NL_HYST=0; NL_TBAND=50; NL_MINMOD=0. This set of tuning parameters provides an error-squared output with a maximum gain of 2. Starting balanced at 50% of scale (BIAS=50 %), a load disturbance equivalent to 25% of OUT_SCALE is introduced.
233
Control with Deadband, Transition Band, and Hysteresis A self-regulating process is controlled with a PID configured for deadband, hysteresis and transition band. The block diagram of the loop is identical to that for the previous example. Tuning parameters are: NL_MINMOD=0; NL_GAP=2; NL_HYST=3; NL_TBAND=3; GAIN=2; RESET=7.5; RATE=0. A disturbance equivalent to 25% of OUTSCALE is introduced at the process input. Until the error exceeds 5 (NL_GAP + NL_HYST), the output remains constant. Once the controller begins adjusting its output it continues to adjust until the error is brought to a value less than NL_GAP, at which point the output is held constant.
234
Application Example-Dynamic Reset Limiting In Primary of A Cascade Two PID blocks are configured in a cascade control configuration. The MASTER PID is tuned for load response to approximately the best IAE (Integrated Absolute Error), without FRSI_PID_OPTS option Dynamic_Reset_Limiting (DRL) selected. The MASTER PID is then tuned to give the identical IAE with option Dynamic_Reset_Limiting selected. The response for SP and load responses are compared: Note that in this example the MASTER is using identical RESET and RATE, but in the case where the DYNAMIC_RESET_LIMITING option is selected the GAIN parameter is adjusted to about 1.6 the value applied in the case when option is not selected.
235
From the above plots it is apparent that master response is altered significantly by the use of Dynamic_Reset_Limiting. The response difference illustrated is typical. The tendency to overshoot is much reduced. Both the MASTER and SLAVE processes are then modified by doubling the dead time in both.
236
When the Dynamic_Reset_Limiting option is selected the responses are maintained at an acceptable level of performance, even though the GAIN in that case is higher. Not only does Dynamic_Reset_Limiting (or dynamic external reset) provide reset limiting in cases of limit violations, it also reduces the sensitivity of the control loop to changes in slave performance and stability, while providing much higher stability margins in the MASTER.
Cascade Initialization Another use of the BKCAL parameters is to initialize cascaded blocks (refer to Cascade Basics for more information). This occurs when the control cascade is automated (for example, when the blocks go from Manual to Auto or Cas mode). The simplest case of a control cascade is a master PID block linked to a slave AO block. The dialog that takes place between blocks during this process is illustrated in the following sequence of figures. 1 Start out both blocks with Man mode as the target modes.
Blocks with Man Modes as Targets In step 1, the cascade is open, that is, not automated. Both blocks have Manual as their target modes. Note that PID1 has IMan as its actual mode because the PID block senses that there is a slave block downstream, and the slave block is sending a Not Invited status signal up to the master block through the BKCAL port. Not Invited conveys to the master block that the slave is not in Cascade mode. Therefore, the cascade cannot be closed, and the master cannot operate as an automatic controller. Also, the slave block sends status information through its BKCAL_OUT parameter. This occurs because the status entering the CAS_IN parameter is GoodCascade rather than GoodNoncascade. If the status of CAS_IN were GoodNoncascade, the slave would conclude that the upstream block is not one that initializes as part of a control cascade. Close the cascade by first putting the slave block into Cascade mode. Set the target mode of AO1 to Cascade. This causes two things to happen: the actual mode of the AO block goes to Auto, and AO1/BKCAL_OUT sends out an initialization request to the upstream block, informing the upstream block that the downstream block is trying to go to Cascade mode. This is shown in step 2.
238
Downstream Block Target Mode Set to Cas 3 The upstream block initializes and notifies the downstream block that initialization has occurred.
Upstream Block Initialization and Notification of Downstream Block In step 3, the master block has received the initialization request and initializes, that is, sets up SP for bumpless transfer. Then, the master block lets the slave block know that it has received the initialization request and successfully initialized. The process by which this occurs is an Initialization Acknowledged status sent through the master block's OUT parameter. If something were wrong with the upstream block (for example, it had tracking enabled or a bad input status), it would not be able to initialize and the cascade could not be closed. AO1 would be stuck in Cas/Auto mode, performing its function using the internal setpoint of the block. 4 The downstream block changes to Cas mode and notifies the upstream block of this change.
239
Once the slave block receives the Initialization Acknowledged signal from the master block, the slave block's actual mode becomes Cas (step 4). This step closes the cascade. The slave block executes its algorithm using the SP supplied by the master block. At this point, the cascade is closed but not automated. The master PID is still in Man mode. 5 The upstream block sets and achieves Auto mode.
Upstream Block Sets and Achieves Auto Mode Step 5 shows the fully automated cascade. The target mode of the master controller is set to Auto. Since PID1/ BKCAL_IN has a status other than Not Invited (because the slave block is in Cas mode), the PID block is authorized to go to Auto mode. Note that if the user had set the target mode of PID1 to Auto at step 1, the block would have remained with mode Auto/IMan because of the Not Invited status received by the PID through BKCAL_IN. Multi-level Cascade Initialization The following figure shows the initialization process for a multi-level cascade (that is, a cascade with two levels of cascading). This figure illustrates a control cascade with a downstream AO block. Cascade automation starts from the most downstream block and proceeds step by step upstream. When these steps are completed, all blocks in the cascade are in Cas mode except the master block, which is in Auto mode when the cascade is fully automated.
240
Blocks Start in Man Mode 2 AO1 sets the target mode to Cas; PID2 initializes and acknowledges.
241
AO1 Achievement of Cas Mode; PID2 Achievement of Man Mode 4 PID2 sets the target mode to Cas; PID1 initializes and acknowledges.
PID2 Setting of Target Mode to Cas; PID1 Initialization and Acknowledgement The preceding examples regarding Cas mode also apply to RCas mode. The same communication takes place between the master and slave blocks. However, in RCas mode, substitute RCAS_IN for CAS_IN and RCAS_OUT for BKCAL_OUT.
242
Ramp Function Block IN is the analog input value and status that can be used as the ramp starting point. END_VALUE is the ramp endpoint input value and status. ENABLE activates the ramp calculation. TRK_IN_D causes OUT to track IN. PAUSE stops the ramp calculation. OUT is the output value and status that indicates a tracked or a ramped value. COMPLETE indicates the ramp calculation is complete.
243
The END_VALUE parameter specifies the ramp endpoint and the target end value of OUT. Specifying the Ramp Calculation You specify the time duration of the ramping output with the RAMP_TIME parameter, or you specify the ramp rate directly with the RAMP_RATE parameter. The RAMP_TYPE parameter indicates whether to use RAMP_TIME or RAMP_RATE for the ramping calculation: When the RAMP_TYPE parameter is True (1), rate equals RAMP_RATE. When RAMP_TYPE is False (0), RAMP_TIME is used for the rate parameter calculation.
Ramp Execution When the RAMP_TYPE, IN, or END_VALUE parameters change during the execution of the block, the ramp is reset with the new values. In addition, the ramp is reset when the selected RAMP_TYPE, RAMP_TIME, or RAMP_RATE parameter is changed during execution. The TIME_REMAIN parameter is the time left until COMPLETE transitions to TRUE. The transition of the COMPLETE parameter to TRUE signals the end of the ramp calculation. The output will equal END_VALUE at this time. The ramping OUT and TIME_REMAIN values can be stopped and held at their current value when the PAUSE parameter transitions to True. After PAUSE transitions from True to False, the block resets using the new
244
END_VALUE, IN, RAMP_TYPE, RAMP_TIME, or RAMP_RATE values. The block resets only if one or more of these values change. When ENABLE is False, the COMPLETE and PAUSE parameters are set False and TIME_REMAIN is set to zero seconds. The following table shows the relationship between the ENABLE, TRK_IN_D, PAUSE, COMPLETE, and OUT parameters in the Ramp function block: Ramp Function Block Parameter Settings ENABLE TRK_IN_D PAUSE COMPLETE Ramp Starting Point N/A Last OUT N/A IN N/A N/A OUT
False True at OUT = END_VALUE False True at OUT = END_VALUE True at OUT = END_VALUE True at OUT = END_VALUE
245
Output Tracking You select output tracking by configuring the TRK_IN_D parameter. When TRK_IN_D is True, OUT tracks IN. When the ENABLE input transitions from True to False: When the TRK_IN_D parameter is False, the OUT parameter is held at its last value. When TRK_IN_D is True, OUT tracks IN.
246
Units EU of IN None
Description The analog output value and status. Discrete input value and status that stops the ramping calculation. OUT and TIME_REMAIN are held at their last values. The increase or decrease rate of the ramp calculation. The time period for the output to ramp from IN to END_VALUE. The variable used for ramp calculation (False [0] = RAMP_TIME, True [1] = RAMP_RATE). The time left until COMPLETE transitions to TRUE. Initiates the output tracking function (True [1] = active, False [0] = inactive).
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
247
Rate Limit Function Block IN is the analog input value and status. ENABLE activates rate limiting. OUT is the analog output value and status.
248
where: roc = the calculated rate of change of the input between cycles IN[t-1] = the value of IN from the previous cycle t = the elapsed time since the previous cycle, in seconds. If the rate of change is greater than the configured maximum increase value (INCREASE_MAX):
If the rate of change is less than the configured maximum decrease value (DECREASE_MAX):
If the rate of change is greater than DECREASE_MAX and less than INCREASE_MAX: OUT = IN
DECREASE_MAX ENABLE IN
249
Parameter INCR_LIMITED
Units None
Description When 1, indicates that OUT is not equal to IN due to an increasing rate of change exceeding (being greater than) INCREASE_MAX. Otherwise, the value is 0. The maximum increasing rate of change allowed for OUT. INCREASE_MAX must be a positive number. When 1, indicates that OUT is not equal to IN due to an excessive rate of change. Is the logical OR of DECR_LIMITED and INCR_LIMITED. Otherwise, the value is 0. The analog output value and status. The filtered rate of change of the IN parameter. ROC is an indication that is independent of the scan-to-scan rate of change used by the block algorithm to determine OUT. The time constant of the first order filter applied to the scanto-scan rate of change calculation for the ROC parameter. Determines the time units for the ROC parameter. Also used to convert INCREASE_MAX and DECREASE_MAX to units of EU/sec.
INCREASE_MAX LIMITED
OUT ROC
EU of IN EU of IN per TIME_UNITS Seconds Selectable time unit seconds, minutes, hours, or days
TIMECONST TIME_UNITS
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Rate Limit Function Block Application Example In this example, you configure the INCREASE_MAX parameter as:
In addition, you can limit the decreasing rate of change to this rate by configuring the DECREASE_MAX parameter to -0.075 degrees/sec.
250 Function Block Reference
251
where: IN_1 is the input to which the ratio setpoint (SP) is applied after filtering with the RA_FTIME parameter value. GAIN is the gain value used to range-adjust the result and control the decimal point location of the ratio.
252
The following diagram shows the timed response of the Ratio function block:
Ratio Function Block Timing Diagram Select how the block executes by configuring input filters, tracking variables, setpoint limits, and output limits. The block's mode determines setpoint and output selection. Input Filtering Set the ratio filter time constant (RA_FTIME) to filter IN_1. Set the PV filter time constant (PV_FTIME) to filter IN. When IN is not connected, and BKCAL_IN and IN_1 are good, PV status is good. Calculation of PV In the Ratio function block, PV is the actual ratio. It is calculated as follows:
The value of IN used in the calculation is the value of IN filtered by PV_FTIME if IN is wired (that is, its status is not BadNotConnected). If IN is not wired, the value used in the calculation is the value of BKCAL_IN if it is wired. Otherwise, the value used is that of OUT. IN_1 is filtered by RA_FTIME before it is used in the calculation. PV is constrained within the EU range of PV_SCALE. Tracking You can specify output tracking with control options and parameters. The Track Enable control option (CONTROL_OPTS) must be True (1) for the track function to operate. When the Track in Manual control option is True, tracking can be activated and maintained when the block is in Manual mode. When Track in Manual is False, the operator can override the tracking function when the block is in Man mode. Activating the track function causes the block's actual mode to go to Local Override (LO). The tracking value parameter (TRK_VAL) specifies the value to be converted and tracked into the output when the track function is operating. The tracking scale parameter (TRK_SCALE) specifies the range of TRK_VAL. When the track control parameter (TRK_IN_D) is True and the Track Enable control option is True, the TRK_VAL input is converted to the appropriate value and output in units of OUT_SCALE.
253
Setpoint and Output Limit Constraints As part of download the output high and low limits are set to the configured values. If these limits have not been configured OUT_HI_LIM will be set to OUT_SCALE_HI and OUT_LO_LIM will be set to OUT_SCALE_LO. The following constraints apply to download or direct entry: SP_HI_LIM is restricted to PV_SCALE_HI+.1*(PV_SCALE_HI-PV_SCALE_LO). SP_LO_LIM is restricted to PV_SCALE_LO-.1*(PV_SCALE_HI-PV_SCALE_LO). OUT_HI_LIM is restricted to OUT_SCALE_HI+.1*(OUT_SCALE_HI-OUT_SCALE_LO). OUT_LO_LIM is restricted to OUT_SCALE_LO-.1*(OUT_SCALE_HI-OUT_SCALE_LO).
If the new scale causes a limit to be outside of these rules, the DeltaV system forces the limit within the rules. The SP or OUT parameters are not changed as a result of changing the scale or limits. However, if OUT or SP are outside newly established limits, the values will be forced within the limits. Setpoint Selection and Limiting Setpoint selection is determined by the mode. The following diagram shows the method for setpoint selection:
Ratio Function Block Setpoint Selection You can limit the setpoint by configuring the SP_HI_LIM and SP_LO_LIM parameters. In Cas mode, the setpoint comes from the CAS_IN input. In Auto mode, the setpoint is adjusted by the operator, and you can apply rate of change limits to the setpoint (SP_RATE_DN and SP_RATE_UP). Output Selection and Limiting Output selection is determined by mode. In Auto or Cas mode, the output is computed by ratio control. In Man mode, the output can be entered manually. You can apply limits to the output by configuring the OUT_HI_LIM and OUT_LO_LIM parameters. Bumpless Transfer on Mode Transitions The BAL_TIME parameter determines bumpless transfer operations. When the mode transitions from a non-Auto mode to Auto mode or from any mode to Cas mode, an internal balancing bias is calculated that forces the block to initialize its output to a value that does not bump the output. The internal bias is ramped to zero over a period of time specified by BAL_TIME. When BAL_TIME is zero, the internal bias and ramp are not applied. When BAL_TIME is non-zero, the internal bias and ramp are applied. When internal bias and ramp are not applied, the setpoint is back-calculated in all modes except Auto and Cas. However, there are cases when back calculation cannot be accomplished (such as when IN_1 is zero or when CAS_IN is connected to the output of a block that does not have initialization capability). Therefore, make sure the value in BAL_TIME provides a reasonable balancing time.
254
Block Errors The following conditions are reported in the BLOCK_ERR parameter: Out of Service The block is in Out of Service (OOS) mode. Local override The block is in Local Override (LO) mode. Block configuration error IN_1 0 or GAIN = 0.
You can configure the following alarm limits to compare to the difference between the SP and PV values for deviation alarm detection: Deviation high (DV_HI_LIM) The deviation of PV is above SP. Deviation low (DV_LO_LIM) The deviation of PV is below SP.
IN must be connected to provide PV calculation and in order for the alarm limits to have meaning.
255
BAD_ACTIVE BAD_MASK
None None
BAL_TIME BKCAL_IN
Seconds EU of OUT_SCALE
BKCAL_OUT
EU of PV_SCALE
256
Parameter BLOCK_ERR
Units None
Description The summary of active error conditions associated with the block. The block errors for the Ratio function block are Block configuration error, Local override, and Out of Service. The remote setpoint value from another block. Control options. Allow you to specify control strategy options. The valid control options for the Ratio function block are No OUT Limits in Manual, Obey SP Limits if Cas or RCas, Use BKCAL_OUT With IN_1, Act on IR, Use PV for BKCAL_OUT, Track in Manual, Track Enable, SP Track Retained Target, SP-PV Track in LO or IMan, , SPPV Track in Man. The result of alarm detection associated with DV_HI_LIM. If DV_HI_ACT equals True, DV_HI_LIM has been exceeded. The amount by which PV can deviate above SP before the deviation high alarm is triggered. When this limit is exceeded, DV_HI_ACT is set to True. The deviation of PV is above SP. The result of alarm detection associated with DV_LO_LIM. If DV_LO_ACT equals True, DV_LO_LIM has been exceeded. The amount by which PV can deviate below SP before the deviation low alarm is triggered. When this limit is exceeded, DV_LO_ACT is set to True. Note that DEV_LO_LIM is a negative number and is compared against (PV - SP). FRSI add-on I/O option. Supported option is Treat_IN_1 as wild. The multiplier used to scale the ratio value. The result of alarm detection associated with HI_LIM. If HI_ACT equals True, HI_LIM has been exceeded. The result of alarm detection associated with HI_HI_LIM. If HI_HI_ACT equals True, HI_HI_LIM has been exceeded. The setting for the alarm limit used to detect the high high alarm condition. The setting for the alarm limit used to detect the high alarm condition. The analog input value and status used with IN_1 to calculate PV.
CAS_IN CONTROL_OPTS
EU of PV_SCALE None
DV_HI_ACT
None
DV_HI_LIM
EU of PV_SCALE
DV_LO_ACT
None
DV_LO_LIM
EU of PV_SCALE
HI_HI_LIM HI_LIM IN
257
Description The result of alarm detection associated with LO_LIM. If LO_ACT equals True, LO_LIM has been exceeded. The result of alarm detection associated with LO_LO_LIM. If LO_LO_ACT equals True, LO_LO_LIM has been exceeded. The analog input value and status used to calculate OUT. The setting for the alarm limit used to detect the low alarm condition. The setting for the alarm limit used to detect the low low alarm condition. Parameter used to request, show, and set the block operating state. The analog output value and status. The maximum output value allowed. The minimum output value allowed. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The process variable used in block execution and alarm limit detection. The time constant of the first-order PV filter applied to IN. It is the time required for a 63% change in IN. The high and low scale values, the engineering units code, and the number of digits to the right of the decimal point associated with PV. The time constant of the first-order ratio filter applied to IN_1. It is the time required for a 63% change in IN_1. The remote analog setpoint value and status. Input provided by a device or the output of another block. The output provided for bumpless mode transfer and reset limiting by the source of RCAS_IN. Essentially the equivalent of BKCAL_OUT for RCAS_IN. Defines action to be taken on remote control device time out.* The maximum allowable time between RCAS_IN and ROUT_IN updates. If exceeded, mode shedding takes place.
Defined by supplying block EU of PV_SCALE EU of PV_SCALE None EU of OUT_SCALE EU of OUT_SCALE EU of OUT_SCALE None
PV PV_FTIME PV_SCALE
SHED_OPT SHED_TIME
None Seconds
258
Description The block's setpoint value. The highest setpoint value allowed. The lowest setpoint value allowed. Ramp rate at which downward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. Ramp rate at which upward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. The working setpoint of the block. It is the result of setpoint limiting and setpoint rate of change limiting. The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
SP_RATE_UP
SP_WRK STDEV_CAP
STDEV_TIME
STDEV
The standard deviation of PV. For analog control blocks in AUTO, mean is assumed to be the SP. Refer to Loop Performance Calculations for more details on how this parameter is calculated. Status options. Allow you to select options for status handling and processing. The supported status option for the Ratio function block is Target to Manual if Bad IN. Discrete input that initiates the external tracking function. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the external tracking value (TRK_VAL). The analog input used in the external tracking function.
STATUS_OPTS
TRK_IN_D TRK_SCALE
None None
TRK_VAL
EU of TRK_SCALE
259
Note Default values and datatype information for the parameters are available by expanding the Parameter View window.
Basic Setup for Ratio Flow Control In this example, there are two flow streams: the primary (main) flow stream and the secondary (manipulated) flow stream. The primary stream's flow rate is set and governed by a conventional PID loop. The Ratio function block and its slave PID make the manipulated flow stream a specified fraction of the primary flow. The primary stream's flow rate is sent to the Ratio function block where the ratio setpoint is used to determine the desired flow rate of the manipulated stream. The output of the Ratio block is then cascaded into a slave flow controller for the secondary stream, where it is used as a setpoint for this stream. Note The Ratio function block does not actually require the secondary (manipulated) flow rate. The input IN is optional. If this input is provided, it is used to calculate the actual ratio. This ratio is stored as the Ratio block's PV, which can be used for alarming. In the above figure, it is implied that the Ratio function block runs in Automatic mode with the desired ratio set manually by an operator.
260
pH Control The pH of a stream can be controlled by adding caustic or acid to a primary flow stream. The additive must be added in the proper ratio to get the desired pH. The setup in the following figure shows how this can be done using the Ratio function block.
pH Control
261
Scaler Function Block IN is the analog input value and status. OUT is the analog output value and status.
262
Note The Low and High extensions in this example stand for the low and high value fields of the IN_SCALE and OUT_SCALE parameters.
OUT OUT_SCALE
EU of OUT_SCALE None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
263
The following figure is an example function block diagram for this application:
264
Signal Characterizer Function Block IN_1 and IN_2 are the input values to the block. OUT_1 is the output associated with IN_1. OUT_2 is the output associated with IN_2.
265
where m = slope of the line b = y-intercept of the line. Using this formula, the block derives an output value that corresponds to the input. When the input lies beyond the range configured in CURVE_X, the output is clamped to the corresponding limit in the CURVE_Y array. CURVE_X The CURVE_X values must be defined in ascending order. The X1 element must be the smallest value, and each following X value must be greater than the previous X value. When the X values are not configured in ascending order, a block configuration error is set and the last X value that is greater than or equal to the previous one is used as the curve endpoint.
266
Signal Characterizer Function Block Valid CURVE_X Values Example The following diagram shows an example of an invalid X value configuration:
Signal Characterizer Function Block Invalid CURVE_X Values Example This curve has an invalid definition because X3 is greater than X4. Between these points, the Y value is undefined because it can be any value from Y3 to Y4. In this configuration, the X3,Y3 pair becomes the endpoint for the curve definition. To use the X4,Y4 pair, you must designate X4 to be greater than or equal to X3. SWAP_2 The SWAP_2 parameter swaps the X and Y axes used for OUT_2. When the SWAP_2 parameter is True, IN_2 references the CURVE_Y values and OUT_2 references the CURVE_X values. In addition, the IN_2 units change to Y_UNITS and the OUT_2 units change to X_UNITS.
267
The block sets a configuration error when SWAP_2 is True and the CURVE_Y elements are not configured in an increasing manner. The following example shows how the block configuration error (BLOCK_ERR) is set during a SWAP_2 action:
Signal Characterizer Function Block SWAP_2 Configuration Error Example When swap is in effect, the first curve has an invalid definition because Y3 is less than Y2. In this configuration, the X2,Y2 pair becomes the endpoint for the swapped curve definition when processing IN_2. Note that the X4,Y4 pair is the valid endpoint when processing IN_1. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Out of Service The block is in Out of Service (OOS) mode. Block configuration error Set if an invalid definition occurs in less than the first 20 points and the X value of the X,Y pairs beyond the valid definition are non-zero.
268
BAD_ACTIVE
None
BAD_MASK
None
BLOCK_ERR
None
BYPASS
None
CONTROL_OPTS
None
269
Units EU of IN EU of IN None
Description The analog output value and status related to IN_1. The analog output value and status related to IN_2. Swaps the X and Y axes used for OUT_2.
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
270
Signal Generator Function Block OUT is the output value and status.
271
You specify the bias parameter (BIAS) to be applied to the signal. The following figure shows an example of the timed response of the Signal Generator function block:
272
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
273
Signal Generator Function Block Application Example The Signal Generator function block generates a random value between -200 and 200. You can use these values to test how your control strategy responds to all of the possible input values. In addition, you can test DeltaV Operate by seeing what happens when the generated signal to the AI function block exceeds a limit, triggers an alarm, and/or notifies the operator.
274
Signal Selector Function Block IN1 through IN[n] are the analog input values and statuses (as many as 16 inputs). OUT is the selected analog value and status.
275
OUT SEL_TYPE
EU of IN None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
276
Signal Selector Function Block Application Example (SEL_TYPE = max) Or, you can use the block to calculate the average temperature of the four inputs, as in the following figure:
277
Splitter Function Block CAS_IN is the remote setpoint from another block. BKCAL_IN_1 is the value and status reflecting the BKCAL_OUT of the lower block associated with OUT_1. It is used for initialization and to prevent windup in upstream blocks. BKCAL_IN_2 is the value and status reflecting the BKCAL_OUT of the lower block associated with OUT_2. It is used for initialization and to prevent windup in upstream blocks. OUT_1 is the first output value and status. OUT_2 is the second output value and status. BKCAL_OUT is the value and status required by the BKCAL_IN input of the upstream block to prevent reset windup and to provide bumpless transfer to closed loop control.
278
279
Some constraints are enforced by the controller to guarantee useful output values: X12 must be greater than X11 X22 must be greater than X21 X21 must be greater than or equal to X11
Violation of any of these constraints locks the block into OOS mode and sets the BLOCK_ERR parameter to Configuration Error. The OUT_1 parameter is set to Y11 when the SP value exceeds X12 when the LOCKVAL parameter is defined as follows: OUT_1 is Y11 when SP > X12 Hysteresis equal to five percent of the X11-to-X12 span is used to prevent OUT_1 from jumping between Y11 and Y12 at X12. The following figure shows the output values for three examples of IN_ARRAY and OUT_ARRAY elements:
Splitter Function Block Execution Example Setpoint Limiting The setpoint is limited to the endpoints of the IN_ARRAY parameter values. In Auto mode, you can apply rate of change limits to the setpoint by configuring the SP_RATE_UP and SP_RATE_DN parameters.
280
281
The upstream block is low-limited when one of the following statements is true: Both downstream blocks are low-limited. or One downstream block is low-limited, the associated output slope is positive, and the other block has Bad status or is not in Cas mode. or One downstream block is high-limited, the associated output slope is negative, and the other block has Bad status or is not in Cas mode. or SP is less than or equal to X11.
ALERT_KEY
None
BAD_ACTIVE
None
BAD_MASK
None
BAL_TIME
Seconds
282
Parameter BKCAL_IN_1
Description The analog input value and status from another block's BKCAL_OUT output that is used by an upstream block for bumpless transfer. The value and status reflecting the BKCAL_OUT of the lower block associated with OUT_2. This information is used for initialization and to prevent windup in upstream blocks. The value and status required by the BKCAL_IN input of an upstream block that is used to prevent reset windup and to provide bumpless transfer to closed loop control. The summary of active error conditions associated with the block. Block errors for the Splitter function block are Block configuration error and Out of Service. The remote setpoint value from an upstream block. The hysteresis value used in Splitter to determine whether to set the target at the locked value. Array of four entries (X11, X12, X21, X22) that defines the setpoint range starting and ending points used in the calculation of OUT_1 (X11 and X12) and OUT_2 (X21 and X22). X11, X12, X21, and X22 are standard industry terms that correlate to the DeltaV parameters IN_ARRAY[1][1], IN_ARRAY[2][1], IN_ARRAY[3][1], and IN_ARRAY[4][1], respectively. Specifies OUT_1 to hold or to be driven to OUT_ARRAY[1][1] when the SP exceeds the upper end of the range defined by IN_ARRAY[2][1]. Parameter used to request and show the source of the setpoint used by the block. The primary output value and status calculated by the block based on SP (in Auto and Cas modes). The primary output value and status calculated by the block based on SP (in Auto and Cas modes). Array of four entries (Y11, Y12, Y21, Y22) that defines the block output range starting and ending points used in the calculation of OUT_1 (Y11 and Y12) and OUT_2 (Y21 and Y22). Y11, Y12, Y21, and Y22 are standard industry terms that correlate to the DeltaV parameters OUT_ARRAY[1][1], OUT_ARRAY[2][1], OUT_ARRAY[3][1], and OUT_ARRAY[4][1], respectively. The block's setpoint value.
BKCAL_IN_2
BKCAL_OUT
EU of SP
BLOCK_ERR
None
CAS_IN HYSTVAL
IN_ARRAY
LOCKVAL
None
None Units of block connected to OUT_1 Units of block connected to OUT_2 None
SP
Supplied by input
283
Parameter SP_RATE_DN
Description Ramp rate at which downward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. Ramp rate at which upward setpoint changes are acted on in Auto mode, in PV units per second. If the ramp rate is set to 0.0, then the setpoint is used immediately. For control blocks, rate limiting applies only in Auto. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. The working setpoint of the block. It is the result of setpoint limiting and setpoint rate of change limiting. The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.* Status options Allows you to select IFS if Bad CAS_IN.* The strategy filed can be used to help group blocks. This data is not checked or processed by the block.*
SP_RATE_UP
SP_WRK ST_REV
STATUS_OPTS STRATEGY
None None
* These parameters are only visible when the function block is located in a Fieldbus device. Note Default values and data type information for the parameters are available by expanding the Parameter View window.
284
Splitter Function Block Diagram Example The following examples illustrate typical uses for the Splitter function block. Application Example: Split Range Control Assume two valves (one for heating and one for cooling) are driven by a single temperature controller. You use the Splitter function block between the controller and two Analog Output (AO) function blocks. When the controller requires heat, the AO block action for the cooling valve does not matter. When the AO block for the heating valve goes to Bad status, the controller is prevented from calling for more heat, but is allowed to call for cooling if required. For this example, you can set up the splitter characterization in the following manner: Splitter Function Block Split Range Control Example Settings Parameter IN_ARRAY[1][1] IN_ARRAY[2][1] IN_ARRAY[3][1] IN_ARRAY[4][1] LOCKVAL OUT_ARRAY[1][1] OUT_ARRAY[2][1] Setting 0 49 51 100 Hold 100 0
285
Setting 0 100
This allows the controller to call for maximum cooling (negative heat) at 0 output and maximum heat at 100 output, with a gap of 2 around 50 to make sure that the heating and cooling valves are not both open at the same time. The following figure graphically represents the settings for this example:
Splitter Function Block Split Ranging Example Application Example: Sequencing Control Assume you must use two valves for control because one valve does not provide enough range for a nonlinear control problem, such as pH control. The small valve controls an expensive reagent in the pH region near neutral; therefore, it must be closed when the pH is away from neutral. The big valve adds caustic, which is too strong to use near a neutral pH. You can use the Splitter function block between the controller and two Analog Output (AO) blocks. As in the preceding example, one AO block can have Bad status without disturbing control when it is not the block required by the pH controller. For this example, you can set up the splitter characterization in the following manner: Splitter Function Block Sequencing Control Example Settings Parameter IN_ARRAY[1][1] IN_ARRAY[2][1] IN_ARRAY[3][1] IN_ARRAY[4][1] LOCKVAL OUT_ARRAY[1][1] OUT_ARRAY[2][1] OUT_ARRAY[3][1] OUT_ARRAY[4][1] Setting 0 40 40 100 OUT_ARRAY[1][1] 0 100 0 100
286
The following figure graphically represents the settings for this example:
Splitter Function Block Sequencing Control Example Application Example: Cascade Fan-out The cascade fan-out scheme is used when a cascade control strategy includes multiple secondary controllers. For example, assume a header pressure controller interacts with two secondary boiler controllers. You use the Splitter function block between the pressure controller and the two boiler master controllers. Header pressure control is maintained when one or both secondary Bias/Gain blocks are in Auto mode. When both secondary blocks are not in Auto mode, the pressure controller output is frozen and initializes to balance the first secondary block that is put into Auto mode. For this example, you can set up the splitter characterization in the following manner: Splitter Function Block Cascade Fan-out Example Settings Parameter IN_ARRAY[1][1] IN_ARRAY[2][1] IN_ARRAY[3][1] IN_ARRAY[4][1] LOCKVAL OUT_ARRAY[1][1] OUT_ARRAY[2][1] OUT_ARRAY[3][1] OUT_ARRAY[4][1] BAL_TIME Setting 0 100 0 100 Hold 0 100 0 100 Four times the pressure controller integral time
287
288
Math Blocks
This chapter contains information on mathematical function blocks in the DeltaV system.
Absolute Value Function Block IN is the input value and status to the block. OUT is the output value and status.
Math Blocks
289
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
290
Add Function Block IN1 through IN[n] are the input values and statuses to the block (as many as 16 inputs allowed). OUT is the output value and status.
Math Blocks
291
The following table shows an example of Add function block outputs based on different input values: Add Function Block Calculation Example Parameter IN1 IN2 IN3 IN4 OUT Example 1 1.0 3.7 4.7 Example 2 1.5 2.5 0.2 3.1 7.3
OUT
Determined by IN
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
292
Math Blocks
293
Arithmetic Function Block Note The value and usage of IN_1 through IN_3 depend on the math function selected. For example, Flow Compensation Approximate uses IN_1, IN_2, and IN_3, whereas Flow Compensation Linear uses only IN_1 and IN_2. Refer to the Advanced Topics - Arithmetic Types topic for a complete list of all math functions and formulas used.
294
Math Blocks
295
Compensation Input Calculations For each of the inputs (IN_1, IN_2, IN_3), there is a gain and bias. The bias can be used to correct for absolute temperature or pressure. The gain can be used to normalize terms within a square root function. The compensation terms (t) are calculated as follows: When IN_(k) is usable: t(k) = GAIN_IN(k)*(BIAS_IN(k) = IN_ (k)) When IN_(k) is not usable, then t(k) gets the value of the last t(k) computed with a usable input.
Application Example The Arithmetic block can be used for pressure and temperature compensation of a gas stream. IN is the measured flow from OUT of an Analog Input function block. IN_1 is the measured pressure, and IN_2 is the measured temperature, both from OUT of an Analog Input function block. If the flowmeter is a differential pressure type, the flow must be linearized in the instrument or in the AI function block. ARITH_TYPE is flow compensation linear if a mass flowmeter is used or flow compensation square root if the flowmeter is differential pressure. BIAS_IN_1 is a factor to convert measured pressure to absolute pressure. If pressure units are PSIG, for example, enter 14.696 for BIAS_IN_1. GAIN_IN_1 is 1 / (reference pressure + factor to convert to absolute pressure). Reference pressure is the calibration pressure for the flowmeter. If the calibration pressure is 50 PSIG, for example, enter 0.01546 for GAIN_IN_1. BIAS_IN_2 is a factor to convert measured temperature to absolute temperature. If temperature units are degF, for example, enter 459.7 for BIAS_IN_2. GAIN_IN_2 is 1 / (reference temperature + factor to convert to absolute temperature). Reference temperature is the calibration temperature for the flowmeter. If the calibration temperature is 350 degF, for example, enter 0.001235 for GAIN_IN_2.
296
If the status of IN is unusable and IN_LO is usable and less than RANGE_HI, then G will be set to zero. (For a definition of G, refer to the Block Execution - Arithmetic Function Block topic.) In each case, the PV will have a status of Good until the condition no longer applies. Otherwise, the status of IN_LO is used for the PV if G is less than 0.5, while IN is used for G greater than or equal to 0.5. The status of PV is copied to PRE_OUT. For complete descriptions of supported input options, refer to the Input Options topic.
ARITH_TYPE
None
BAD_ACTIVE
None
BAD_MASK
None
BAL_TIME
Seconds
BIAS BIAS_IN_1
None None
Math Blocks
297
Description The bias value for IN_2 The bias value for IN_3 The summary of active error conditions associated with the block. The possible block errors are Block configuration error, Simulate active, Local override, Input failure/process variable has Bad status, Output failure, Readback failed, Out of Service, and Other. Each function block reports none or a subset of these error conditions. Determines the high limit of the compensation input Determines the low limit of the compensation input The proportional gain (multiplier) value The proportional gain (multiplier) value for IN_1 The proportional gain (multiplier) value for IN_2 The proportional gain (multiplier) value for IN_3 The analog input value and status. The number of inputs is an extensible parameter in some function blocks. The first analog input value and status
EU of PV_SCALE EU of PV_SCALE None None None None Determined by source or EU of PV_SCALE or EU of IN_SCALE Determined by supplying block or source Determined by supplying block or source Determined by supplying block or source None
IN_1
IN_2
IN_3
IN_LO
298
Parameter INPUT_OPTS
Units None
Description Allow you to set the options for using IN and IN_LO when Uncertain. They also allow you to set the options for using IN_1, IN_2 and IN_3 when any are either Bad or Uncertain. When a particular option is not selected and the status is Bad or Uncertain, the last usable value is used. A value is usable if the status is Good or if the status is not Good but the input option for that status (Bad or Uncertain) is selected to use it. To change the input options while using the on-line view, first change the mode to OOS. The mode record of the block. MODE contains the actual, target, permitted, and normal modes. In some function blocks, this parameter is used to request and show the source of the setpoint, the source of the output, and/or the block operating state. The analog output value and status. The number of outputs is an extensible parameter in some blocks. The maximum output value allowed The minimum output value allowed The calculated result of the selected math function after limiting The process variable used in block execution and alarm limit detection The high limit for IN The low limit for IN. If IN is less than RANGE_LO, then IN_LO is used.
MODE
None
EU of OUT_SCALE or Percent or EU of IN EU of OUT_SCALE or Supplied by IN EU of OUT_SCALE or Supplied by IN EU of PV_SCALE EU of OUT or EU of PV_SCALE or EU of IN_SCALE EU of PV_SCALE EU of PV_SCALE
RANGE_HI RANGE_LO
Math Blocks
299
If there is a divide by zero and the numerator is positive, f is set to COMP_HI; if the numerator is negative, then f is set to COMP_LO. The square root of a negative value will equal the negative of the square root of the absolute value. Imaginary roots are not supported. Flow Compensation Approximate
Btu Flow
If there is a divide by zero and numerator is positive, f will be limited to COMP_HI; if the numerator is negative, f will be limited to COMP_LO.
300
Average
Compensation inputs that are not usable are not included in the calculation. PV is always included. Summer
Compensation inputs that are not configured are not used in the calculation. PV is always used. Fourth Order Polynomial
If there is a divide by zero and the numerator is positive, func will be limited to COMP_HI; if the numerator is negative, func will be limited to COMP_LO.
Math Blocks
301
Comparator Function Block Note If you are using a Condition function block with one check, use this block instead.
302
Math Blocks
303
COMP_VAL2 DISC_VAL
EQ GT IN_RANGE LT NEQ
304
Divide Function Block IN_1 is the input value and status to be divided (numerator). IN_2 is the input value and status of the divisor. OUT is the output value and status.
When IN_2 equals zero, OUT is set to the maximum floating point value.
Math Blocks
305
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
306
The following figure is the function block diagram for this example:
Math Blocks
307
Integrator Function Block IN_1 is the first input value and status. Specify the rate time base for IN_1 with TIME_UNIT1. IN_2 is the second input value and status. Specify the rate time base for IN_2 with TIME_UNIT2. REV_FLOW1 is the discrete input that specifies whether IN_1 is positive or negative. REV_FLOW2 is the discrete input that specifies whether IN_2 is positive or negative. RESET_IN is the discrete input that resets the integrator and holds reset until released. OUT is the integration output value and status. OUT equals TOTAL when the integration type counts up (0 to SP). OUT equals TOTAL when the integration type counts down (SP to 0). OUT_PTRIP is a discrete value that is set when the pre-trip limit value is reached. OUT_PTRIP remains latched until OUT_TRIP latches, then OUT_PTRIP unlatches. OUT_TRIP is a discrete value that is set when the trip target value is reached. OUT_TRIP latches for only one scan, then unlatches. N_RESET is the number of times the integrator is initialized or reset.
308
where t = the elapsed time since previous cycle, in seconds x = the converted IN_1 value (based on the options you configure) y = the converted IN_2 value (based on the options you configure) or 0 when you select not to use a second input OUT[t-1] = the value of OUT from the previous cycle. You can choose integration type options that define the integrate up, integrate down, and reset characteristics of the block. Refer to the Integration Types section below for information on these options. When you select the SP to 0 auto reset or SP to 0 - demand reset integration type option, the following applies: OUT = SP - Integral
Math Blocks
309
Integrator Response to Changing Input Note In the above graph, read PRE_TRIP as the distance below SP where OUT_PRETRIP is set. You can specify how the block executes by configuring input flow and rate time variables, integration type and carryover options as well as trip and pre-trip action. In the above example, IN_1 and RESET are inputs. IN_2 is not connected. Integration proceeds from 0 to SP. From t=0 until ta, there is ramp input. For t>ta, the input drops to a lower constant value. Note the output produced by integrating this input pattern. The ramp input integrates into a parabolic curve between t=0 and t=ta. Beyond ta, the constant input integrates into a ramp output with a constant slope. At tb, OUT reaches the level SP-PRE_TRIP. OUT_PTRIP transitions from 0 to 1. It remains at 1 until tc, where OUT reaches SP. At this point, OUT_PTRIP returns to 0 while OUT_TRIP transitions from 0 to 1. OUT_TRIP remains at 1 for 5 seconds or for the duration of the scan rate if it is greater than 5 seconds. It then returns to 0. At tc, when OUT reaches SP, OUT is reset to 0, and the integration resumes anew. At td, the RESET_IN input transitions to 1, interrupts the integration, and resets OUT to 0. Specifying Rate Time Base The time unit parameters (TIME_UNIT1 and TIME_UNIT2) specify the rate time base of the inputs (IN_1 and IN_2, respectively). The block uses the following equations to compute the integration increment:
310
where x = the converted IN_1 value (based on the options you configure) y = the converted IN_2 value (based on the options you configure) or 0 when you select not to use a second input. The block supports the following options for TIME_UNIT1 and TIME_UNIT2: Seconds (= 1 second) Minutes (1 minute = 60 seconds) Hours (1 hour = 3600 seconds) Days (1 day = 86400 seconds) Setting Reverse Flow at the Inputs Reverse flow is determined by either of the following: The sign of the value at IN_1 or IN_2 The discrete inputs REV_FLOW1 and REV_FLOW_2
When the REV_FLOW input is True, the block interprets the associated IN value as negative. Calculating Net Flow Net flow is calculated by adding the increments calculated for each IN. When ENABLE_IN_2 is False, the increment value for IN_2 is considered 0. When ENABLE_IN_2 is True, the value of IN_2 is used in the calculation. You can determine the net flow direction that is to be included in the integration by configuring the Flow Forward and Flow Reverse integration options parameter (INTEG_OPTS). When Flow Forward is True, positive increments are included. When Flow Reverse is True, negative increments are included. When both Flow Forward and Flow Reverse are True, both positive and negative increments are included. Integration Types The integration type parameter (INTEG_TYPE) defines the integrate up, integrate down, and reset characteristics of the block. You can choose from the following options: 0 to SP - auto reset at SP Integrates from 0 to the setpoint (SP) and automatically resets when SP is reached. 0 to SP - demand reset Integrates from 0 to SP. When OUT is within PRE_TRIP of SP, P_TRIP is set. When OUT reaches SP, TRIP is set and the block continues integrating beyond SP. SP to 0 - auto reset at SP Integrates from SP to 0 and automatically resets when 0 is reached. SP to 0 - demand reset Integrates from SP to 0. When OUT is within PRE_TRIP of 0, then P_TRIP is set. When OUT reaches SP, TRIP is set and the block continues integrating below 0. 0 to ? - periodic reset Counts upward and resets periodically. The period is set by the CLOCK_PER parameter. 0 to ? - demand reset Counts upward and is reset when RESET_IN or OP_CMD_INT transitions to True. 0 to ? - periodic & demand reset Counts upward and is reset periodically or when RESET_IN or the OP_CMD_INT transitions to True. The following table summarizes the trip, pre-trip and reset conditions for each of the mutually exclusive INTEG_TYPE options:
Math Blocks
311
Summary of INTEG_TYPE Conditions INTEG_TYP E 0 to SP - auto reset at SP OUT Automatic Reset Condition Pre-Trip Condition RESET_IN Reset Yes OP_CMD_IN T Reset Yes
TOTAL
0 to SP demand reset
TOTAL
None
Yes
Yes
SP to 0 -auto reset at SP
SP-TOTAL
Yes
Yes
SP to 0 demand reset
SP-TOTAL
None
Yes
Yes
0 to ? periodic reset
TOTAL
None
No
Yes
TOTAL
None
None
Yes
Yes
TOTAL
None
Yes
Yes
Trip and Pre-trip Action When the integration value reaches SP PRE_TRIP (or 0 + PRE_TRIP if the integrator runs from SP to 0), OUT_PTRIP is set. When the integration value reaches the trip target value (SP or 0), OUT_TRIP is set. OUT_PTRIP remains set until integration is reset.
312
Integration Carryover You can enable the Carry integration option (INTEG_OPTS) to carry the excess past the trip point into the next integration cycle as the initial value of the integrator when either of the following integration types is set: 0 to SP - auto reset at SP SP to 0 - auto reset at SP
Note that there must be at least five seconds between resets. SP must be large enough so that it takes more than five seconds for OUT to reach SP.
Math Blocks
313
ABSTOTAL ALERT_KEY
EU of OUT None
BAD_ACTIVE
None
314
Parameter BAD_MASK
Units None
Definition The set of active error conditions that triggers a user-defined Bad condition. The user selects a subset of block error (BLOCK_ERR) conditions in the BAD_MASK parameter. When any of these conditions are True, the BAD_ACTIVE parameter becomes True. When any of the BLOCK_ERR conditions that are not included in BAD_MASK are True, ABNORM_ACTIVE becomes True. The summary of active error conditions associated with the block. The block error for the Integrator function block is Out of Service. Specifies the period for the time-based integration and reset cycle. Specifies whether or not IN_2 is used in the integration (True [1] = use IN_2, False [0] = do not use IN_2). Sets the good limit for PCT_INCL. If PCT_INCL is above this limit, then OUT receives the status, GOOD. The first input value and status. The second input value and status. Integration options. Specify whether positive and/or negative net values are integrated and specifies whether carryover to the next cycle is used. The integration options are Flow Forward, Flow Reverse, and Carry. Integration type. Allows you to specify integration and reset behavior. The integration types are 0 to SP - auto reset at SP, 0 to SP - demand reset, SP to 0 - auto reset at SP, SP to 0 demand reset, 0 to ? - periodic reset, 0 to ? - demand reset, and 0 to ? - periodic and demand reset. Parameter used to show and set the block operating state. The number of times the integrator has been reset. The operator command to reset the integrator. Use either 0 (false/no reset) or 1 (true/reset). The integration output value and status. OUT equals TOTAL when the integration type counts up (0 to SP). OUT equals TOTAL when the integration type counts down (SP to 0). The maximum tolerated duration for power failure.* Discrete output that is set True when the integrated value comes within PRE_TRIP of SP or 0. Discrete output that is set when the integrated value reaches the trip target (SP or 0).
BLOCK_ERR
None
INTEG_TYPE
None
Math Blocks
315
Parameter PCT_INCL PRE_TRIP PULSE_VAL1 PULSE_VAL2 RESET_IN REV_FLOW1 REV_FLOW2 RTOTAL SABSTOTAL SP SRTOTAL SSP STATUS_OPTS STOTAL STRATEGY ST_REV
Units Percent EU of OUT None None None None None Application defined Application defined EU of OUT Application defined None None Application defined None None
Definition Indicates the percentage of integrated values with a GOOD status. The distance before the trip limit where OUT_PTRIP is set. Note that if PRE_TRIP =0, OUT_PTRIP is never set. The factor used to convert IN_1 counts to engineering unit per pulse. The factor used to convert IN_2 counts to engineering unit per pulse. Discrete input that resets the integrator. Discrete input that designates IN_1 as positive or negative. Discrete input that designates IN_2 as positive or negative. The accumulated absolute value of all inputs with rejected statuses (BAD or UNCERTAIN). The value of ABSTOTAL immediately before ABSTOTAL is reset. The block's setpoint value. The value of RTOTAL immediately before RTOTAL is reset. The value of SP immediately before SP is reset. Selectable options for status handling and processing. The value of TOTAL immediately before TOTAL is reset. The strategy filed can be used to help group blocks. This data is not checked or processed by the block.* The revision level of the static data associated with the function block. To support tracking changes in static parameter fields, the associated block's static revision parameter is incremented each time a static parameter field value is changed. Also, the associated block's static revision parameter is incremented if a static parameter field is written but the value is not changed.* Specifies IN_1 rate time base (seconds, minutes, hours, days). Specifies IN_2 rate time base (seconds, minutes, hours, days). The setpoint for a batch totalization.*
316
Definition Sets the uncertain limit for PCT_INCL. If PCT_INCL is below this limit, OUT receives the status, BAD. User-specified numeric conversion factor to scale IN_2 units to IN_1 units. Note Do not include a time factor in the UNIT_CONV value. For example, when IN_1 is liters/hour and IN_2 is gallons/minute, UNIT_CONV = 3.785.
* These parameters are only visible when the function block is located in a Fieldbus device. Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Math Blocks
317
Multiply Function Block IN1 through IN[n] are the input values and statuses to the block (as many as 16 inputs are allowed). OUT is the output value and status.
318
OUT
EU of IN
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
For example, when the input flow (IN1) is 10 lb/min, the output value (OUT) equals 71.97 gal/hr. The following is the function block figure for this example:
Math Blocks
319
Application Example: Applying a Gain Value You can also use the Multiply function block to apply a gain value to a signal. In this case, you connect the signal to IN1 on the block and configure a gain value of 2.0. OUT reflects the signal value multiplied by the gain value.
320
Subtract Function Block IN_1 is the first input value and status. IN_2 is the second input value and status that is subtracted from the first input value. OUT is the output value and status.
Math Blocks
321
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
322
Timer/Counter Blocks
This chapter contains information on timer and counter function blocks in the DeltaV system.
Counter Function Block IN_D is the discrete input value that causes the counter to increment/decrement. RESET_IN is the discrete input value that resets the counter. OUT_D is the discrete output value and status.
Timer/Counter Blocks
323
When COUNTER_TYPE is Down Counter (True or 1): COUNT decreases from PRESET based on IN_D. When COUNT is less than or equal to zero, OUT_D is set True and COUNT holds its value. When RESET_IN is True, COUNT is set to PRESET and OUT_D is set False.
324
When DETECT_TYPE is Count on Rising Edge (False or 0): The counter increments on upward transitions (False-to-True) of IN_D only.
When DETECT_TYPE is Count on TRUE (True or 1): The counter increments every scan that IN_D remains True. The counter value is represented in the COUNT parameter.
Each time COUNTER_TYPE or DETECT_TYPE is changed, the RESET_IN input is set True for one scan to reset the counter. The following figure shows the timed response of the Counter function block for different input and parameter values:
Timer/Counter Blocks
325
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
326
Date Time Event Function Block OUT_D is the discrete output value and status.
Timer/Counter Blocks
327
Daylight Savings Time Adjustments The DTE function block has special behavior during Daylight Saving Time (DST) adjustment periods. In the case where a one-shot event is scheduled for a time that doesn't exist because of a forward DST adjustment, the event does not occur. In the case where a one-shot event is scheduled in the hour preceding a backwards DST adjustment, the second occurrence of the event does not occur. Periodic events are adjusted forward or backward, depending on the DST adjustment. Periodic events are not lost. Relative Time versus Absolute Time The DTE function block generates events based on Absolute Time (local time of day). If you use multiple DTE blocks to create a Relative Time dependency between events and the events straddle the DST adjustment period, the time relationship of the events changes according to the DST adjustment.
328
Description This value forces the function block to the IDLE state, when TRUE. RESET has status. The internal value that indicates the current state of the function block (0=IDLE, 1=ARMED, 2=TERMINAL) The time of day at which an event is scheduled, represented in local ISO Time format. This is known as terminal event or TE time. The current UTC Time represented as an ISO Time string.
UTC_TIME_STR
None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Example 2 Set a timer to output true every day at 5:00 PM local time for a duration of 60 seconds, starting on September 14, 2002. Using Expression Language: /TODTimer1.INTERVAL_STR := "P00001T00:00:00"; /TODTimer1.ENABLE := true; /TODTimer1.TE_TIME_STR := "2002-09-14T05:00:00";
Timer/Counter Blocks
329
Example 3 Set the DTE Timer to activate its OUT_D parameter true one time at 8:55 AM local time on December 9, 2002. Expression usage example: /TODTimer1.INTERVAL_STR := "P00000T00:00:00"; /TODTimer1.ENABLE := true; /TODTimer1.TE_TIME_STR := "2001-12-09T08:55:00"; Example 4 Set the DTE Timer to activate its OUT_D parameter true one time at 8:55 AM UTC time on December 9, 2002. Also, use a module variable to display the time remaining before OUT_D will be activated. Expression usage example: /TODTimer1.INTERVAL_STR := "P00000T00:00:00"; /TODTimer1.ENABLE := true; /DIFF_TIME_STR := TODTimer1.DIFF_TIME_STR; /TODTimer1.TE_TIME_STR := "2001-12-09T08:55:00Z"; Example 5 Use the DTE Timer to display the local time of day in a module variable. Expression usage example: /ISO_TIMESTAMP := /TODTimer1.LOCAL_TIME_STR;
330
Off-Delay Timer Function Block IN_D is the discrete input value and status used to trigger the timed discrete output value. OUT_D is the discrete output value and status. The Off-Delay Timer function block immediately transfers the discrete input value (IN_D) to the output (OUT_D) when IN_D is True (1). When IN_D transitions to False (0), OUT_D is reset to False after a specified time period (TIME_DURATION). During this time period, ELAPSED_TIMER tracks the time starting when IN_D transitions to False until the time specified by TIME_DURATION expires.
Timer/Counter Blocks
331
Off-Delay Timer Function Block Timing Diagram When IN_D is True, OUT_D is set True and the elapsed time counter (ELAPSED_TIMER) is set to zero. When IN_D is False for longer than TIME_DURATION, OUT_D is set False.
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
332
Timer/Counter Blocks
333
On-Delay Timer Function Block IN_D is the discrete input value and status used to trigger the timed discrete output value. OUT_D is the discrete output signal and status. The On-Delay Timer function block immediately transfers the discrete input value (IN_D) to OUT_D when IN_D is False. When IN_D transitions to True, OUT_D is set True after a configured time period (TIME_DURATION). During this time period, ELAPSED_TIMER tracks the time starting when IN_D transitions to True until the time specified by TIME_DURATION expires.
334
On-Delay Timer Function Block Timing Diagram When IN_D is False, OUT_D is set False and the elapsed time counter (ELAPSED_TIMER) is set to zero. When IN_D is True longer than TIME_DURATION, OUT_D is set True.
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Timer/Counter Blocks
335
336
Retentive Timer Function Block IN_D is the discrete input value and status to be timed. RESET_IN is the discrete input value and status used to reset OUT_D and ELAPSED_TIMER. OUT_D is the discrete output value and status.
Timer/Counter Blocks
337
The following figure shows the timed response of the Retentive Timer function block:
338
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Timer/Counter Blocks
339
Timed Pulse Function Block IN_D is the discrete input value and status used to trigger the timed discrete output value. OUT_D is the discrete output value and status.
340
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Timer/Counter Blocks
341
342
The block calculates density for natural gases and other related hydrocarbon gases. For other fluids the density can be manually entered. In addition to calculating instantaneous flow rates the block provides reset-able totalization parameters for base volumetric flow and energy flow.
IN is the differential pressure for an orifice meter in kPa (kilo Pascals) or volumetric flow from a PIN function block for a turbine meter in m3/hr (cubic meters per hour) PRES_IN is the static pressure in kPa (kilo Pascals gage) TEMP_IN is the fluid temperature in C TIMER_ACCUM is the input to reset totalization parameters typically wired from OUT_D of a DTE (Date Time Event) function block MASS_FLW is the instantaneous mass flow rate in kg/hr (kilograms per hour) VOL_FLW_F is the volumetric flow rate at flowing conditions in m3/hr (cubic meters per hour)
343
VOL_FLW_B is the volumetric flow rate at base conditions in m3/hr (cubic meters per hour) ENGY_FLW is the energy flow in GJ/hr (gigajoules per hour)
parameters are calculated whenever GAS_COMP changes. If the fluid is not a natural gas or other hydrocarbon gas whose components are included in GAS_COMP, choose to manually enter the AGA8 parameters. For orifice meters TAP_TYPE specifies the type of differential pressure tap, either Flange, Radius (D-D/2), or Corner taps. The block does not calculate flow rates for pipe taps (2.5D-8D). PRES_TAP specifies the location of the static pressure tap, either Upstream or Downstream of the orifice plate. The AGA3/ISO5167 algorithm calculates the mass flow rate when METER_TYPE is Differential Pressure. The coefficient of discharge is a function of pipe Reynolds number, which is a function of mass flow. Therefore the calculation of mass flow is an iterative one. The parameter ITERATE_LIM3 specifies the maximum number of iterations allowed. The default value is generally sufficient, but may need to be increased for viscous liquids. The entire flow equation is calculated each block execution, so averaging techniques are not necessary. From the mass flow the block uses the base and flowing densities from AGA8 to determine volumetric flow rates at base and flowing conditions. Like AGA3, the AGA8 algorithms are iterative. ITERATE_LIM8 specifies the maximum iterations allowed. If an iteration limit is violated, the condition is indicated in ERROR_STATE, as are any violations of the limits of use for orifice metering (see Status Handling). When METER_TYPE is Turbine, the value on IN is the volumetric flow rate at flowing conditions (expected to be wired from the output of a Pulse Input function block). AGA_SI converts this flow to volumetric flow at base conditions and mass flow using the two density values. Energy flow rate is determined from volumetric flow at base conditions and the volumetric heating value per ISO6976. In the AGA_SI block this is the superior heating value (not inferior) and is for the real gas (not ideal gas). It is based on the mole fractions in GAS_COMP and 15/15 data from ISO6976, which corresponds to a base temperature of 15 C and base pressure of 0.101325 kPa.
Totalization Parameters
The block accumulates base volumetric flow each scan into two parameters, CURR_VOLUME (reset by TIMER_ACCUM) and VOL_ACCUM (reset by RESET_ACCUM). CURR_VOLUME is intended for daily or shift totals. VOL_ACCUM is intended for ad hoc totals to monitor short-term contract usage. The block accumulates energy flow in CURR_ENERGY and flow hours in CURR_HRS_ON. Flow hours is the number of hours of flow through the pipe where VOL_FLW_B is greater than zero. The reset parameter TIMER_ACCUM is intended to be wired from OUT_D of a Date Time Event (DTE) function block, which allows resetting at regular intervals. When TIMER_ACCUM is 0, the block allows the accumulation of CURR_VOLUME, CURR_ENERGY, and CURR_HRS_ON. When greater than 0, the block copies the three CURR_ parameters to the three LAST_ parameters and resets the CURR_ parameters. CURR implies today or this shift or whatever the current period represents. If the Restore parameter values after restart checkbox is selected in the module properties dialog, all of the accumulation parameters retain their current value during a module (partial) download and a controller restart. The accumulation parameters have status (see Status Handling)..
345
Gas Composition Sum Not 100% - The sum of the mole percents in GAS_COMP does not equal 100.00 and AGA8_OPT is Calculate AGA-8 parameters using Detail Method. Contributes to Bad status on the output parameters. Invalid Pipe or Orifice Size Actual beta ratio is less than 0.1 or greater than 0.75, or orifice ID is less than 11.43 mm, or pipe ID is less than 48.26 mm. Applicable when METER_TYPE is Differential Pressure. Contributes to Uncertain status on the output parameters. Reynolds Number Out of Range Calculated pipe Reynolds number is less than 4000. Applicable when METER_TYPE is Differential Pressure. Contributes to Uncertain status on the output parameters. AGA-8 Algo Not Convergent The required iterations exceeded ITERATE_LIM8, thus the AGA8 algorithm did not converge. Applicable when AGA8_OPT is Calculate AGA-8 parameters using Detail Method. Contributes to Bad status on the output parameters (does not affect VOL_FLW_F when METER_TYPE is Turbine). AGA-3 Algo Not Convergent The required iterations exceeded ITERATE_LIM3, thus the AGA3 algorithm did not converge. Contributes to Bad status on the output parameters.
The status of the output parameters is set to the worst of the status of the input parameters and the status based on ERROR_STATE. The status of the accumulation parameters is Good until a value accumulated has Bad or Uncertain status. At that point the accumulation parameter has Uncertain status until it is reset. There is a corresponding PCT_ parameter for each accumulation parameter. For example, CURR_VOLUME has PCT_CURR_VOLUME. The PCT_ parameter contains the percentage of the total in the corresponding parameter where the value being accumulated had Good status.
346
COMP_SUM
None
CURR_ENERGY CURR_HRS_ON
GJ (gigajoules) Hours
CURR_VOLUME
m3 (cubic meters)
347
Parameter DEN_BASE
Description Mass density at base conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Mass density at flowing conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Instantaneous energy flow. Indicates that an error condition is active (0 = no error, 1 = an error condition is active). The error is defined as text in ERROR_STATE. The error state of the block. When other than Clear indicates the validity of the calculations is questionable: - Gas Composition Sum Not 100% - The sum of the mole percents in GAS_COMP does not equal 100.0 and AGA8_OPT is Calculate AGA-8 parameters using Detail Method. Results in Bad status on output parameters. - Invalid Pipe or Orifice Size Actual beta ratio is less than 0.1 or greater than 0.75, or orifice ID is less than 11.43mm, or pipe ID is less than 48.26mm. Applicable when METER_TYPE is Differential Pressure. - Reynolds Number Out of Range Calculated pipe Reynolds number is less than 4000. Applicable when METER_TYPE is Differential Pressure. - AGA-8 Algo Not Convergent The required iterations exceeded ITERATE_LIM8, thus the AGA8 algorithm did not converge. Applicable when AGA8_OPT is Calculate AGA-8 parameters using Detail Method. - AGA-3 Algo Not Convergent The required iterations exceeded ITERATE_LIM3, thus the AGA3 algorithm did not converge. Supercompressibility factor, the square root of the ratio of the compressibility factors (base to flowing). Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered.
DEN_FLW
ENGY_FLW ERROR_ACT
ERROR_STATE
N/A
F_PV
N/A
348
Parameter GAS_COMP
Description An array containing the mole fractions of 21 gas components. 1) Methane 2) Nitrogen 3) Carbon Dioxide 4) Ethane 5) Propane 6) Water 7) Hydrogen Sulfide 8) Hydrogen 9) Carbon Monoxide 10) Oxygen 11) i-Butane 12) n-Butane 13) i-Pentane 14) n-Pentane 15) n-Hexane 16) n-Heptane 17) n-Octane 18) n-Nonane 19) n-Decane 20) Helium 21) Argon Volumetric heating value. Calculated per ISO6976 from the mole fractions in GAS_COMP, the superior calorific values of the components, and compressibility factors of the components (15/15 data). When METER_TYPE is Differential Pressure, IN is the measured differential pressure. When METER_TYPE is Turbine, IN is the volumetric flow from a Pulse Input function block.
HTG_VAL
MJ/m3 (megajoules per cubic meter) kPa (kilo Pascals [differential pressure], m3/hr (cubic meters per hour [turbine]) N/A
IN
IS_EXP
Isentropic exponent of the natural gas or other fluid. Enter the value at expected flowing conditions. The default value is reasonable for natural gases. For an incompressible fluid enter 1.0. Not used when METER_TYPE is Turbine. The number of iterations limit for the AGA3 /ISO5167 mass flow calculation The number of iterations limit for the AGA8 density and compressibility factor calculations. The total accumulation of energy flow at the time of the last reset (using TIMER_ACCUM). The total accumulation of time with flow through the pipe at the time of the last reset (using TIMER_ACCUM.
349
Units m3 (cubic meters) kPa (kilo Pascals gage) kg/hr (kilograms per hour) N/A mm (millimeters)
Description The total accumulation of base volumetric flow at the time of the last reset (using TIMER_ACCUM). Value of IN (differential pressure) below which flow is assumed to be zero. Not applicable when METER_TYPE is Turbine. Instantaneous mass flow. Meter type for flow measurement. The value can be Differential Pressure or Turbine. Orifice plate bore diameter at reference temperature ORIF_TEMP. Not applicable when METER_TYPE is Turbine. Orifice plate material. The value can be Stainless Steel, Monel, or Carbon Steel. Not applicable when METER_TYPE is Turbine. Reference temperature for the orifice plate. Not applicable when METER_TYPE is Turbine. The percentage of the total in CURR_ENERGY where ENGY_FLW had Good status when the value was accumulated. The percentage of the total time in CURR_HRS_ON where VOL_FLW_F had Good status when the time was accumulated. The percentage of the total in CURR_VOLUME where VOL_FLW_B had Good status when the value was accumulated. The percentage of the total in VOL_ACCUM where VOL_FLW_B had Good status when the value was accumulated. The percentage of the total in LAST_ENERGY where ENGY_FLW had Good status when the value was accumulated. The percentage of the total time in LAST_HRS_ON where VOL_FLW_F had Good status when the time was accumulated. The percentage of the total in LAST_VOLUME where VOL_FLW_B had Good status when the value was accumulated. Pipe internal diameter at reference temperature PIPE_TEMP.
ORIF_MAT
N/A
ORIF_TEMP PCT_CURR_ENERGY
C Percent
PCT_CURR_HRS_ON
Percent
PCT_CURR_VOLUME
Percent
PCT_VOL_ACCUM
Percent
PCT_LAST_ENERGY
Percent
PCT_LAST_HRS_ON
Percent
PCT_LAST_VOLUME
Percent
PIPE_ID
mm (millimeters)
350
Description Pipe material. The value can be Stainless Steel, Monel, or Carbon Steel. Reference temperature for the pipe ID measurement. The amount PRES_IN must differ from its value at the time of the previous AGA-8 calculation to trigger another AGA8 calculation. Measured static pressure Location of the static pressure tap, either Upstream or Downstream of the orifice plate. Not applicable when METER_TYPE is Turbine. Calculated Pipe Reynolds number. Real gas relative density (specific gravity). Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Resets VOL_ACCUM when greater than zero, then the block changes RESET_ACCUM back to zero. Orifice meter tap type, either Flange Taps, Radius Taps (DD/2), or Corner Taps. How much TEMP_IN must change from the last AGA8 calculation temperature in order to trigger another AGA8 calculation. Measured temperature. When 0, allows the accumulation of CURR_VOLUME, CURR_ENERGY, and CURR_HRS_ON. When greater than 0, copies the three CURR_ parameters to the three LAST_ parameters and resets the CURR_ parameters. TIMER_ACCUM is typically wired from a Date Time Event function block. The absolute viscosity of the natural gas or other fluid. Enter the value at expected flowing conditions based on laboratory analysis or other method. Accumulation of volumetric flow at base conditions. It is reset using RESET_ACCUM, which is expected to be done manually at irregular time intervals. Similar to CURR_VOLUME, which is also an accumulation of base volumetric flow, but CURR_VOLUME expected to be reset automatically at regular time intervals (using TIMER_ACCUM).
PRES_IN PRES_TAP
RE_NUM REL_DEN
N/A N/A
N/A N/A C
TEMP_IN TIMER_ACCUM
C N/A
VISCOSITY
VOL_ACCUM
351
Units m3/hr (cubic meters per hour) m3/hr (cubic meters per hour) N/A
Description Instantaneous volumetric flow at base conditions. Instantaneous volumetric flow at flowing conditions. Compressibility factor at base conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Compressibility factor at flowing conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered.
ZF
N/A
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
With an orifice meter choose Differential Pressure as the METER_TYPE and wire the IN input from an Analog Input function block connected to a differential pressure transmitter. The engineering units must be kPa (kilo Pascals gage). With a turbine meter wire the IN input from a Pulse Input function block. OUT of the PIN block must in units of cubic meters per hour. Therefore the PULSE_VAL in the PIN block must be in units of cubic meters per pulse (inverse of the K-Factor) and TIME_UNITS must be Hours. If the fluid is natural gas or related hydrocarbon gas, choose the default value for AGA8_OPT so that the block calculates the base and flowing densities of the gas per AGA8 and the report parameters (base and flowing compressibility factors, supercompressibility, and relative density). The block also calculates the volumetric heating value of the gas (per ISO6976). If the fluid is a liquid or other gas, use AGA8_OPT to choose to manually enter these parameters. Typically you would enter the two densities and leave the other parameters at their default value. If the notion of energy is applicable, enter the volumetric heating value of the fluid at base conditions. Runtime Limits for AGA8 Calculations The AGA block does not check the input parameter limits for the AGA8 calculations at runtime. If any of the following parameters exceed the limits stated, calculations may not be accurate.
352
The limits are are exceeded if: BASE_TEMP less than 0 C BASE_TEMP greater than 25 C BASE_PRES less than 90 kPa BASE_PRES greater than 110 kPa DEN_BASE zero or negative TEMP_IN less than -130.0 C TEMP_IN greater than 400.0 C PRESS_IN greater than 280.0 kPa GAS_COMP [1] (Methane) less than 45.0 [2] (Nitrogen) greater than 50.0 [3] (Carbon Dioxide) greater than 30.0 [4] (Ethane) greater than 10.0 [5] (Propane) greater than 4.0 [6] (Water) greater than 0.05 [7] (Hydrogen Sulfide) greater than 0.02 [8] (Hydrogen) greater than 10.0 [9] (Carbon Monoxide) greater than 3.0 [10] (Oxygen) greater than 21.0 [11] (i-Butane) + [12] (n-Butane) greater than 1.0 [13] (i-Pentane) + [14] (n-Pentane) greater than 0.3 [15] (Hexane) + [16] (Heptane) + [17] Octane + [18] Nonane + [19] (Decane) greater than 0.2 [20] (Helium) greater than 0.2 [21] (Argon) greater than 1.0
Other considerations When you choose for the block to calculate the AGA8 parameters, configure the base temperature and pressure and enter the mole fractions of the components in GAS_COMP as percents. If you interface to an online gas chromatograph, use a Calc block expression to assign the value of the elements of GAS_COMP. For example, to assign the Methane mole percent '^/AGA_SI1/GAS_COMP[1][1]' := '//GC01/R30001.CV'; where GC01 is the DST for a serial dataset To assign the Nitrogen mole percent '^/AGA_SI1/GAS_COMP[2][1]' := '//GC01/R30002.CV'; where GC01 is the DST for a serial dataset If necessary, modify the value of one component before writing to GAS_COMP so that the sum of components is 100%. If the sum is not between 99.995 and 100.005, an error will occur in ERROR_STATE and the status of the outputs will be Bad. Enter the absolute viscosity of the fluid at expected flowing conditions in the parameter VISCOSITY based on a laboratory analysis, calculation, or published data. The block does not calculate viscosity. The default value is reasonable for a natural gas. For orifice meters the value of viscosity impacts the calculated mass flow rate. For turbine meters viscosity is used only to calculate the pipe Reynolds number (which is also true for PIPE_ID, PIPE_MAT, and PIPE_TEMP).
353
For orifice meters enter a value for the isentropic exponent of the fluid in the parameter IS_EXP. This is the ratio of specific heats (constant pressure to constant volume). The default value is reasonable for natural gases. For an incompressible fluid enter a value of 1.0. The block does not use IS_EXP for turbine meters. To reset the accumulation parameters CURR_VOLUME, CURR_ENERGY, and CURR_HRS_ON wire the TIMER_ACCUM input from the output of a Date Time Event function block. Configure the DTE block to produce a rising edge on its OUT_D parameter at the contract hour each day or at whatever interval you wish to reset the parameters. Configure the DTE block by setting INTERVAL_STR to the desired number of days, hours, minutes, or seconds between resets, for example P00001T00:00:00 for resetting daily or P00000T08:00:00 for resetting every eight hours. Then set TE_TIME_STR to the first time you want a reset to occur (in local time), for example, 2002-1225T09:00:00 if the contract hour is 9 am. When TE_TIME_STR is a time in the past, the DTE block knows how to properly arm itself for the next reset upon any download. Using AGA_SI with DeltaV Operate DeltaV Operate has a dynamo set called AGA containing a group display faceplate for the AGA_SI (and AGA_US) block. The faceplate shows operating parameters for the block and is applicable for orifice and turbine meters (the IN parameter value is not visible when METER_TYPE is Turbine). In configure mode drag the dynamo onto a picture. Enter the path for the AGA_SI function block in the edit dialog. Also included in the dynamo set is a header for the faceplate. The header includes the module tag and module description. Drag the dynamo onto the picture and position it above the faceplate. Enter the module path in the edit dialog.
354
The block calculates density for natural gases and other related hydrocarbon gases. For other fluids the density can be manually entered. In addition to calculating instantaneous flow rates the block provides reset-able totalization parameters for base volumetric flow and energy flow.
IN is the differential pressure (orifice meter) in inH2O at 68 F or volumetric flow from a PIN function block (turbine meter) in ft3/hr PRES_IN is the static pressure in psig TEMP_IN is the fluid temperature in F TIMER_ACCUM is the input to reset totalization parameters typically wired from OUT_D of a DTE (Date Time Event) function block MASS_FLW is the instantaneous mass flow rate in lb/hr VOL_FLW_F is the volumetric flow rate at flowing conditions in ft3/hr VOL_FLW_B is the volumetric flow rate at base conditions in ft3/hr ENGY_FLW is the energy flow in MMBTU/hr
355
356
For orifice meters TAP_TYPE specifies the type of differential pressure tap, either Flange, Radius (D-D/2), or Corner taps. The block does not calculate flow rates for pipe taps (2.5D-8D). PRES_TAP specifies the location of the static pressure tap, either Upstream or Downstream of the orifice plate. The AGA3/ISO5167 algorithm calculates the mass flow rate when METER_TYPE is Differential Pressure. The coefficient of discharge is a function of pipe Reynolds number, which is a function of mass flow. Therefore the calculation of mass flow is an iterative one. The parameter ITERATE_LIM3 specifies the maximum number of iterations allowed. The default value is generally sufficient, but may need to be increased for viscous liquids. The entire flow equation is calculated each block execution, so averaging techniques are not necessary. From the mass flow the block uses the base and flowing densities from AGA8 to determine volumetric flow rates at base and flowing conditions. Like AGA3, the AGA8 algorithms are iterative. ITERATE_LIM8 specifies the maximum iterations allowed. If an iteration limit is violated, the condition is indicated in ERROR_STATE, as are any violations of the limits of use for orifice metering (see Status Handling). When METER_TYPE is Turbine, the value on IN is the volumetric flow rate at flowing conditions (expected to be wired from the output of a Pulse Input function block). AGA_US converts this flow to volumetric flow at base conditions and mass flow using the two density values. Energy flow rate is determined from volumetric flow at base conditions and the volumetric heating value per ISO6976. In the AGA_US block this is the superior heating value (not inferior) and is for the real gas (not ideal gas). It is based on the mole fractions in GAS_COMP and 15/15 data from ISO6976, which corresponds to a base temperature of 59 F and base pressure of 14.696 psig.
Totalization Parameters
The block accumulates base volumetric flow each scan into two parameters, CURR_VOLUME (reset by TIMER_ACCUM) and VOL_ACCUM (reset by RESET_ACCUM). CURR_VOLUME is intended for daily or shift totals. VOL_ACCUM is intended for ad hoc totals to monitor short-term contract usage. The block accumulates energy flow in CURR_ENERGY and flow hours in CURR_HRS_ON. Flow hours is the number of hours of flow through the pipe where VOL_FLW_B is greater than zero. The reset parameter TIMER_ACCUM is intended to be wired from OUT_D of a Date Time Event (DTE) function block, which allows resetting at regular intervals. When TIMER_ACCUM is 0, the block allows the accumulation of CURR_VOLUME, CURR_ENERGY, and CURR_HRS_ON. When greater than 0, the block copies the three CURR_ parameters to the three LAST_ parameters and resets the CURR_ parameters. CURR implies today or this shift or whatever the current period represents. If the Restore parameter values after restart checkbox is selected in the module properties dialog, all of the accumulation parameters retain their current value during a module (partial) download and a controller restart. The accumulation parameters have status (see Status Handling)..
357
When ERROR_STATE is other than Clear, it impacts the status of output parameters. The error states include: Gas Composition Sum Not 100% - The sum of the mole percents in GAS_COMP does not equal 100.00 and AGA8_OPT is Calculate AGA-8 parameters using Detail Method. Contributes to Bad status on the output parameters. Invalid Pipe or Orifice Size Actual beta ratio is less than 0.1 or greater than 0.75, or orifice ID is less than 0.45 inches, or pipe ID is less than 1.9 inches. Applicable when METER_TYPE is Differential Pressure. Contributes to Uncertain status on the output parameters. Reynolds Number Out of Range Calculated pipe Reynolds number is less than 4000. Applicable when METER_TYPE is Differential Pressure. Contributes to Uncertain status on the output parameters. AGA-8 Algo Not Convergent The required iterations exceeded ITERATE_LIM8, thus the AGA8 algorithm did not converge. Applicable when AGA8_OPT is Calculate AGA-8 parameters using Detail Method. Contributes to Bad status on the output parameters (does not affect VOL_FLW_F when METER_TYPE is Turbine). AGA-3 Algo Not Convergent The required iterations exceeded ITERATE_LIM3, thus the AGA3 algorithm did not converge. Contributes to Bad status on the output parameters.
The status of the output parameters is set to the worst of the status of the input parameters and the status based on ERROR_STATE. The status of the accumulation parameters is Good until a value accumulated has Bad or Uncertain status. At that point the accumulation parameter has Uncertain status until it is reset. There is a corresponding PCT_ parameter for each accumulation parameter. For example, CURR_VOLUME has PCT_CURR_VOLUME. The PCT_ parameter contains the percentage of the total in the corresponding parameter where the value being accumulated had Good status.
358
COMP_SUM
None
CURR_ENERGY CURR_HRS_ON
CURR_VOLUME
359
Parameter DEN_BASE
Description Mass density at base conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Mass density at flowing conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Instantaneous energy flow. Indicates that an error condition is active (0 = no error, 1 = an error condition is active). The error is defined as text in ERROR_STATE. The error state of the block. When other than Clear indicates the validity of the calculations is questionable: - Gas Composition Sum Not 100% - The sum of the mole percents in GAS_COMP does not equal 100.0 and AGA8_OPT is Calculate AGA-8 parameters using Detail Method. - Invalid Pipe or Orifice Size Actual beta ratio is less than 0.1 or greater than 0.75, or orifice ID is less than 0.45 inches, or pipe ID is less than 1.9 inches. Applicable when METER_TYPE is Differential Pressure. - Reynolds Number Out of Range Calculated pipe Reynolds number is less than 4000. Applicable when METER_TYPE is Differential Pressure. - AGA-8 Algo Not Convergent The required iterations exceeded ITERATE_LIM8, thus the AGA8 algorithm did not converge. Applicable when AGA8_OPT is Calculate AGA-8 parameters using Detail Method. - AGA-3 Algo Not Convergent The required iterations exceeded ITERATE_LIM3, thus the AGA3 algorithm did not converge. . Supercompressibility factor, the square root of the ratio of the compressibility factors (base to flowing). Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered.
DEN_FLW
ENGY_FLW ERROR_ACT
ERROR_STATE
N/A
F_PV
N/A
360
Parameter GAS_COMP
Description An array containing the mole fractions of 21 gas components. - Methane - Nitrogen - Carbon Dioxide - Ethane - Propane - Water - Hydrogen Sulfide - Hydrogen - Carbon Monoxide - Oxygen - i-Butane - n-Butane - i-Pentane - n-Pentane - n-Hexane - n-Heptane - n-Octane - n-Nonane - n-Decane - Helium - Argon Volumetric heating value. Calculated per ISO6976 from the mole fractions in GAS_COMP, the superior calorific values of the components, and compressibility factors of the components (15/15 data). When METER_TYPE is Differential Pressure, IN is the measured differential pressure. When METER_TYPE is Turbine, IN is the volumetric flow from a Pulse Input function block. Note: To convert differential pressure in psi to inH2O at 68 F multiply by 27.730. To convert differential pressure from inH2O at 60 F to inH2O at 68 F multiply by 1.00083 Isentropic exponent of the natural gas or other fluid. Enter the value at expected flowing conditions. The default value is reasonable for natural gases. For an incompressible fluid enter 1.0. Not used when METER_TYPE is Turbine. The number of iterations limit for the AGA3 /ISO5167 mass flow calculation. The number of iterations limit for the AGA8 density and compressibility factor calculations. The total accumulation of energy flow at the time of the last reset (using TIMER_ACCUM).
HTG_VAL
IN
inH2O at 68 F (inches of water) [differential pressure], ft3/hr (cubic feet per hour) [turbine]
IS_EXP
N/A
361
Description The total accumulation of time with flow through the pipe at the time of the last reset (using TIMER_ACCUM. The total accumulation of base volumetric flow at the time of the last reset (using TIMER_ACCUM). Value of IN (differential pressure) below which flow is assumed to be zero. Not applicable when METER_TYPE is Turbine. Instantaneous mass flow. Meter type for flow measurement. The value can be Differential Pressure or Turbine. Orifice plate bore diameter at reference temperature ORIF_TEMP. Not applicable when METER_TYPE is Turbine. Orifice plate material. The value can be Stainless Steel, Monel, or Carbon Steel. Not applicable when METER_TYPE is Turbine. Reference temperature for the orifice plate. Not applicable when METER_TYPE is Turbine. The percentage of the total in CURR_ENERGY where ENGY_FLW had Good status when the value was accumulated. The percentage of the total time in CURR_HRS_ON where VOL_FLW_F had Good status when the time was accumulated. The percentage of the total in CURR_VOLUME where VOL_FLW_B had Good status when the value was accumulated. The percentage of the total in VOL_ACCUM where VOL_FLW_B had Good status when the value was accumulated. The percentage of the total in LAST_ENERGY where ENGY_FLW had Good status when the value was accumulated. The percentage of the total time in LAST_HRS_ON where VOL_FLW_F had Good status when the time was accumulated. The percentage of the total in LAST_VOLUME where VOL_FLW_B had Good status when the value was accumulated.
ORIF_MAT
N/A
F Percent
Percent
PCT_CURR_VOLUM E PCT_VOL_ACCUM
Percent
Percent
PCT_LAST_ENERGY
Percent
PCT_LAST_HRS_ON
Percent
PCT_LAST_VOLUM E
Percent
362
Units inches N/A F psi (pounds per square inch) psig (pounds per square inch gage) N/A
Description Pipe internal diameter at reference temperature PIPE_TEMP. Pipe material. The value can be Stainless Steel, Monel, or Carbon Steel. Reference temperature for the pipe ID measurement. The amount PRES_IN must differ from its value at the time of the previous AGA-8 calculation to trigger another AGA8 calculation. Measured static pressure Location of the static pressure tap, either Upstream or Downstream of the orifice plate. Not applicable when METER_TYPE is Turbine. Calculated Pipe Reynolds number. Real gas relative density (specific gravity). Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Resets VOL_ACCUM when greater than zero, then the block changes RESET_ACCUM back to zero. Orifice meter tap type, either Flange Taps, Radius Taps (DD/2), or Corner Taps. How much TEMP_IN must change from the last AGA8 calculation temperature in order to trigger another AGA8 calculation. Measured temperature. When 0, allows the accumulation of CURR_VOLUME, CURR_ENERGY, and CURR_HRS_ON. When greater than 0, copies the three CURR_ parameters to the three LAST_ parameters and resets the CURR_ parameters. TIMER_ACCUM is typically wired from a Date Time Event function block. The absolute viscosity of the natural gas or other fluid. Enter the value at expected flowing conditions based on laboratory analysis or other method.
PRES_IN PRES_TAP
RE_NUM REL_DEN
N/A N/A
N/A N/A F
TEMP_IN TIMER_ACCUM
F N/A
VISCOSITY
363
Parameter VOL_ACCUM
Description Accumulation of volumetric flow at base conditions. It is reset using RESET_ACCUM, which is expected to be done manually at irregular time intervals. Similar to CURR_VOLUME, which is also an accumulation of base volumetric flow, but CURR_VOLUME is expected to be reset automatically at regular time intervals (using TIMER_ACCUM). Instantaneous volumetric flow at base conditions. Instantaneous volumetric flow at flowing conditions. Compressibility factor at base conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered. Compressibility factor at flowing conditions. Calculated when AGA8_OPT is Calculate AGA-8 parameters using Detail Method, otherwise retains its previous value or the value as entered.
VOL_FLW_B VOL_FLW_F ZB
ft3/hr (cubic feet per hour) ft3/hr (cubic feet per hour) N/A
ZF
N/A
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
With an orifice meter choose Differential Pressure as the METER_TYPE and wire the IN input from an Analog Input function block connected to a differential pressure transmitter. The engineering units must be inH2O at 68 F. Convert the AI block output prior to IN if necessary. To convert differential pressure in psi to inH2O at 68 F multiply by 27.730. To convert differential pressure from inH2O at 60 F to inH2O at 68 F multiply by 1.00083. With a turbine meter wire the IN input from a Pulse Input function block. OUT of the PIN block must in units of cubic feet per hour. Therefore the PULSE_VAL in the PIN block must be in units of cubic feet per pulse (inverse of the K-Factor) and TIME_UNITS must be Hours. If the fluid is natural gas or related hydrocarbon gas, choose the default value for AGA8_OPT so that the block calculates the base and flowing densities of the gas per AGA8 and the report parameters (base and flowing compressibility factors, supercompressibility, and relative density). The block also calculates the volumetric heating value of the gas (per ISO6976).
364
If the fluid is a liquid or other gas, use AGA8_OPT to choose to manually enter these parameters. Typically you would enter the two densities and leave the other parameters at their default value. If the notion of energy is applicable, enter the volumetric heating value of the fluid at base conditions. Runtime Limits for AGA8 Calculations The AGA block does not check the input parameter limits for the AGA8 calculations at runtime. If any of the following parameters exceed the limits stated, calculations may not be accurate. The limits are exceeded if: BASE_TEMP less than 32 F BASE_TEMP greater than 77 F BASE_PRES less than 13 psig BASE_PRES greater than 16 psig DEN_BASE zero or negative TEMP_IN less than -200.0 F TEMP_IN greater than 760.0 F PRESS_IN greater than 40000.0 psig GAS_COMP [1] (Methane) less than 45.0 [2] (Nitrogen) greater than 50.0 [3] (Carbon Dioxide) greater than 30.0 [4] (Ethane) greater than 10.0 [5] (Propane) greater than 4.0 [6] (Water) greater than 0.05 [7] (Hydrogen Sulfide) greater than 0.02 [8] (Hydrogen) greater than 10.0 [9] (Carbon Monoxide) greater than 3.0 [10] (Oxygen) greater than 21.0 [11] (i-Butane) + [12] (n-Butane) greater than 1.0 [13] (i-Pentane) + [14] (n-Pentane) greater than 0.3 [15] (Hexane) + [16] (Heptane) + [17] Octane + [18] Nonane + [19] (Decane) greater than 0.2 [20] (Helium) greater than 0.2 [21] (Argon) greater than 1.0
Other considerations When you choose for the block to calculate the AGA8 parameters, configure the base temperature and pressure and enter the mole fractions of the components in GAS_COMP as percents. If you interface to an online gas chromatograph, use a Calc block expression to assign the value of the elements of GAS_COMP. For example, to assign the Methane mole percent '^/AGA_US1/GAS_COMP[1][1]' := '//GC01/R30001.CV'; where GC01 is the DST for a serial dataset^/AGA_US1/ GAS_COMP[1][1]' := '//GC01/R30001.CV'; where GC01 is the DST for a serial dataset To assign the Nitrogen mole percent '^/AGA_US1/GAS_COMP[2][1]' := '//GC01/R30002.CV'; where GC01 is the DST for a serial dataset
365
If necessary, modify the value of one component before writing to GAS_COMP so that the sum of components is 100%. If the sum is not between 99.995 and 100.005, an error will occur in ERROR_STATE and the status of the outputs will be Bad. Enter the absolute viscosity of the fluid at expected flowing conditions in the parameter VISCOSITY based on a laboratory analysis, calculation, or published data. The block does not calculate viscosity. The default value is reasonable for a natural gas. For orifice meters the value of viscosity impacts the calculated mass flow rate. For turbine meters viscosity is used only to calculate the pipe Reynolds number (which is also true for PIPE_ID, PIPE_MAT, and PIPE_TEMP). For orifice meters enter a value for the isentropic exponent of the fluid in the parameter IS_EXP. This is the ratio of specific heats (constant pressure to constant volume). The default value is reasonable for natural gases. For an incompressible fluid enter a value of 1.0. The block does not use IS_EXP for turbine meters. To reset the accumulation parameters CURR_VOLUME, CURR_ENERGY, and CURR_HRS_ON wire the TIMER_ACCUM input from the output of a Date Time Event function block. Configure the DTE block to produce a rising edge on its OUT_D parameter at the contract hour each day or at whatever interval you wish to reset the parameters. Configure the DTE block by setting INTERVAL_STR to the desired number of days, hours, minutes, or seconds between resets, for example, P00001T00:00:00 for resetting daily or P00000T08:00:00 for resetting every eight hours. Then set TE_TIME_STR to the first time you want a reset to occur (in local time), for example, 2002-1225T09:00:00 if the contract hour is 9 am. When TE_TIME_STR is a time in the past, the DTE block knows how to properly arm itself for the next reset upon any download. Using AGA_US with DeltaV Operate DeltaV Operate has a dynamo set called AGA containing a group display faceplate for the AGA_US (and AGA_SI) block. The faceplate shows operating parameters for the block and is applicable for orifice and turbine meters (the IN parameter value is not visible when METER_TYPE is Turbine). In configure mode drag the dynamo onto a picture. Enter the path for the AGA_US function block in the edit dialog. Also included in the dynamo set is a header for the faceplate. The header includes the module tag and module description. Drag the dynamo onto the picture and position it above the faceplate. Enter the module path in the edit dialog.
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
Logical Blocks
This chapter contains information on logical function blocks in the DeltaV system.
Action Function Block IN_D is the discrete input value and status that initiates expression evaluation.
Logical Blocks
381
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Assume you want the operator to be able to choose to run the tank level controller in Auto or Man mode when one or two ingredients are being pumped. However, when three ingredients are being pumped, you want the tank level controller to be forced to Auto mode at a predefined setpoint of 95%. You use two Action function blocks to enforce these requirements, as shown in the following function block diagram:
Action Function Block Diagram Example When all three pumps are on, the output of the And function block is True (1). This triggers the two Action blocks to execute their expressions. You configure the following expression in the FORCE_AUTO Action block to set the TANK_LEVEL PID controller target mode to Auto: '/TANK_LEVEL/MODE.TARGET' := AUTO;You configure the following expression in the FORCE_SP Action block to set the TANK_LEVEL PID controller setpoint to 95%: '/TANK_LEVEL/SP.CV' := 95.0;The Action function block expressions continue to execute as long as all three pumps are running and any operator attempt to change the TANK_LEVEL controller mode or setpoint is overridden.
Logical Blocks
383
And Function Block IN_D1 through IN_D[n] are the discrete input values and statuses (as many as 16 inputs). OUT_D is the discrete output value and status.
384
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Logical Blocks
385
Bi-directional Trigger Function Block IN_D is the discrete input signal and status. OUT_D is the discrete output signal and status.
386
The following figure illustrates how the Bi-directional Edge Trigger function block responds to a change in input:
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Logical Blocks
387
Boolean Fan Input (BFI) Function Block RESET_IN is the input that, when True (1), clears FIRST_OUT and activates the trap condition after all the inputs go False. IN_D1 through IN_D[n] are the discrete input values and statuses (as many as 16 inputs). OUT_INT is the unsigned 32-bit binary weighted output value that represents the bit combination of the inputs (IN_D). OUT_D is the output value that represents the logical OR of the inputs (IN_D). FIRST_OUT is the binary weighted output of the discrete input values when one or more inputs is set after RESET_IN is set.
388
Logical Blocks
389
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
390
Boolean Fan Output (BFO) Function Block IN_INT is the unsigned 32-bit binary weighted input value and status. OUT_D1 through OUT_D[n] are the discrete output values and statuses (as many as 16 outputs) that represent the bit of the input.
Logical Blocks
391
The following is an example of Boolean Fan Output function block execution for IN_INT = 5153.
0 OUT _D16 0 OUT _D15 0 OUT _D14 1 OUT _D13 0 OUT _D12 1 OUT _D11 0 OUT _D10 0 OUT _D9 0 OUT _D8 0 OUT _D7 1 OUT_ D6 0 OUT_ D5 0 OUT_ D4 0 OUT_ D3 0 OUT_ D2 1 OUT_ D1
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Application Information
You can use the Boolean Fan Output function block to optimize data communication between two controllers. To do this, you use a Boolean Fan Input block on one controller to condense discrete values into an integer. Next, you send the integer value to a Boolean Fan Output function block on the other controller to expand the integer to its original discrete representation.
392
Condition Function Block OUT_D is the discrete output value and status.
Logical Blocks
393
ERROR_OPT
None
TIME_DURATION TIMER
Seconds Seconds
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
394
Condition Function Block Application Example Assume the reaction is considered a runaway when the temperature is greater than 400F for longer than five minutes. When this condition occurs, the SV100 valve must be opened to allow operation of the flushing system. You use a Condition function block to monitor for this condition and to send a signal to start the flushing operation. The following figure is the function block diagram for this example:
Logical Blocks
395
When the temperature exceeds 400F, the condition evaluates as True (1). When the condition remains True for more than 5 minutes (300 sec), OUT_D is set True. This signals the DO function block to open the SV100 valve and begin the flushing operation. You configure the following expression in the Condition function block for this application: REM Return True when reaction temperature is greater than 400 REM degrees, otherwise return False '/TT102/PV.CV' > 400.0 When the reaction is slowed and the temperature drops below 400F, the condition evaluates as False (0) and OUT_D is False. This signals the DO function block to shut the flushing system valve.
396
Device Control Function Block CAS_IN_D is the discrete value and status of a setpoint from another block used when the block is in Cascade mode. SHUTDOWN_D is the Emergency Stop discrete value and status input that forces and holds the device in the Passive state. PERMISSIVE_D is the optional discrete input value and status that must be True when the Permissive device option is enabled to allow the device to be commanded to an Active state. TRK_IN_D is the discrete input value and status that forces the block mode to Local Override and causes the output to follow the field value (FV_D). SIMULATE_IN_D is the optional discrete input value and status that is used to simulate the field value. INTERLOCK_D is the optional discrete input value and status that must be True when the Interlock device option is enabled for the device to remain in the Active state. OUT_D is the discrete output value and status that reflects the current commanded device state.
Logical Blocks
397
398
Determining the Command Setpoint (Requested State) The block must first calculate its setpoint (SP_D) based on the following logic: When the mode is Cascade (Cas), the setpoint is copied from CAS_IN_D. When the mode is Automatic (Auto), the setpoint remains where it was left at the last execution of the block or at the last operator entry. Next, if the tracking parameter (TRK_IN_D) is True, the actual mode is changed to Local Override (LO) and the output (OUT_D) is copied from the field confirm value (FV_D) when it is in a valid state (not Undefined). If the SP Track device option is True in this case, the setpoint is copied from the output (OUT_D). When the SP Track device option is True and the actual mode is LO due to an interlock or shutdown condition, the setpoint is copied from the output (OUT_D).
You can select the Passive on Active Timeout device option to cause the OUT_D output to be changed to the Passive state during the execution of the block when the Active confirm timer parameter times out. In addition, you can select the Trip device option. When the Trip device option is True and an active confirm is lost for a time greater than the trip time parameter (TRIP_TIME), OUT_D is set to the Passive state. The SP_D value must be changed to Passive to clear the tripped condition. Determining if a Transition is Required The setpoint is used next by the logic that determines the device controller state (DC_STATE) to see whether or not a transition to another state is required. A Passive state setpoint always causes the output to be Passive. An Active state setpoint does not necessarily cause the output to go to the desired state. You can select the Permissive device option if you want a permissive to be required before the state changes. When the Permissive device option is True, the PERMISSIVE_D input must be True for an Active state setpoint to change the DC_STATE to that Active state. However, PERMISSIVE_D does not have to be True before SP_D can be changed to an Active state. PERMISSIVE_D has no further effect once DC_STATE is in an Active state. When DC_STATE changes away from the Active state, PERMISSIVE_D must be True to return to that state, even if SP_D has not changed. Delaying Setpoint Changes When the value of DELAY_TIME is not zero, a change in setpoint from the Passive state to an Active state is delayed for DELAY_TIME seconds (using the DELAY_TIMER) before it is sent to the logic that determines DC_STATE. This allows a common external setpoint to cause a sequenced start of a group of motors. When the value of RESTART_TIME is not zero, a change in setpoint from one Active state to the same or another Active state is delayed for the time specified in the RESTART_TIME parameter (using DELAY_TIMER). The value of OUT_D is held at the Passive state while DELAY_TIMER is active. This allows time for a motor to stop before reversing direction, or for a compressor to unload before restarting. DELAY_TIMER is set to the delay or restart time at the beginning of the interval and decreases to zero. You can see the time remaining for the delay or restart to be complete in the DELAY_TIMER parameter value. Determining the Physical Device State (Feedback State) The state of the physical device must be reported back to the device controller so that it can be compared to the setpoint. This feedback state is shown in the FV_D parameter. The use of binary discrete inputs to determine FV_D is described in the Assigning I/O section below.
Logical Blocks
399
It is possible for the state to be Undefined when the device is moving between steady states. You can specify the maximum amount of time that the state can be Undefined before declaring the move to be a failure by configuring the following parameters: CFM_ACT1_TIME is the maximum time allowed to transition to the Active 1 state. CFM_ACT2_TIME is the maximum time allowed to transition to the Active 2 state. CFM_PASS_TIME is the maximum time allowed to transition to the Passive state.
Timing takes place in the TRAVEL_TIMER (Travel is the term used to describe the movement of a valve from one end of its stroke to the other.). This timer is reset to zero at the start of the transition and increases in value until the device is confirmed or the confirm time has expired. The travel time is left in the timer until the next transition occurs so you can gather statistics for a preventive maintenance program. Some valves take a long time to travel. When a valve begins to open, it is said to crack. You set CRACK_TIME to the longest time it should take to lose the confirm signal for the previous state. This is much shorter than the travel time, so it gives the operator an early warning that the valve is not moving. This time appears in CRACK_TIMER, which increases in value and holds the time until the next transition. Generally, a device takes a finite amount of time to arrive at a newly commanded state. The Device Control function block supports and tracks these transitions with the DC_STATE parameter. DC_STATE represents the current state of the device. The following table lists the index values for DC_STATE. Device Control Function Block DC_STATE Parameter Values Type of State Steady States DC_STATE Index 0 1 2 Transient States 3 4 5 Failure States 6 7 8 Special States 9 10 11 Meaning Confirmed Passive Confirmed Active 1 Confirmed Active 2 Going to Passive Going to Active 1 Going to Active 2 Failed Passive Failed Active 1 Failed Active 2 Tripped Shutdown/Interlocked Locked
The PV_D value is used to determine DC_STATE. PV_D is normally a copy of FV_D. However, sometimes the hardware that confirms the device state fails. In this case, the operator can confirm the state of the field device visually. When the field device is in the correct state, the operator can turn on the accept switch (ACCEPT_D = True). When ACCEPT_D transitions from False to True, PV_D is copied from OUT_D and is held there until OUT_D changes state. You can configure graphic displays and process control logic to use PV_D as the confirm state even when a confirm switch fails. The operator can turn off the visual confirmation by changing SP_D or by manually setting ACCEPT_D to False.
400
Determining the Device Controller State (DC_STATE) In general, the effect of a change in setpoint is to change the state of the device controller (shown by DC_STATE) to one of the three normal steady states: Passive, Active 1, or Active 2. However, there are other possible states. Three transient states corresponding to the transitions between steady states Three failure states corresponding to loss of confirm for a steady state or to failure to complete a transition to that state within the time allowed Three special states
You can select the Interlock device option. When the Interlock device option is True, the INTERLOCK_D input must be True for DC_STATE to remain in an Active state. When INTERLOCK_D transitions to False: The actual mode is changed to LO DC_STATE is changed to Shutdown/Interlocked and OUT_D is set to the Passive state When INTERLOCK_D becomes True again, DC_STATE might return to its former state if the SP Track device option is False. There is no delay on the return. When the SHUTDOWN_D input becomes True, the same thing happens as described above for loss of the interlock input. This is not optional. When you have motor starters with overload protection that must be reset manually, you might want to ensure that resetting the overload does not start the motor until the operator is ready to start it. When the Trip device option is True and an Active state confirm is lost for more than TRIP_TIME seconds, DC_STATE changes to Tripped and OUT_D is set to Passive. The operator (or block logic in Cas mode) must write the SP_D to Passive to leave the Tripped state before writing the SP_D to the former active state to resume that state. You can select the Reset Required device option. This device option works with shutdown, interlock, and trip. If the Reset Required device option is True, DC_STATE changes to Locked when you clear a device state of shutdown, interlocked, or tripped. The following is an example of how this device option works with shutdown. Condition SP_D = 1 SHUTDOWN_D = 1 SHUTDOWN_D = 0 RESET_D = 1 DC_STATE Confirmed Active 1 Shutdown/Interlocked Locked Confirmed Active 1 FAIL Clear Passive Confirm Time Passive Confirm Time Clear
A motor trip goes to the Tripped state, but requires reset and a manually entered Passive setpoint value. The RESET_D parameter must be turned on to clear the Locked state and go to Passive. A Locked state due to shutdown or interlock does not require a manually entered Passive setpoint input to resume the Active state. When the shutdown or interlock condition clears and RESET_D is set True, the previous Active state resumes. By default, RESET_D has the Control lock assignment and this allows an operator to change it. If your application requires a supervisor to reset the device controller when something abnormal happens, you can change the parameter lock assignment on RESET_D. Refer to the Parameter and Function Security topic for more information on how to change parameter lock assignments.
Logical Blocks
401
Determining the Failure Code When the state of the device controller in DC_STATE does not match the setpoint, a failure code is generated. This code is stored in the FAIL parameter. The FAIL_ACTIVE parameter is set True when the value of FAIL is not zero. The following failures are possible. Device Control Function Block FAIL Parameter Codes FAIL Parameter Code 0 1 Meaning Clear Passive Confirm Time Set when OUT_D is set Passive and FV_D does not change to Passive in the required time duration or if FV_D does not change state before CRACK_TIMER times out. Set when SP_D sets OUT_D to Active 1 and FV_D does not change to Active 1 in the required time duration or FV_D does not change state before CRACK_TIMER times out. Set when SP_D sets OUT_D to Active 2 and FV_D does not change to Active 2 in the required time duration or FV_D does not change state before CRACK_TIMER times out. Set when OUT_D and FV_D are Passive and FV_D changes to another state. Set when OUT_D and FV_D are Active 1 and FV_D changes to another state. Set when OUT_D and FV_D are Active 2 and FV_D changes to another state. Set when DC_STATE is set to Tripped. Set when DC_STATE is set to Shutdown/Interlock. Cause
4 5 6 7 8
Passive Confirm Lost Active 1 Confirm Lost Active 2 Confirm Lost Tripped Shutdown/Interlock
Determining the Output State The state of OUT_D is the same as DC_STATE for the steady, transient, and failure states. For example, when the setpoint causes DC_STATE to change to Active 1, DC_STATE becomes Going to Active 1. OUT_D becomes Active 1 and stays there when DC_STATE changes to Confirmed Active 1 or Failed Active 1. This behavior is required when the device is a pneumatic valve. When the Trip or Reset Required device option is True, the failed state is not entered and OUT_D returns to the Passive state. This behavior is required when the device is a motor. The three special states all set OUT_D to Passive. When the Passive when Confirmed device option is True, the state of OUT_D is Passive in either of the Active states of DC_STATE or in the failed states. This allows a motorized valve to be energized only during the transition time; the motor must not run when travel is complete.
402
Assigning I/O The Device Control function block allows as many as four feedback signals and four output signals to be associated with the discrete field device. The eight input/output signals are referenced by the Device Control block through the I/ O parameters. The IOREF_IN[1-4] parameters reference the discrete feedback signals coming from the field device. The IO_OUT[1-4] parameters reference the discrete output signals that command the field device to a requested state. The feedback input IOREF_IN[1-4] discrete signal values and statuses are stored in the internal parameters F_IN_D[1-4]. These signal values are used for FV_D state determination. Note The F_IN_D parameters can be exposed and wired to instead of the corresponding IO_IN parameters to connect module-level parameters into the PV of a DC block. For a PV that is derived from a combination of DST signals and module parameters, we recommend using DI blocks to read the DST signals into the module and wire all signals to the F_IN_D parameters of the DC Block. If IO_IN is used in conjunction with F_IN_D parameters, the user must configure the DST signals starting at IO_IN1, IO_IN2, and so forth, and use the remaining inputs for the F_IN_D parameters.
Note A DC block with the Output Failure value selected in the BAD_MASK parameter, only sets the BAD_ACTIVE flag on output failure if the associated I/O channel was at one time enabled, then disabled, and then the I/O card only is downloaded. The requested state (stored in OUT_D) is decoded to the individual IO_OUT[1-4] channel outputs according to the corresponding output state mask. The value and status of the IOREF_OUT[1-4] channels are read back and copied to the internal parameters F_OUT_D[1-4] to track the output channel values and to calculate the status of OUT_D. The IO_OUT[1-4] discrete output channel values are determined from the output mask that corresponds to the current state stored in OUT_D. Likewise, the IO_IN[1-4] discrete input channel values are used to find a matching input mask to determine the state to be stored in FV_D and PV_D. The STATE_MASKS parameter is used to define the output and input combinations of IO_OUT[1-4] and IO_IN[1-4] for each of the three different states that can be contained in the parameters SP_D, OUT_D, FV_D and PV_D. The SP_D and OUT_D parameters can be one of the three following states. Value 0 1 2 State Passive Active 1 Active 2
The FV_D and PV_D parameters can be one of the four following states. Value 255 0 1 2 State Undefined Passive Active 1 Active 2
Logical Blocks
403
The Undefined state means the IO_IN[1-4] references do not match any of the defined input STATE_MASKS. Configuring State Masks You enter the expected/desired values of inputs and outputs for each of three states in the boxes in the State Masks dialog. A blank box indicates a False (0) input or output value. A box with a check mark indicates a True (1) input or output value. Gray boxes indicate inputs and outputs that are not used or do not matter. The following figure shows a simple state mask example.
Device Control Function Block State Mask Example (No Active 2 State) In this example, if IO_IN_1 is True (1), the FV_D parameter value is 1, indicating the Active 1 state. When the block sets OUT_D to a value of 1 to request the Active 1 state, the Active 1 output mask is used to set IO_OUT_1 to 0 and IO_OUT_2 to 1. You mark the Use active 2 box to indicate the Active 2 state is to be used. This is used only to determine whether the Active 2 state is considered when matching bit patterns.
404
The following figure shows an example definition of the Passive, Active 1, and Active 2 bit masks for a group of input and output I/O parameters.
Device Control Function Block State Mask Example (with Active 2 State) In this example, if IO_IN_1 is False and IO_IN_2 is True, the FV_D parameter value is 2, indicating the Active 2 state. When the block sets OUT_D to a value of 2 to request the Active 2 state, the outputs are set as follows: IO_OUT_1 = False (0) IO_OUT_2 = False (0) IO_OUT_3 = True (1) IO_OUT_4 = Grayed out (0) The grayed out output settings are always set to False. Simulation To support testing, you can enable simulation. This allows the measurement value and status to be supplied manually or from another block. During configuration, decide whether you want the simulated value/status to be entered manually during operation or you will use a value/status from another block for the simulated value/status.
Logical Blocks
405
When the value is entered manually: The operator first enables simulation by selecting the SIMULATE_D parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field. If SIMULATE_IN_D is not connected (status = Bad: NotConnected), the operator enters the value to be used in the SIMULATE_D parameter Simulate Value field. In online operation, the operator can enter a simulated status value in the Simulate Status field.
Note Make sure SIMULATE_IN_D is not connected if you want to enter the value or status manually. When SIMULATE_IN_D is connected, the value from the SIMULATE_IN_D Value field is used as the simulated value. When the value/status from another block is used: During configuration, connect SIMULATE_IN_D to the desired block output or parameter. Do not enter a value in the Simulate Value field of the SIMULATE_IN_D input; the block uses the connected value automatically. During operation, the operator enables simulation by selecting the SIMULATE_D parameter and setting the Simulate Enabled box in the Simulate Enabled/Disabled field.
Note Do not enter a value for the SIMULATE_IN_D parameter. When you do and the status of SIMULATE_IN_D is not Bad: NotConnected, the manually entered value for SIMULATE_IN_D overrides any value you enter in SIMULATE_D. Tracking The TRK_IN_D input is used to force the OUT_D to track FV_D. When TRK_IN_D is True, OUT_D is set equal to FV_D when it is in Passive, Active 1, or Active 2 state. The actual mode of the block is Local Override (LO). If the SP track device option is True, SP_D is copied from OUT_D. The value of PV_D usually is set to the value of FV_D. However, when the ACCEPT_D parameter is True, PV_D is set to the value of OUT_D. Whenever OUT_D changes from its previous value, the block automatically sets ACCEPT_D to False. Device Options The device options (DEVICE_OPTS) parameter allows you to select the optional control logic used in the block. You select one or more of the device options by selecting that option in the DEVICE_OPTS Parameter Properties Dialog Box. The following device options are available: Passive on Active Timeout Passive when Confirmed Trip Reset Required Permissive SP Track Interlock
With the Passive on Active Timeout device option, a confirm time-out alarm is generated and the DC_STATE is changed to the failed Active state. In Auto mode, SP_D must be manually entered to attempt the Active state again. In Cas mode, SP_D must be changed to Passive and then back to the Active state to attempt the Active state again. The Passive when Confirmed device option is used for devices, such as a motor operated valve, that require the drive signal to the device to stop when the requested state is reached.
406
With the Permissive device option, an OUT_D change from Active to Passive is never blocked. Block Errors The following conditions are reported in the BLOCK_ERR parameter: Simulate active Simulation is enabled and the block is using a simulated value in its execution. Input failure/process variable has Bad status The hardware is bad. Output failure The output is not valid. Readback failed The I/O readback failed.
For complete descriptions of the supported modes, refer to the Function Block Modes topic.
Logical Blocks
407
ACCEPT_D
None
BAD_ACTIVE
None
BAD_MASK
None
BLOCK_ERR
None
408
Parameter CRACK_TIMER
Units Seconds
Description The elapsed time of the CRACK_TIME setting. When the device cracks or changes state through the FV_D parameter, CRACK_TIMER is held at that value. CRACK_TIMER is reset to zero when SP_D is changed. The current state of the device controller. Specifies the delay time when SP_D is changed from the Passive state to an Active state before the change is sent to DC_STATE logic. This allows a common external setpoint to cause a sequenced start of a group of motors. A change in SP_D to the Passive state or from one Active state to another is not delayed. Elapsed time of DELAY_TIME or RESTART_TIME setting. DELAY_TIMER counts down from DELAY_TIME or RESTART_TIME to zero. Device options. Allow you to select control logic options used in the block. The device options are Interlock, Passive on Active Timeout, Passive when Confirmed, Permissive, Reset Required, SP Track, and Trip. Current value and status of IO_IN_1. Current value and status of IO_IN_2. Current value and status of IO_IN_3. Current value and status of IO_IN_4. Current value and status of IO_OUT_1. Current value and status of IO_OUT_2. Current value and status of IO_OUT_3. Current value and status of IO_OUT_4. Named set that indicates the state of the device controller failure detector. Refer to this function block's Block Execution topic for information on failure codes. Binary indication of an active failure found by the failure detector. The feedback state of the discrete device. FV_D represents the state of the field device as determined from state masks for the four discrete inputs when SIMULATE_D is disabled (False). Discrete input that must be True for OUT_D to remain in an Active state when the Interlock device option is enabled.
DC_STATE DELAY_TIME
None Seconds
DELAY_TIMER
Seconds
DEVICE_OPTS
None
FAIL_ACTIVE FV_D
None None
INTERLOCK_D
None
Logical Blocks
409
Parameter INTERLOCK_OPT
Units None
Description Interlock option. Allows you to select the block's behavior when the status of INTERLOCK_D, PERMISSIVE_D, or SHUTDOWN_D is Bad. The three options are: Passive if Bad If the status of any of these parameters is Bad, the block uses the passive state value for that parameter, that is, 0 for INTERLOCK_D and PERMISSIVE_D, and 1 for SHUTDOWN_D
Always Use Value The block behaves as described in Block Execution. This is the default value for INTERLOCK_OPT. IO_IN_1
Use Last Good Value The block uses the value of each parameter the last time the parameter's status was not Bad. None
Input hardware reference that defines the Device Signal Tag (DST) for the first I/O channel used for the feedback field measurement. Input hardware reference that defines the DST for the second I/O channel used for the feedback field measurement. Input hardware reference that defines the DST for the third I/O channel used for the feedback field measurement. Input hardware reference that defines the DST for the fourth I/O channel used for the feedback field measurement. Output hardware reference that defines the DST for the first output I/O channel of the block. Output hardware reference that defines the DST for the second output I/O channel of the block. Output hardware reference that defines the DST for the third output I/O channel of the block. Output hardware reference that defines the DST for the fourth output I/O channel of the block. The mode record of the block. Contains the actual, target, permitted, and normal modes. The discrete output value and status. Discrete input that must be True for OUT_D to transition to an Active state when the Permissive device option is set True. The discrete process variable used in block execution. It is a copy of FV_D or SP_D. Unlocks the device controller after a failure when the Reset Required option is enabled. RESET_D unlocks OUT_D from the locked Passive state when Reset Required is enabled.
IO_IN_2
None
PV_D RESET_D
None None
410
Parameter RESTART_TIME
Units Seconds
Description Specifies the delay time when SP_D is changed from one Active state to the same or another Active state. The value of OUT_D is held at the Passive state while DELAY_TIMER is active. This allows time for a motor to stop before reversing direction, or for a compressor to unload before restarting. Sets and holds OUT_D in the Passive state when SHUTDOWN_D is True. Enables simulation and allows you to enter an FV_D value and status when SIMULATE_IN_D is not connected. The input connector value and status used for FV_D when simulation is enabled. The setpoint for the device controller. In Auto mode, SP_D represents the manually entered requested device state. In Cas mode, SP_D comes from the CAS_IN_D input. The command and feedback state definition masks. STATE_MASKS maps combinations of the feedback input signals to the three discrete states and maps each of the three discrete states to combinations of output signals. Counts the elapsed time of travel (the time it took the new requested state to be confirmed). TRAVEL_TIMER is held at the current value when FV_D is changed to the requested state. The timer is reset when the state changes from Confirmed. Note TRAVEL_TIMER can be used as a tool to set maximum confirm times. The time allowed before a loss of confirm is interpreted as a trip. For example, when a state was confirmed and the feedback changes state without requesting a new state, the time in TRIP_TIME must pass before the device is labeled Tripped. Discrete input that causes OUT_D to track FV_D.
STATE_MASKS
None
TRAVEL_TIMER
Seconds
TRIP_TIME
Seconds
TRK_IN_D
None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Logical Blocks
411
Device Control Function Block Tank Fill Application Example Assume you want the operator to be able to open or close the valve when the tank level is less than 100%, but the valve must close when the tank level reaches 100%. When the level reaches 100%, a Limit function block writes a shutdown signal to the Device Control block's SHUTDOWN_D input. SHUTDOWN_D holds the valve in the CLOSED (Passive) state. The following figure is the function block diagram for this example:
Device Control Function Block Diagram Example for Tank Fill Application Assume the solenoid valve responds to a single discrete input for its commanded state. A False (0) value represents the close action and a True (1) value represents the open action. You select the SP Track device option to force the SP_D to the CLOSED (Passive) state when the tank is full. Warning Disabling this option can potentially start the equipment when unattended if the SP is left Active following a failed start due to an interlock.
412
A single output is used to feedback the actual state of the valve. A False value indicates the valve is CLOSED and a True value indicates the valve is OPEN. You configure the STATE_MASKS parameter to match these signals, as in the following example. The Active 2 state is not used.
Device Control Function Block State Mask Example for Tank Fill Application Application Example: Simple Interlock Assume you have a pump that you want the operator to turn on only when the downstream valve is open. The following figure illustrates this application:
Device Control Function Block Pump Interlock Application Example The OPEN/CLOSED signal from the valve is used as an input to the Device Control function block's INTERLOCK_D parameter. This prevents the pump from being turned on when the valve is closed. Warning Disabling this option can potentially start the equipment when unattended if the SP is left Active following a failed start due to an interlock.
Logical Blocks
413
The following figure is the function block diagram for this example:
Device Control Function Block Diagram Example for Pump Interlock Application You select the Interlock device option so the Device Control block considers the INTERLOCK_D parameter in its logic. When the SV60 valve is CLOSED (False [0]), the interlock is Active and the operator request to turn on the pump is held until the SV60 valve is OPEN (True [1]). Application Example: Interlock with Permissive In the following example, the Device Control block is used to control a mixing agitator. The agitator is a three state motor: OFF, SLOW, and FAST. The agitator accepts two discrete input signals for state commands and provides two discrete contracts for state feedback indication. To prevent foaming of the components being mixed, the operator is not permitted to start agitation until the tank level is 50% or greater. To prevent molecular breakdown, the mixing operation must not exceed 30 minutes when mixed at the slow speed or 15 minutes at the fast speed. After the components are mixed, the operator must be locked out from reactivating the agitator until the mixture is drained and the tank is refilled with the next batch of components. Warning Disabling this option can potentially start the equipment when unattended if the SP is left Active following a failed start due to an interlock. The following figure shows an example of this mixing process:
414
The following figure shows an example function block diagram for this application.
Device Control Function Block Diagram for Agitator Example The Device Control function block's PERMISSIVE_D input is used to lock out operator agitator activation until the appropriate tank level is reached. The SHUTDOWN_D input is used to automatically shut off the agitator after the required mixing time has passed. The INTERLOCK_D input is used to lock out operator re-activation of the agitator until the tank mixture is drained. The Permissive and Interlock device options must be enabled. The Analog Input function block reads the level indication in percent and the Limit function block monitors the level. When the level is greater than or equal to 50.0, the OUT_HI_LIM parameter transitions to True and provides the permissive that allows the Device Control block to be commanded to its SLOW or FAST state. When the tank is emptied, the Limit block's OUT_LO_LIM parameter is used to reset the integrator in preparation for the next mixing cycle. OUT_LO_LIM is also used to reset the latched mixing cycle completed signal (OUT_TRIP) generated by the Integrator function block. After the tank is filled to the desired level, the permissive is satisfied and the operator can command the AG99 Controller to the SLOW or FAST state. The requested state is also the value written to the Integrator block, which is used to compute the mixing time based on the mixing speed. When the Integrator block reaches setpoint (after 15 to 30 minutes, based on the manually selected agitator speeds), its OUT_TRIP parameter is used to shutdown the AG99 Controller through the SHUTDOWN_D parameter in the Device Control block. This same signal is latched to hold the controller at interlock until the tank is emptied, at which time the latch is reset. This block logic allows the operator to stop agitation and to restart it in the middle of the mixing cycle without losing elapsed mix time. This is important if the AG99 agitator stops temporarily due to a motor overheating protection switch or a temporary loss of feedback indicators. When the problem is resolved, the agitator can be commanded back to the active mixing speed, picking up where it left off.
Logical Blocks
415
The following table shows the discrete I/O combinations used for the three agitator states. Inputs and Outputs for Device Control Function Block Agitator Example Agitator Device Status Feedback Outputs First Output OFF SLOW FAST False True False Second Output False False True Command Inputs First Input False True False Second Input False False True
The following figure shows the STATE_MASKS parameter setting used to configure the device controller states for the agitator.
416
Multiplexer Function Block SELECTOR selects the input to place at the output. IN1 through IN[n] are the analog input values and statuses (as many as 16 inputs). OUT is the analog output value and status.
Logical Blocks
417
1 1 2 2 3
10 20 10 20 30
418
BAD_ACTIVE
None
BAD_MASK
None
BAL_TIME BLOCK_ERR
Seconds None
SELECTOR
None
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Logical Blocks
419
Multiplexer Function Block Diagram Example In this example, the SELECT_NEXT_GOOD parameter is set to True. IN 1 is the value of transmitter A and IN2 is the value of transmitter B. IN3 is the average of the two. Normally, the output (OUT) would be the value of IN3 in this case, because SELECTOR equals 3. Suppose transmitter A fails, causing the status of IN1 and IN3 to be Bad. Because SELECT_NEXT_GOOD is True, the selected output will be the value of IN2.
420
Negative Edge Trigger Function Block IN_D is the discrete input value and status. OUT_D is the discrete output value and status.
Logical Blocks
421
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
422
Negative Edge Trigger Function Block Application Example You configure the block to trigger an output that closes the gate when the input (conveyor motor) transitions to False (0). The following figure is the function block diagram for this example:
Logical Blocks
423
Not Function Block IN_D is the discrete input value and status. OUT_D is the discrete output value and status.
424
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Logical Blocks
425
Or Function Block
The Or function block generates a discrete output value based on the logical OR of two to sixteen discrete inputs. When one or more of the inputs is True (1), the output is set to True. The block supports signal status propagation. There are no modes or alarm detection in the Or function block.
Or Function Block IN_D1 through IN_D[n] are the discrete input values and statuses (as many as 16 inputs). OUT_D is the discrete output value and status.
426
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Or Function Block Application Example You configure the Or function block to stop Conveyor 3 when the inputs from Conveyor 1 or Conveyor 2 indicate a shutdown. The following figure is the function block diagram for this example:
Logical Blocks
427
Positive Edge Trigger Function Block IN_D is the discrete input value and status. OUT_D is the discrete output value and status.
428
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
Logical Blocks
429
430
Reset/Set Flip-flop Function Block RESET_IN is the reset discrete input value and status. SET is the set discrete input value and status. OUT_D is the discrete output value and status.
Logical Blocks
431
The following table shows the block output value based on the possible SET and RESET_IN combinations: Reset/Set Flip-flop Function Block Truth Table SET False False True True RESET_IN False True False True OUT_D Last OUT False True False
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
432
Set/Reset Flip-flop Function Block RESET_IN is the reset discrete input value and status. SET is the set discrete input value and status. OUT_D is the discrete output signal and status.
Logical Blocks
433
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
434
Transfer Function Block IN_1 is the first analog input and status. IN_2 is the second analog input and status. SELECTOR selects the input to be placed at the output. OUT is the analog output value and status.
Logical Blocks
435
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
436
Application Example: Temperature Sensor Switch You can use the Transfer function block as an input switch between two temperature sensors. The SELECTOR parameter selects the temperature input based on the level in a tank. The following figure is an example function block diagram for this application:
Logical Blocks
437
438
Note: Each DIAG function block must have a unique name in the entire DeltaV system. It is recommended that you name the blocks for the asset they refer to. The unique names are important because the Asset page of the Inspect application lists only the DIAG block name. If two or more DIAG blocks have the same name the information in Inspect will be misleading because operators cannot determine which block's information is being displayed. Note that fieldbus blocks are monitored automatically and do not require Diagnostic blocks.
The value of the output (STATUS_INDEX) is the sum of the values for the inputs that are true.
439
440
Fuzzy Logic Control Function Block This function block supports mode control, signal scaling and limiting, feedforward control, override tracking, alarm limit detection, and signal status propagation. In Cascade (Cas) mode, the setpoint (SP) is adjusted by a master controller. In Remote Cascade mode (RCas), the setpoint is written by an application. In Automatic (Auto) mode, the SP can be adjusted by the operator. In RCas, Cas and Auto modes, the output is calculated to maintain setpoint. In Manual (Man) mode, the block's output is set by the operator. In Remote Output (ROut) mode, the block's output is written by an application. The FLC function block can be connected directly to process I/O, can receive its input from another block at the input connection (IN), or can provide an output value to another block through the output connection (OUT). You can connect BKCAL_OUT to a master controller and BKCAL_IN to a slave controller to compensate for downstream limits and to provide bumpless transfer to closed loop control. You connect the tracking inputs (TRK_IN_D and TRK_VAL) for externally controlled output tracking. BKCAL_IN is the analog input value and status from another block's BKCAL_OUT output that is used for backward output tracking for bumpless transfer and to pass limit status. CAS_IN is the remote setpoint (SP) value from another block. FF_VAL is the feedforward control input value and status. IN is the connection for the process variable (PV) from another function block. SIMULATE_IN is the input value and status used by the block instead of the analog measurement when simulation is enabled. TRK_IN_D initiates the external tracking function. TRK_VAL is the value after scaling applied to OUT in Local Override mode.
441
BKCAL_OUT is the value and status required by the BKCAL_IN input of another block to compensate for downstream limits and to provide bumpless transfer to closed loop control. OUT is the block output value and status. Other FLC Function Block Features Many of the following features of the FLC function block are identical to those provided for the PID function block. alarm detection status handling I/O Selection simulation signal Conversion filtering feedforward Calculation tracking setpoint selection and limiting output selection and limiting bumpless transfer and setpoint tracking reverse and direct action block errors
Refer to the PID function block topic for details about these features.
442
443
The two membership functions for error, change in error and change in output are negative and positive. The membership scaling (Se and S De) and the error value and change in error, respectively, determine the degree of membership.
Change in Error Membership Functions The change in output membership functions are called singletons. They represent fuzzy sets whose support is a single point with a membership function of one. The membership scaling (S Du) determines the magnitude of output change for a given error and change in error.
444
Four Fuzzy Logic Rules There are four fuzzy logic rules that the FLC function block uses for a reverse acting controller. DeltaV Fuzzy Logic Rules Number Rule 1 Rule 2 Rule 3 Rule 4 Rule If error is N and change in error is N, make change in output P. If error is N and change in error is P, make change in output ZO. If error is P and change in error is N, make change in output ZO. If error is P and change in error is P, make change in output N.
Refer to the Fuzzy Logic Evaluation topic for an explanation and example of how the fuzzy membership functions and rules are used in fuzzy logic evaluation. Fuzzy Logic Control Nonlinear PI Relationship The two membership functions associated with each input variable and three membership functions for the output variable makes the FLC function block nonlinear in its response. For regions where the absolute error is greater than the error scaling factor or the absolute change in error is greater than the change in error scaling factor, the values for error and change in error are clipped at the error scaling factor and change in error scaling factor, respectively. The following figure shows an example FLC curve that illustrates how the change in controller gain is smooth and continuous using only two input membership functions and three output membership functions.
FLC Function Block's Nonlinear Relationship The dark line shows the FLC function block's nonlinear relationship when the error is equal to the change in error. The straight line through the origin shows the linear relationship of a standard PI controller. As the error and change in error increase, the change in output of a standard PI controller increases linearly. Note that the gain of the FLC function block is similar to the gain of the PI controller when the error and change in error are small. The gain of the FLC function block increases gradually as the error and change in error increase.
445
The nonlinearity built into the FLC function block reduces overshoot and settling time, achieving tighter control of the process loop. To help anticipate a rapid change in the process with the FLC function block, derivative action is provided in the feedback path of the loop, as shown in the following figure.
Fuzzy Logic Control with Derivative Action The FLC function block treats small control errors differently from large control errors and penalizes large overshoots more severely. It also severely penalizes large changes in the error, helping to reduce the oscillation.
Process Variable Oscillation Example The above figure depicts how an FLC function block reacts to overshoot and oscillation. At points B, D, and F, where overshoot occurs, the FLC function block applies stronger control actions to bring the variable back to the setpoint. At points A, C, and E, where large changes in error occur and are dominant, the FLC function block applies stronger corrective actions to reduce oscillation. This type of nonlinearity allows the FLC function block to provide better control performance than standard PID control. Establishing Scaling Factors DeltaV Tune can be used to establish the scaling factors (Se, SDe, and SDu). For a small control error and setpoint change less than a nominal value (DYsp), the FLC function block scaling factors are related to the proportional gain (Kp) and reset (Ti), which would be used in a PI block executing at a one (1) second scan rate (Dt) to control the same process. Refer to the following equations:
446
Se = error scaling SDu = change of controller output scaling Se0 = error scaling for a one (1) second scan rate Beta is a function of process deadtime (DT) and ultimate period or time constant (TC) and has values in the following range:
The Fuzzy Logic Control function block accounts for the scan rate and recalculates the error scaling factor (Se), which depends on the scan rate appropriate to the function block scan (Dt).
The Fuzzy Logic Control function block is designed to be set up by DeltaV Tune. However, if you choose to set up scaling factors manually, it is important to note that, in such a case, DeltaV Tune will not set up derivative time for the FLC block, and you will not have manual access to the derivative term. In such a situation, the FLC block, effectively, becomes the PI controller. This can affect block performance significantly. Note The nominal setpoint change value for DYsp is one percent. When the setpoint change is greater than the nominal setpoint change (DYsp), these scaling factors are internally increased by the Fuzzy Logic Control function block. This internal scaling is changed in the ratio of actual setpoint change to the nominal setpoint change. These larger scaling factors are used while the control error (PVSP) remains large due to the change in setpoint. When the control error has returned to a small value and remains small for a period of time, the scaling factors used by the fuzzy algorithm are once again the block scaling parameter values.
447
Remote Cascade (RCas) The SP is calculated by an application that writes to the RCAS_IN parameter. Local Override (LO) The track function is active. OUT is set by TRK_VAL. The BLOCK_ERR parameter shows Local override. Initialization Manual (IMan) The output path is not complete (for example, the cascade-to-slave path might not be open). In IMan mode, OUT tracks BKCAL_IN. Out of Service (OOS) The block is not processed. The OUT status is set to Bad: Out of Service. The BLOCK_ERR parameter shows Out of service. You can configure the Man, Auto, Cas, RCas, ROut and OOS modes as permitted modes for operator entry.
ALARM_HYS
Percent
BAD_ACTIVE
None
BAD_MASK
None
BKCAL_IN
EU of OUT_SCALE
BKCAL_OUT
EU of PV_SCALE
448
Parameter BLOCK_ERR
Units None
Description The summary of active error conditions associated with the block. The block errors for the FLC function block are: Out of Service, Readback Failed, Output Failure, Bad PV, Local Override, Simulate Active, Configuration Error, and Other Error. When enabled and the block is in AUTO mode, bypasses the normal control algorithm by transferring the SP value (in percent) to OUT. When disabled, the block operates normally. To turn BYPASS on or off, select the CONTROL_OPTS Bypass Enable option and set the block to MAN mode. The remote setpoint value from another block. Control options. Allow you to specify control strategy options. The supported control options for the FLC function block are: Use PV for BKCAL_OUT, Track in Manual, Track Enable, Direct Acting, SP-PV Track in LO or IMan, SP-PV Track in Man, and Bypass Enable. The result of alarm detection associated with DV_HI_LIM. If DV_HI_ACT equals True, DV_HI_LIM has been exceeded. The amount by which PV can deviate above SP before the deviation high alarm is triggered. When this limit is exceeded, DV_HI_ACT is set to True. The result of alarm detection associated with DV_LO_LIM. If DV_LO_ACT equals True, DV_LO_LIM has been exceeded. The amount by which PV can deviate below SP before the deviation low alarm is triggered. When this limit is exceeded, DV_LO_ACT is set to True. Note that DEV_LO_LIM is a negative number and is compared against (PV - SP). The difference between SP (setpoint) and PV (process variable). Enables/disables feedforward control. The feedfoward gain value. FF_VAL is multiplied by FF_GAIN before it is added to the calculated control output. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the feedforward value (FF_VAL). The feedforward control input value and status. The value and status from either the I/O card or the simulated input (if simulation is enabled).
BYPASS
None
CAS_IN CONTROL_OPTS
EU of PV_SCALE None
DV_HI_ACT DV_HI_LIM
None EU of PV_SCALE
DV_LO_ACT
None
DV_LO_LIM
EU of PV_SCALE
FF_VAL FIELD_VAL
EU of FF_SCALE Percent
449
Description The result of alarm detection associated with HI_LIM. If HI_ACT equals True, HI_LIM has been exceeded. The result of alarm detection associated with HI_HI_LIM. If HI_HI_ACT equals True, HI_HI_LIM has been exceeded. The setting for the alarm limit used to detect the high high alarm condition. The setting for the alarm limit used to detect the high alarm condition. The connection for the PV input from another block. Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 if the following conditions are true: - The Write to Inspect Alarm context menu item was selected from Inspect for this block. - With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition will only exist for Variability if both the Variability Index and the Standard Deviation have exceeded their defined limits.) Defines the input DST for the I/O channel used for the PV. I/O options. Allow you to select how the I/O signals are processed. The supported I/O options for the FLC function block are: Low Cutoff, Use PV for BKCAL_OUT, Use Fault State Value on Restart, Increase to Close, SP-PV Track in LO or IMan, SP-PV Track in Man, and Invert. Defines the output DST for the block. Defines the Device Signal Tag (DST) for the input channel that provides readback for the value written to the channel defined by IO_OUT. Linearization type. Determines whether the field value is used directly (Direct), is converted linearly (Indirect), or is converted with the square root (Indirect Square Root). The result of alarm detection associated with LO_LIM. If LO_ACT equals True, LO_LIM has been exceeded. The setting for the alarm limit used to detect the low alarm condition. The result of alarm detection associated with LO_LO_LIM. If LO_LO_ACT equals True, LO_LO_LIM has been exceeded.
IO_IN IO_OPTS
None None
IO_OUT IO_READBACK
None None
L_TYPE
None
450
Description The setting for the alarm limit used to detect the low low alarm condition. Activated when the Low Cutoff I/O option is enabled (True). When the converted measurement is below the LOW_CUT value, the PV is set to 0.0. Parameter used to show and set the block operating state. The block output value and status. The maximum output value allowed. The minimum output value allowed. The value and status of the output channel referenced by IO_READBACK. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. The process variable used in block execution and alarm limit detection. The time constant of the first-order PV filter. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with PV. The remote analog setpoint value and status. Input provided by either a device or the output of another block. The remote analog setpoint value and status after ramping. Output provided to a device for back calculation and to allow action to be taken under limiting conditions or mode change. Remote output value and status. Input provided by a device to the control block for use as the output (ROut mode). Remote output value and status. Output provided to a device for back calculation in ROut mode and to allow action to be taken under limiting conditions or mode change. The change-in-error scaling factor. A tuning parameter that converts the change in error (from previous scan) to a normalized value used by the fuzzy logic algorithm. The error scaling factor. A tuning parameter that converts the error (PV-SP) to a normalized value used by the fuzzy logic algorithm.
PV PV_FTIME PV_SCALE
RCAS_IN RCAS_OUT
EU of SP_SCALE EU of PV_SCALE
ROUT_IN ROUT_OUT
EU of OUT_SCALE EU of OUT_SCALE
SF_DELTERR
None
SF_ERROR
None
451
Parameter SF_OUTPUT
Units None
Description The change-in-output scaling factor. A tuning parameter that converts the normalized output of the fuzzy logic algorithm to an increment of change for OUT. Defines action to be taken on remote control device timeout. The maximum allowable time between RCAS_IN and ROUT_IN updates. If exceeded, mode shedding takes place. Enables simulation and allows you to enter an input value and status. The SIMULATE value is used by the block only when SIMULATE_IN is not connected. The input connector value and status used by the block instead of the analog measurement when simulation is enabled. If SIMULATE_IN is connected or has a manually entered value, SIMULATE_IN will always override SIMULATE. Note When SIMULATE_IN is wired from an input source on the function block diagram, it will always override a manually entered value.
SIMULATE_IN
Percent
The block's setpoint value. The minimum setpoint change between scans required to initiate scaling factor adaptation. Time constant of the first order SP filter. The highest SP value allowed. The lowest SP value allowed. Ramp rate at which downward setpoint changes are acted on in Auto mode (in PV units per second). If the ramp rate is set to 0.0, the setpoint will be used immediately. For control blocks, rate limiting applies only in Auto mode. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. Ramp rate at which upward setpoint changes are acted on in Auto mode (in PV units per second). If the ramp rate is set to 0.0, the setpoint will be used immediately. For control blocks, rate limiting applies only in Auto mode. For output blocks, rate limiting applies in Auto, Cas, and RCas modes. The working setpoint of the block. It is the result of setpoint limiting and/or setpoint rate-of-change limiting. The standard deviation of PV. For analog control blocks in AUTO, mean is assumed to be the SP. Refer to Loop Performance Calculations for more details on how this parameter is calculated.
SP_RATE_UP
SP_WRK STDEV
452
Parameter STDEV_CAP
Description The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
STDEV_TIME
STATUS_OPTS
None
Status options. Allow you to select options for status handling and processing. The supported status options for the FLC function block are Bad if Limited and Target to Manual if Bad IN. Discrete input that initiates external tracking. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with the external tracking value (TRK_VAL). The analog input used in the external tracking function.
TRK_IN_D TRK_SCALE
None None
TRK_VAL
EU of TRK_SCALE
Note Default values and data type information for the parameters are available by expanding the Parameter View window.
453
The FLC and PID Loop The parameters used for connections when implementing feedforward, cascade or override strategies are the same as for the PID. Refer to the Application Information - PID Function Block topic for examples of such connections. You can manually adjust the FLC function block scaling to modify the loop response. Also, DeltaV Tune can be used to set the scaling used by the FLC function block automatically. Refer to the DeltaV Tune Overview topic for more information.
454
455
456
None None None None None Percent The units set in PROCESS_S CALE The units set in PROCESS_S CALE
PROCESS_IN
The input value the Inspect block averages to produce the PROCESS value. PROCESS_IN can be tied to a CALC block, a process value, or an OPC value.
457
Description The label for the process value of the inspect block. The label, value, and units appear in the Overview page. The scale and units for the PROCESS value. The label, value, and units appear in the Inspect Overview page. Set to TRUE on only one Inspect block in the configuration to have Inspect monitor the entire system. Set to FALSE to have the Inspect block monitor only the current module. Now, Current, or Previous Hour, Shift, or Day Average Percent Time that Control blocks were in their configured Normal Mode.
458
459
460
BAD_ACTIVE
None
BAD_MASK
None
BLOCK_ERR DELAY
None Seconds
LAST_VALUE MAX_DELAY
EU of OUT_SCALE Seconds
MIN_DELAY
Seconds
461
Parameter MODE
Unit None
Description Parameter used to show and set the block operating state. MODE contains the actual, target, permitted, and normal modes. A measurement value obtained through lab analysis of a grab sample. The maximum lab entry value that may be written to OUT. The minimum lab entry value that may be written to OUT. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. Sets the current SAMPLE and DELAY values for use by the Neural Network block's automatic correction. If enabled, these values will be used by the NN function block to modify the CORR_BIAS value. Resets after two block executions.
TRIGGER
None
462
463
The processing done at each step of execution is described in the following sections. Evaluate Actual Mode The mode of the MPC function block depends on the current status of inputs, the past mode of the function block, prediction time, and the current target mode.
464
The manner in which the block executes depends on the actual mode of the block. In OOS mode, the block algorithm is not executed. In IMan mode, the projected response over the horizon is calculated based on the current inputs, assuming that the outputs remain at their current value. The MPC output value is calculated to match the associated BKCAL_IN inputs. In Man mode, the projected response over the horizon is calculated as in IMan mode. The MPC output value is calculated to match the current block output values. In Auto mode, the projected response is calculated and the calculated outputs for normal control generated. If the output is not limited (as indicated by its associated BKCAL_IN), the calculated output is reflected in the block output. Also, when the output is limited but the calculated output will drive the output away from the limit, the calculated output is reflected in the block output. Otherwise, the last output is maintained and the MPC algorithm re-run for the output constant.
Update Output Value and Status The manner in which the MPC function block outputs are updated depends on the mode of the MPC block and whether a cascade connection has been established with a downstream block. In OOS mode, the status of the MPC outputs is set to BAD Out of Service. The block does not change the value of block outputs. In IMan mode, the MPC function block has been unable to establish a cascade connection with one or more of the downstream blocks because they are not in the correct mode. Until the initialization process is complete for an output, the calculate output (provide by the MPC algorithm to match the value on its associated BKCAL_IN) is written to the block output. Once the initialization process is complete for an input, the output remains at its last value with a status of GOOD Cascade Const. In Man mode, the output values are not written by the MPC algorithm but can be changed by the operator. The status of the outputs is GOOD Cascade Const. In Auto mode, the calculated output is written to the output or maintained at last value if the calculated output will drive the output further within its downstream limit. The output status should be Good Cascade NonSpecific.
MPC Function Block Execution Rate MPC can be used in an application as long as a function block execution time of one second or slower is sufficient to meet your process control requirements. The MPC function block scan rate multiplier is automatically set based on the time to steady state to provide an algorithm execution rate of one second or slower. Since the MPC algorithm uses model and controller matrices, which are generated on a very specific time base, the DeltaV Predict application automatically configures the effective scan rate. The execution time is defined by the process response time estimation (entered as the time to steady state when you request that the process be tested for identification) divided by prediction horizon (120 samples) in seconds. Alarming When the MPC function block detects configuration errors or abnormal conditions, they are automatically reflected in the BLOCK_ERR parameter. By setting the BAD_MASK parameter, you can determine which condition set BAD_ACTIVE. All conditions not included in BAD_ACTIVE are reflected in the ABNORMAL_ACTIVE parameters. These xxxx_ACTIVE parameters can be used in defining module alarms. MPC Configuration Note Any change in the block configuration requires that you reconnect to the block from the Predict application for the change to be reflected in the block's behavior.
465
Since the MPC block is an extensible function block, you can select the number of controlled, constraint, and disturbance parameters that are required to meet your process control needs. The number of manipulated and back calculation input parameters are set to equal the number of controlled parameters that you specify. The default is for the MPC block to have two controlled parameters. When you right-click the MPC function block and select Extensible Parameters, the following dialog is provided to specify MPC block inputs.
When you select the number of either control, disturbance, or constraints (NOF_XXXX) and then select Modify, a dialog appears in which you can change the number of inputs. For example, to change the number of controlled parameters, select NOF_CNTRL and then click Modify. The following dialog appears, which allows you to specify the number of controlled parameters.
After you specify the number of inputs to meet your application needs, select OK. The dialog closes, and the MPC block resizes to reflect the specified number of inputs (and outputs).
466
Once you define the number of inputs to the MPC block, you can configure the parameters associated with this function block. To enter configuration information, right-click the MPC function block and then select Properties. In response, the following dialog appears, which allows you to enter configuration information.
You can specify the configurable parameters associated with the controlled, manipulated, disturbance, and constraint parameters. Click an input or output listed in this dialog and select the Modify button. Then, you can change the configurable values associated with this parameter. For a controlled parameter, the following configuration dialog appears.
Provide the following configuration information: Description The parameter name that you want to appear in the Predict application and the MPC Operate view. (For more information, refer to the MPC Dynamos sections in the Dynamo Reference topic.) The default description name is the connector name (for example, CNTRL1). It is recommended that the parameter description contain 14 characters or fewer. SP Filter Time The time required for 63% of an SP change to be made (in seconds). This filter time is used to set the setpoint trajectory. SP Low Limit The minimum SP value (in engineering units) that an operator can enter. A setpoint entry that is lower than this limit is truncated to the limit value.
467
SP High Limit The maximum SP value (in engineering units) that an operator can enter. A setpoint entry that is greater than this limit is truncated to the limit value. Apply Optimization (check box) Only select this feature if the manipulated parameter associated with this controlled parameter is used to set the throughput of the process. If this option is selected, the associated manipulated parameter is adjusted to maintain the controlled parameter either at setpoint or a value that maintains a manipulated input being maintained at a its limit, whichever is lower. For a manipulated parameter, the following configuration dialog appears.
Provide the following configuration information: Description The parameter name that you want to appear in the Predict application and the MPC Operate view. (For more information, refer to the MPC Dynamos sections in the Dynamo Reference topic.) The default description is the connector name (for example, CNTRL1). It is recommended that the parameter description contain 14 characters or fewer. Maximum MV Rate The maximum rate at which the MPC function block can change the manipulated parameter (in engineering units per second). Low Limit The minimum output value (in engineering units) that an operator can enter. An entry that is lower than this limit is truncated to the limit value. High Limit The maximum output value (in engineering units) that an operator can enter. An entry that is greater than this limit is truncated to the limit value. For a disturbance parameter, the following configuration dialog appears.
Provide the following configuration information: Description The parameter name that you want to appear in the Predict application and the MPC Operate view (For more information, refer to the MPC Dynamos sections in the Dynamo Reference topic.) The default description is the connector name (for example, CNTRL1). It is recommended that the parameter description contain 14 characters or fewer.
468
Provide the following configuration information: Description The parameter name that you want to appear in the Predict application and the MPC Operate view (For more information, refer to the MPC Dynamos sections in the Dynamo Reference topic.) The default description is the connector name (for example, CNTRL1). It is recommended that the parameter description contain 14 characters or fewer. Related CV The controlled parameter that is allowed to deviate from setpoint to prevent the constraint from violating its low or high limit. Low Limit The minimum constraint target (in engineering units) that an operator can enter. An entry that is lower than this limit is truncated to the limit value. High Limit The maximum constraint target (in engineering units) that an operator can enter. An entry that is greater than this limit is truncated to the limit value.
469
The MNPLT outputs must be wired directly to the CAS_IN, RCAS_IN, or ROUT_IN inputs of the downstream function blocks. If the MPC block is being used to replace a PID block, it is typically wired to an AO block. However, for many other applications, the output of the MPC function block is wired as the cascade input of a PID, Fuzzy Logic or Ratio function block that provides the process input. An example of such wiring is illustrated in the following figure.
In such cases, the downstream process setpoint is treated by the MPC function block as the manipulated process input. As such, the MPC function block's manipulated output is wired to the CAS_IN of this function block, as shown in the following figure.
Like other DeltaV control blocks, you must wire the BKCAL_OUT (or ROUT_OUT or RCAS_OUT if the manipulated output is wired to ROUT_IN or RCAS_IN) of the downstream block to the BKCAL_IN inputs of the MPC function block. In some cases, the MPC function block replaces an existing control strategy. You can layer the MPC function block on the existing strategy. Doing so allows the MPC control to be implemented with the old strategy as a backup. You can achieve this by exposing the AO or control block's RCAS_IN and RCAS_OUT (or ROUT_IN and ROUT_OUT) that the existing strategy is manipulating. Also, you can wire the MPC function block to these parameters in much the same way that you can wire to CAS_IN and BKCAL_OUT. An example of this wiring is shown in the following figure.
470
471
The MPC function block remains in IMan until all blocks downstream are in the correct mode (Cas or RCas). The actual mode of the MPC block goes to LO when Predict application is active.
BAD_ACTIVE
None
BAD_MASK
None
BKCAL_IN [14]
EU of MNPLT
None The output units of the connected block The output units of the connected block The output units of the connected block
DSTRB [14]
472
Parameter INSPECT_ACT
Unit None
Description Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 if the following conditions are True: - The Write To Inspect Alarm context menu item was selected from Inspect for this block. - With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition will only exist for Variability if both the Variability Index and the Standard Deviation have exceeded their defined limits.) Manipulated output (from the MPC function block). A variable that is adjusted either automatically by the MPC block or manually by an operator. The MPC algorithm acts on the manipulated value to maintain the constraints within limits and the controlled parameter values at setpoint. Parameter used to show and set the block operating state. MODE contains the actual, target, permitted, and normal modes. The operators setpoint values. The number of SP parameters corresponds to the number of CNTRL parameters. The working setpoint of the block. The filtered value of the operator setpoint values used in determining control action. The largest standard deviation calculation for the control parameters over the standard deviation time. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
MNPLT [14]
MODE
None
STDEV_CAP
Percent of scale
STDEV_TIME
Seconds
473
474
Comparison of Traditional and MPC Usage for Application with One Control, Disturbance, and Constraint Parameter
475
Traditional Multivariable Control Techniques Feedback Control - Regulation of a process input to maintain the process at a target operating setpoint. The common means of feedback control is the PID algorithm. Tuning of PID is based on the dynamic response of the process to a change in the manipulated input.
Feedforward Control - Compensation for measured process disturbances by adjustment of process input. In general, dynamic compensation using a deadtime and lead/lag unit is required. Setup of dynamic compensation is based on the dynamic response of the process to changes in the disturbance input.
Decoupling Network - Accounting for process interaction in the adjustment of process inputs. When manipulated inputs impact the process in the same time frame, gain compensate based on the relative gain associated with each controlled parameter may be utilized. If the dynamics are different, a lead/lag and deadtime unit are required.
Override Control - Maintenance of feedback control within operating constraints. When the constraint exceeds its setpoint, the output of the override PID is selected for control. Tuning of the constraint PID is based on the dynamic response of the constraint parameter to a change in the associated manipulated input.
Throughput Optimization - Throughput is maintained either at its setpoint or at a limit established by a process input. When the input limit is reached, the throughput is reduced to maintain the process at the input limit. This way, the maximum throughput may be maintained.
476
Applications that may benefit from MPC control can be identified based on your process knowledge. The following guidelines may be used to determine when MPC should be considered. 1 Single or multiple loop control that is characterized by either long delay or inverse process response. Since the control action taken by an MPC function block is based on a process response model, you can achieve better control than would be possible with PID feedback control or deadtime compensation techniques, such as the Smith Predictor. The response model used by MPC is determined by the Predict application during commissioning. The interaction of two or more control loops impact process operation (that is, a change in the output of one control loop impacts the control parameter of the other control loops in a significant manner). Such interaction is accounted for when control action is taken by the MPC function block. Therefore, control may be improved since any correction that is taken to adjust one control parameter only impacts that parameter. One or more disturbances to any controlled parameters are measured. By including these measurements in the control, the MPC function block compensates for the impact of disturbances. As such, changes in the disturbance input have little or no impact on the controlled parameters. One or more measurable constraints must be observed in control of the process. The MPC function block constantly calculates the impact of a disturbance or control action on constraint parameters. If the future value of a constraint output violates its limit, MPC takes the appropriate action to prevent the constraint limit from being violated. Production is limited by one or more inputs to a process. Control of the throughput may be included in the MPC along with the control associated with the inputs that limit production. Throughput is adjusted to maintain the process at its input limit and achieve maximum production.
The execution rate of the MPC function block is limited to one second or slower. Therefore, MPC should be applied to processes where control requirements may be satisfied at these execution speeds. Difficult Process Dynamics When the process response to a change in the manipulate input either is dominated by delay or exhibits an inverse response, regulation provided by PID control may be too sluggish to meet your control requirements. In such cases, you can use the MPC function block for this control application. Since the control provided by MPC is based on an accurate model of the process, you may achieve tighter control than can be achieved with PID. An example implementation of MPC for single loop control is shown in the following figure.
Interacting Control Loops The model that is developed for MPC control captures the impact of a change in manipulated and disturbance inputs on all of the process outputs. Therefore, the MPC function block can correct for a deviation in one controlled parameter without impacting other controlled parameters associated with the block. Such control can be implemented and commissioned more quickly and easily than by using traditional techniques, such as decoupling networks, to compen-
477
sate for loop interaction. An example of the control of two interacting control loops using MPC is shown in the following figure.
Measured Disturbances The dynamics associated with a measured process disturbance are identified by the MPC process model. This model is the basis for MPC control. It allows the control to compensate for disturbances. No additional dynamic compensation elements are required to compensate for process disturbances (as with traditional techniques). An example of a single control loop with two measured disturbances is shown in the following figure.
Measured Constraint Constraint handling is an integral part of the MPC function block. The impact of disturbances and changes in manipulated inputs on the constraint may be predicted; such impact is based on the predictions made by MPC. When the value of the constraint is predicted to exceed the constraint limit defined by its setpoint, the internal target of the associated controlled parameter is reduced. This occurs so that the resulting changes in manipulated inputs prevent the constraint from exceeding its limit. As part of the constraint configuration, you must identify the associated controlled parameter and indicate whether the constraint setpoint represents a minimum or maximum limit. An example of a single control loop with one constraint is shown in the following figure.
478
Process Input Limits Production One manipulated input defined for the MPC function block may be identified as an optimizing input (that is, an input that is to be maintained either at target or at a value that keeps one of the other manipulated inputs at a defined maximum or minimum limit). When a manipulated input is selected for optimization, you must configure a minimum or maximum limit for the other manipulated inputs. Also, no connection is required for the control input associated with the manipulated output used to set throughput. When the throughput setpoint is changed, the manipulated output for throughput adjustment will be changed until the setpoint is reached. If another manipulated parameter reaches or exceeds its configured high or low limit on a change in either throughput target or during normal operations, the throughput will be adjusted to maintain the manipulated output at its limit. An example of an MPC function block being used to control two parameters as well as optimized throughput is shown in the following figure.
Large Multivariable Applications The design of many processes requires that the control strategy address multiple controlled, constraint, and disturbance outputs through the adjustment of multiple manipulated process inputs. The MPC function block can control processes of size 8x8 (for example, four controlled, four constraint, four disturbance, and four manipulated parameters maximum). The lime kiln example in this topic demonstrates how the techniques used in previous examples may be combined to meet the control requirement of a more complex process.
479
The following figure illustrates a typical lime kiln process and instrumentation for the recausticizing area of a pulp mill. This process is 3x4 in size, where gas and ID fan speed are manipulated to control the material and exit gas temperature at the hot and cold end of the kiln. Constraints on gas and ID fan speed adjustment are set by limits on O2 and hood draft, respectively. The lime mud flow throughput is maximized within the constraints of the ID fan speed limits.
A traditional control strategy for the lime kiln is shown in the following figure. For simplicity, the PID controller associated with the mud flow and gas flow are not shown but are required in the final implementation. The kiln control requires a total of six PID controllers (plus the gas and lime mud flow PID controllers), three control selectors, and nine math and dynamic elements. A decoupling network addresses the interaction between the hot and cold end temperature control. Constraints on O2 and draft are provided as overrides on gas flow and ID fan speed adjustment. Throughput is maximized based on the ID fan being the limiting factor on production.
480
The equivalent control is provided by one MPC function block. The complete control strategy (including the lime and mud flow control) using the MPC function block is shown in the following figure.
481
MPC_INREF Template
The MPC Input Reference template is used to map MPC relevant data from a specified upstream function block into the current module. The following rules apply. The specified upstream function block must be an AI, a PID, an FLC, or an SCLR function block. The upstream function block path is entered into the PATH parameter in the //<MODULE>/<BLOCK> (upper case) format.
MPC_INREF Quick Config Parameters Quick Config Parameters for MPC_INREF Parameter PATH Description The path of the upstream function block. The path must be entered in the following format: //<MODULE>/<BLOCK> (upper case)
MPC_OUTREF Template
The MPC Output Reference template is used to map MPC relevant data from a specified downstream function block into the current module. The following rules apply. The specified downstream function block must be an AO, a PID, or an FLC function block. The downstream function block path is entered in the PATH parameter in the //<MODULE>/<BLOCK> (upper case) format.
The MPC Output Reference composite template supports standard alarming. MPC_OUTREF Quick Config Parameters Quick Config Parameters for MPC_OUTREF Parameter PATH Description The path of the downstream function block. The path must be entered in the following format: //<MODULE>/<BLOCK> (upper case)
482
MPC Process Simulator Block MNPLTx is the Manipulated Variable input of the process. DSTRBx is the Disturbance Variable input of the process. CNTRLx is the Controlled Variable output of the process. CNSTRx is the Constraint Variable output of the process. FOLLOW is provided to allow the process dynamics to be initialized.
483
BAD_ACTIVE
None
BAD_MASK
None
CNSTR [14]
484
Unit The output units of the connected block. The output units of the connected block. None
Description Controlled parameter (inputs to the MPC function block). Process output that is to be maintained at a specific target value.
DSTRB [14]
Disturbance parameter. Process input that is determined by upstream process condition and impacts controlled and constraint parameters. Allows the output to track the input or the input times gain (True = Active; False = Inactive). When enabled, this parameter is used to force the MPC Process Simulator function block to a steady state condition. Manipulated parameter (output from the MPC function block). Process inputs that are adjusted by the MPC block in automatic operation or by an operator in manual mode.
FOLLOW
MNPLT [14]
Once the module containing the MPC Process Simulator function block has been downloaded, the MPC function block should operate similarly to when it is in control of the process. An example of a module containing an MPC Process Simulator function block is shown in the following figure.
485
486
487
488
The MPCPro algorithm executes in the following order: 1 2 3 It evaluates the actual mode based on target mode and the status of block inputs. It compares the current value of predicted process Control and Constraint parameters to those calculated by the model and updates the model. It determines the optimum Manipulated parameter values that maximize profit without violating process input or constraint limits (based on the objective selected by the operator). It then calculates the associated value of the process outputs. The MPCPro controller executes using the target value of selected Control and/or Constraint target values. It determines the status and value for block outputs update.
4 5
The processing done at each step of execution is described in the following sections.
Based on these conditions, the actual block mode must be calculated before the MPCPro algorithm executes. The actual mode influences the path taken in the MPCPro algorithm execution.
489
Mode Evaluation Order The actual mode of the MPCPro block must be determined after all inputs are read but before the MPCPro control algorithm is executed. The following figure shows the conditions that are determined in the block before the actual mode is calculated.
490
The conditions that impact mode are evaluated before executing the MODE calculation. These conditions are evaluated in the following order: 1 2 Not Generated If the control has not been generated for this block, then the Generate flag is set. Otherwise this flag is cleared. Bad Control Input: If the status of one or more Control or Constraint parameters is Bad, Good Constant, or Uncertain (and the status option is configured to treat Uncertain as Bad) AND the Fail Condition for that input is Manual, then the Bad Control Input flag is set. Otherwise, the Bad Control Input Flag is cleared. If the input is Bad , Uncertain (and treated as Bad) or Good Constant, then take the configured fail action. If Simulate is defined as the Fail Condition, or the input has a status of constant (analyzer or manual input) then the associated model value from the last execution is passed to the MPCPro algorithm as the measured input. A Simulate timer is set (if not already set). Reset the Simulate time if none of the Control inputs are being simulated.
Simulate Too Long The simulate timer is checked to see if it is set or cleared. If the Simulate timer exceeds the timeout limit based on time to steady state, then the Simulate Too Long flag is set. Otherwise, the Simulate Too Long flag is cleared. Bad Disturbance Input If the status of one or more Disturbance parameters is Bad or Uncertain (and the status option is configured to treat Uncertain as Bad) AND the Fail Condition for that input is Manual, then the Bad Disturbance Input flag is set. Otherwise, the Bad Disturbance Input flag is cleared. If a Disturbance input is Bad and Hold Last Good is defined as the Fail Condition, then the input value used in the MPCPro control is not updated. Bad Downstream If no handshake has completed or the handshake associated with one or more of the Manipulated process inputs is incomplete ( as a result of the back calculation inputs having a status of Bad or a status of Good Cascade Not Invited) and the associated Fail Condition for that input is Manual, then set the Bad Downstream flag. Otherwise, the Bad Downstream flag is cleared. If the handshake is incomplete and the Fail Condition is hold last good, then the last good back calculation input is passed as the current position of the MV to the MPCPro algorithm. Remote Unavailable If the target mode of the MPCPro block is RCAS and the handshake with one or more of the RCAS inputs is not complete, then the Remote Unavailable flag is set. Otherwise, the Remote Unavailable flag is cleared. Remote Timeout If the actual mode of the MPCPro block is RCAS, then a remote timer is set (if not already set) for each RCAS input that has not been updated since the last execution. If any of the RCAS timers exceed the limit based on the time to steady state, then the Remote Timeout flag is set. If the actual mode of the block is not RCAS, then the remote timers are reset. Test Active Handshake is complete with downstream loops that will be required for automated testing and process identification is ready to start. While testing is active, the mode of the MPCPro block transitions to LO to indicate to an operator that one or more MPCPro outputs are automatically adjusted.
491
For complete descriptions of the supported modes, refer to the Function Block Modes topic. Mode Calculation The MPCPro block actual mode is calculated as follows based on the target mode and the condition: If the MPCPro Target mode is OOS, then the actual mode is OOS and the status of the MPCPro outputs are set to Bad OOS. If the MPCPro Target mode is not OOS and the Test Active flag is set, then the actual mode is LO to indicate that testing is active. If the MPCPro Target mode is not OOS and the Bad Downstream flag is set, then the actual mode is IMAN to indicate that the path to the process is broken. If the MPCPro Target mode is not OOS and the Bad Downstream flags are clear but the Bad Control or Bad Disturbance flag is set, then the actual mode is MAN. If the MPCPro Target mode is AUTO and the Bad Downstream, Not Generated, Bad Control, Bad Disturbance and the Simulate Too Long flags are clear, then the actual mode is AUTO. If the Target mode is MAN for these conditions, then the Actual mode will be MAN. If the MPCPro Target mode is AUTO and the Bad Downstream, Not Generated, Bad Control, and Bad Disturbance flags are clear and the Simulate Too Long flag is set, then the Actual mode is MAN. If the Target mode is MAN for these conditions, then the Actual mode will be MAN. If the Target mode is RCAS and the Bad Downstream, Not Generated, Bad Control, Bad Disturbance, and Simulate Too Long flags are clear but the Remote Unavailable flag is set, then the Actual mode is AUTO. If the Target mode is RCAS and the Bad Downstream, Bad Control and Bad Disturbance, Not Generated, Remote Available, Simulate Too Long and Remote timeout flags are clear then the Actual mode is RCAS. If the Target is RCAS and the Bad Downstream, Bad Control and Bad Disturbance, Not Generated, Remote Available, and Simulate Too Long flags are clear and the Remote Timeout flag is set and the previous Actual mode was RCAS, then the block mode should shed to the next available mode.
When the status of a downstream block changes to Good Cascade Initialization Request, then, if the MPCPro block Target mode is not OOS, it will immediately do a handshake with the downstream block. After the handshake completes, the initialization value is maintained in the associated output unless it is changed by an operator (in IMAN or MAN mode) or changed by the MPCPro algorithm (in AUTO or RCAS mode). Indications of a limit condition or alarm active in the input status provided to MPCPro has no impact on the MPCPro block mode or the handshake that is done by the MPCPro block. An operator disabling a process input or output has no impact.
492
Update Output Value and Status The manner in which the MPCPro function block outputs are updated depends on the mode of the MPCPro block and whether a cascade connection has been established with a downstream block. In OOS mode, the status of the MPCPro outputs is set to BAD Out of Service. The block does not change the value of block outputs. In IMAN mode, the MPCPro function block is unable to establish a cascade connection with one or more of the downstream blocks that are configured as required for control. Normally this occurs when they are not in the correct mode. Until the initialization process is complete for an output, the calculated output provided by the MPCPro algorithm to match the value on its associated BKCAL_IN is written to the block output. Once the initialization process is complete for an input, the output remains at its last value with a status of GOOD Cascade NonSpecific, Not limited. In MAN mode, the output values are not written by the MPCPro algorithm but can be changed by the operator. The status of the outputs is GOOD Cascade NonSpecific, Not Limited. In AUTO mode, the calculated output is written to the output or maintained at last value if the calculated output will drive the output further within its downstream limit. The output status is set to Good Cascade NonSpecific.
MPCPro Function Block Execution Rate MPCPro can be used in an application as long as a function block execution time of one second or slower is sufficient to meet your process control requirements. The MPCPro function block execution is automatically set based on the Time to Steady State to provide an algorithm execution rate of one second or slower. Since the MPCPro algorithm uses model and controller matrices that are generated on a very specific time base, the DeltaV PredictPro application automatically configures the effective scan rate of the MPCPro block. The execution time is defined by the process response time estimation (entered as the Time to Steady State when you request that the process be tested for identification) divided by prediction horizon (120 samples) in seconds. Alarming When the MPCPro function block detects configuration errors or abnormal conditions, the errors and abnormal conditions are automatically reflected in the BLOCK_ERR parameter. Set the BAD_MASK parameter to determine which condition set BAD_ACTIVE. All conditions not included in BAD_ACTIVE are reflected in the ABNORMAL_ACTIVE parameters. These xxxx_ACTIVE parameters can be used in defining module alarms.
MPCPro Configuration
Note Any change in the block configuration requires that you reconnect to the block from the PredictPro application for the change to be reflected in the block's behavior. Since the number of inputs and outputs associated with an MPCPro application can vary, the MPCPro block is designed to support a total of twenty (20) Disturbance and Manipulated inputs and a total of twenty (20) Controlled and Constraint parameters. Use the Control Studio application to configure the MPCPro block. To enter configuration information, right-click the MPCPro function block and select Properties to open the Properties dialog box. Use this dialog box to add Control, Manipulate, Constraint, or Disturbance parameters and enter configuration information.
493
Select the Controlled, Manipulated, Disturbance or Constraint tab on this dialog and click the Add button to add a new entry. The Controlled tab is selected in the following image.
Once you have added parameters to the MPCPro block, you can modify them from this dialog by selecting a parameter and choosing Modify. A dialog for defining the associated parameters opens.
494
Configuring Controlled Parameters For a Controlled parameter, the following dialog opens.
Provide the following configuration information: Description The parameter name that you want to appear in the PredictPro application and the MPCPro Operate view. (MPCPro Operate is built with MPCPro dynamos. Refer to MPCPro dynamos in the Dynamo Reference topic for more information.) The default description name is the input instance number for example, Out 1. You can create a new description; it is recommended that the parameter description contain 14 or fewer characters. SP Filter Time The filter time (in seconds) is used to set the setpoint trajectory. SP Low Limit The minimum SP value (in engineering units) that an operator can enter. A setpoint entry that is lower than this limit is truncated to the limit value. SP High Limit The maximum SP value (in engineering units) that an operator can enter. A setpoint entry that is greater than this limit is truncated to the limit value. Track SP If checked, the SP will track the Controlled parameter value when the MPCPro block is in a Target mode of MAN or Actual mode of IMAN . Parameter path The reference to the block output that will provide the Control parameter value. If the block providing this value is contained in the same module as the MPCPro block, select the Browse Internal button to define the parameter path. Otherwise, select the Browse External button to define the parameter path. When the advanced button is selected in the property dialog, additional information appears at the bottom of the Control parameter dialog as shown below.
495
Fail Condition - The action to be taken when the input status indicates a BAD input. The actions that can be taken are: No Action Take no control action on the measurement value. Shed Local Modes Change the downstream blocks associated with the Manipulated parameters to their local mode as defined by Local Shed mode selection of the Manipulate parameter. Manual Change the actual mode of the MPCPro block to Manual until the condition clears. Simulate Fail Manual Simulate the measurement input. If the time of simulation exceeds the maximum allowed (based on time to steady state), then the MPC actual mode will change to Man until this condition clears. Simulate Fail Shed Local Simulate the measurement input. If the time of simulation exceed the maximum allowed (based on time to steady state), then the downstream blocks associated with the Manipulated parameters will be forced to their local mode as defined by Local Shed mode selection of the Manipulate parameter.
Optimization The impact of the Control parameter on plant cost or profit. The selections are: None Not considered in the objective function. There is no cost or profit associated with this parameter. Maximize Indicates that this parameter is associated with profit. Minimize Indicates that this parameter is associated with cost.
SP rangeThe maximum amount that the optimizer can change the working setpoint used in control from the operator specified setpoint. Priority Numeric value that can be assigned to Control and Constraint parameters to indicate relative importance where the smaller number indicates greater importance/priority. If it is not possible for the optimizer to find a solution that satisfies all operating constraint limits within the specified control ranges, then a solution will be found that satisfies the control ranges and constraint limits that have the highest priority. Remote SP The setpoint of the Control parameter will be set by another application or function block that is writing to the associated RCAS_IN(xx) parameter. Configuring Manipulated Parameters For a Manipulated parameter, the following dialog opens.
496
Provide the following configuration information: Description The parameter name that you want to appear in the PredictPro application and the MPCPro Operate view. (MPCPro Operate is built with MPCPro dynamos. Refer to MPCPro dynamos in the Dynamo Reference topic for more information.) The default description name is the input instance number for example, In 1. You can create a new description; however, it is recommended that the parameter description contain 14 or fewer characters. Maximum MV Rate The maximum rate (in engineering units per second) at which the MPCPro function block can change the Manipulated parameter. Low Limit The minimum output value (in engineering units) that an operator can enter. An entry that is lower than this limit is truncated to the limit value. High Limit The maximum output value (in engineering units) that an operator can enter. An entry that is greater than this limit is truncated to the limit value. Parameter Path The reference to the block input that is written to the manipulate value. Based on this path, the MPCPro block automatically accesses the mode and back calculation output of the downstream block. If the block providing this value is contained in the same module as the MPCPro block, select the Browse Internal button to define the parameter path. Otherwise, select the Browse External button to define the parameter path. When the advanced button is selected in the Property dialog, the additional information appears at the bottom of the Manipulate parameter dialog as shown in the following figure.
Fail Condition The action to be taken when the feedback from the downstream block contains a status of BAD or Not Invited: No Action Maintain the manipulate parameter at its current value with no impact on MPCPro mode. Shed Local Modes Change the downstream blocks associated with the Manipulated parameters to their local mode as defined by Local Shed mode selection of the Manipulate parameter. Manual Change the actual mode of the MPCPro block to MAN until the condition clears.
Optimization The impact of the manipulate parameter on plant cost or profit. The selections are: None Not considered in the objective function. There is no cost or profit associated with this parameter Maximize Indicates that this parameter is associated with profit Minimize Indicates that this parameter is associated with cost.
Local Shed Mode The target mode that the downstream block will be forced to when a input or output failure is detected and the Failure action is defined as Shed Local. The selections are: Next Lower The mode will be written to the next lower permitted mode of the downstream block. The selection order is: =>Rout =>Rcas =>Cas >=>Auto =>Man
497
Configuring Disturbance Parameters For a Disturbance parameter, the following configuration dialog appears.
Provide the following configuration information: Description The parameter name that you want to appear in the PredictPro application and the MPCPro Operate view (MPCPro Operate is built with MPCPro dynamos. Refer to MPCPro dynamos in the Dynamo Reference topic for more information.) The default description name is the input instance number for example, In 2. You can create a new description; however, it is recommended that the parameter description contain 14 or fewer characters. Parameter path The reference to the block output that provides the Disturbance input value. If the block providing this value is contained in the same module as the MPCPro block, select the Browse Internal button to define the parameter path. Otherwise, select the Browse External button to define the parameter path. When the advanced button is selected in the Property dialog, the additional information appears at the bottom of the Disturbance parameter dialog as shown in the following figure.
498
Fail condition: the action that should be taken when the Disturbance input has a BAD status. One of the following actions can be selected: Hold Last Good Maintain the last value of the Disturbance input that had a status of Good. Shed Local Modes Change the downstream blocks associated with the Manipulated parameters to their local mode as defined by the Local Shed Mode selection of the manipulate parameter. Manual Change the actual mode of the MPCPro block to manual until the condition clears.
Configuring Constraint Parameters For a Constraint parameter, the following configuration dialog appears.
Provide the following configuration information: Description The parameter name that you want to appear in the PredictPro application and the MPCPro Operate view (MPCPro Operate is built with MPCPro dynamos. Refer to MPCPro dynamos in the Dynamo Reference topic for more information.) The default description name is the input instance number, for example, 2nd output. You can create a new description; however, it is recommended that the parameter description contain 14 or fewer characters. Low Limit The minimum Constraint target (in engineering units). High Limit The maximum Constraint target (in engineering units). Parameter path The reference to the block output that provides the Constraint input value. If the block providing this value is contained in the same module as the MPCPro block, select the Browse Internal button to define the parameter path. Otherwise, select the Browse External button to define the parameter path. When the advanced button is selected in the property dialog, the additional information appears at the bottom of the Constraint parameter dialog as shown in the following figure.
499
Fail Condition The action to be taken when the input status indicates a BAD input. The actions that can be taken are: No Action Take no control action on the measurement value. Shed Local Modes Change the downstream blocks associated with the Manipulated parameters to their local mode as defined by Local Shed mode selection of the Manipulate parameter. Manual Change the actual mode of the MPCPro block to Manual until the condition clears. Simulate Fail Manual Simulate the measurement input. If the time of simulation exceeds the maximum allowed (based on time to steady state), then the MPC actual mode will change to Man until this condition clears. Simulate Fail Shed Local Simulate the measurement input. If the time of simulation exceed the maximum allowed (based on time to steady state), then the downstream blocks associated with the Manipulated parameters will be forced to their local mode as defined by Local Shed mode selection of the Manipulate parameter.
Optimization The impact of the Control parameter on plant cost or profit. The selections are: None The parameter is not included in the objective function. There is no cost or profit associated with the parameter. Maximize Indicates that this parameter is associated with profit. Minimize Indicates that this parameter is associated with cost.
Priority Numeric value that can be assigned to Control and Constraint parameters to indicate relative importance where the smaller number indicates greater importance/priority. If it is not possible for the optimizer to find a solution that satisfies all operating constraint limits within the specified control ranges, then a solution will be found that satisfies the control ranges and constraint limits that have the highest priority.
500
The function blocks that are referenced by the MPCPro block can be within the same module or in a different module. The Manipulated outputs must reference the CAS_IN, RCAS_IN, or ROUT_IN inputs of the downstream function blocks. If the MPCPro block is being used to replace a PID block, it typically references the CAS_IN or RCAS_IN of an AO block. However, for many other applications, the output of the MPCPro function block can reference the cascade input or remote cascade input of a PID, Fuzzy Logic or Ratio function block that provides the process input. In such cases, the MPCPro function block treats the downstream process setpoint as the Manipulated process input. As such, the MPCPro function block's Manipulated output is referenced to the CAS_IN of this function block. The BKCAL_OUT and MODE of the downstream block referenced by the MPCPro Manipulated output is automatically read by the MPCPro block based on the path definition for the manipulated parameter. In some cases, the MPCPro function block replaces an existing control strategy that uses the CAS_IN of the downstream block. You can layer the MPCPro function block on the existing strategy to allow the MPCPro control to be implemented with the old strategy as a backup. You can achieve this by referencing the RCAS_IN and RCAS_OUT (or the ROUT_IN and ROUT_OUT unless referencing an AO block) of the downstream block. The MPCPro function block can reference these parameters in much the same way that it references the CAS_IN of a block.
501
BKCAL_IN [1N]
None None
MODE
None
502
Description Shows the value and status of Disturbance and Manipulated parameters, such as the inputs to the process, read by the MPCPro block. The number shown as part of the PROC_IN parameter name corresponds to the number contained in the Name field for the associated Disturbance and Manipulate parameter in the MPCPro Properties dialog when the advanced tab is selected. Note Since the Move option is provided to change a Disturbance parameter to a Manipulate parameter, a Name is assigned automatically to all N process inputs (Disturbance and Manipulate). This number, associated with a process input, remains the same even when the Move option is used to change its use in the MPCPro block. Shows the value and status of Control and Constraint parameters, such as the outputs of the process read by the MPCPro block. The number shown as part of the PROC_OUT parameter name corresponds to the number contained in the Name field for the associated Control or Constraint parameter in the MPCPro Properties dialog when the advanced tab is selected. Note Since the Move option is provided to change a Control parameter to a Constraint parameter, a Name is assigned automatically to all M process outputs (Control and Constraint parameters). This number, associated with a process output, remains the same even when the Move option is used to change its use in the MPCPro block. Shows the value and status of the remote setpoints provided by another function block or application. These will be used as the MPCPro block setpoint when the actual mode of the MPCPro block is RCAS. The number shown as part of the RCAS_IN parameter name corresponds to the number contained in the Name field for the associated Control parameter in the MPCPro Properties dialog when the advanced tab is selected. Note Since the Move option is provided to change a Control parameter to a Constraint parameter, a Name is assigned automatically to all M process outputs (Control and Constraint parameters). This number, associated with a process output, remains the same even when the Move option is used to change its use in the MPCPro block.
PROC_OUT [1M]
RCAS_IN [1M]
503
Description Shows the backcalculation value and status provided to another function block or application that is writing a remote setpoint to the RCAS_IN parameter. The number shown as part of the RCAS_OUT parameter name corresponds to the number contained in the Name field for the associated Control parameter in the MPCPro Properties dialog when the advanced tab is selected. Note Since the Move option is provided to change a Control parameter to a Constraint parameter, a Name is assigned automatically to all M process outputs (Control and Constraint parameters). This number, associated with a process output, remains the same even when the Move option is used to change its use in the MPCPro block. Shows the setpoints used by the MPCPro block. This value can be set by an operator (in Auto mode) or indirectly by a function block or application when the mode is RCAS (and remote setpoint capability has been selected for the Control parameter). The number shown as part of the SP parameter name corresponds to the number contained in the Name field for the associated Control parameter in the MPCPro Properties dialog when the advanced tab is selected. Note Since the Move option is provided to change a Control parameter to a Constraint parameter (using move selection), a Name is assigned automatically to all M process outputs (Control and Constraint parameters). This number, associated with a process output, remains the same even when the Move option is used to change its use in the MPCPro block. Shows the working setpoints used by the MPCPro block. This value can differ from the operator setpoint on a setpoint change based on the setpoint filter. Also, the optimizer can change the working setpoint within the control range to meet a selected objective. The number shown as part of the SP_WRK parameter name corresponds to the number contained in the Name field for the associated Control parameter in the MPCPro Properties dialog when the advanced tab is selected. Note Since the Move option is provided to change a Control parameter to a Constraint parameter, a Name is assigned automatically to all M process outputs (Control and Constraint parameters). This number, associated with a process output, remains the same even when the Move option is used to change its use in the MPCPro block. Option to allow action on Uncertain input to be selected. The largest standard deviation calculation for the control parameters over the standard deviation time. Refer to Loop Performance Calculations for more details on how this parameter is calculated.
SP [1M]
SP_WRK [1M]
STATUS_OPTS STDEV
504
Parameter STDEV_CAP
Description The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
STDEV_TIME
Seconds
The execution rate of the MPCPro function block is limited to one second or slower. Therefore, MPCPro should be applied to processes where control requirements can be satisfied at these execution speeds.
505
Large Multivariable Applications The design of many processes requires that the control strategy address multiple Controlled, Constraint, and Disturbance outputs through the adjustment of multiple Manipulated process inputs. The MPCPro function block can control processes of size 20x20, for example, a total of 20 Disturbance and Manipulated parameters, and a total of 20 Control and Constraint parameters. To show how MPCPro can be applied to the control of a multivariable process, we will consider as an example, an oil fractionator process. This problem has been published by Shell and includes typical process dynamics with normalized inputs and output. In this example, it is assumed that the heat requirement of the column enters with the feed. The column has three product draws and three side circulating loops that remove heat to achieve the desired product separation. The heat duty associated with the bottom loop can be adjusted. The heat duty of the other recirculating loop can be measured but is determined by other parts of the plant. The specification for the top and side draws are determined by economics and operating requirements. There is no product specification for the bottom draw but there is an operating constraint on the temperature in the lower part of the column. The following figure shows the process.
506
From a control perspective, the process inputs and outputs can be visualized in the following manner based on the process design, available measurements, and operating requirements.
In general, it is recommended that the MPCPro block be included in a module by itself. This allows the module to be downloaded at any time. The MPCPro block can externally reference the measurements and control loops in other control loops. For simplicity, the MPCPro block has been included in the same modules as the measurements and loops it references, as shown in the following figure.
The complete configuration of the MPCPro block is shown in the following figures. The setpoint limits are based on the normalized range in this example. In an actual application, these limits should be set in engineering units based on the actual range of the measurements and actuators.
507
After this module is downloaded, launch the DeltaV PredictPro application to commission and test the control. The PredictPro application can be launched from the Start menu or by right clicking the MPCPro block The following figure shows the main screen of the PredictPro application as launched from the example MPCPro block.
508
Based on the MPCPro block configuration, the Control, Manipulated, Constraint, and Disturbance parameters are automatically displayed. Notice that the Description that was configured for each of these parameters is used in the faceplate representation. For this example, the Control selection has already been changed from Local to MPC which forced the downstream blocks to automatically change their target mode to RCAS. Thus, the mode of the MPCPro block is MAN. Also, notice that some parameters are being trended. This is accomplished by clicking in the faceplate check box for the parameter to be plotted. By selecting the setup button, the Manipulated parameters that are included in the test can be selected, as shown below.
In this example, all the Manipulated parameters have been chosen for use in the automated test. Click the Select All for Test button to include all parameters. The default step size of 5 percent will be used in the test. Since all process outputs and disturbances are to be identified (the default selection), then nothing more must be done in the setup.
509
Return to the application's top level view, and click the Test button to run the test . In response, the Manipulated parameters will be automatically changed in a pseudo-random manner.
When the automated test is complete, the area of testing is automatically selected as shown in the following figure.
510
Since the process operation during the time of test was normal, all the test data will be used to generate the model. Thus, by selecting the Autogeneration button, the model and controller for the process is generated. Verification of the set response is shown below. For purposes of this example, the process response has been scaled by a factor of 100.
511
Based on the square error indicated in the verification, the model has been accurately identified. Further verification of the model can be done by examining each step response and comparing this to your knowledge of the process. An example of the Top End Point Composition is shown in the following figure.
Also, further confirmation of the model can be done by comparing the FIR response to the ARX response and examining the confidence interval for one of the step responses as shown in the following figure. Choose Options | Expert to use this command.
512
The Control or Constraint parameter that best reflects changes in the Manipulate parameter are automatically selected for use in the controller generation. The Control or Constraint parameters that have been selected are represented in different colors in the step response for each Manipulate parameter. For example, the selection for the Top Draw Flow is shown in the following figure.
The selection of the parameters used in control is based on the parameters' impact on the condition number associated with the control matrix that is generated. Also, the deadtime and gain associated with a parameter should be considered in this selection. Preference is given to Control parameters if the performance is nearly the same as that given for Constraint parameters. You can examine the Control and Constraint parameters selected for the control generation by selecting Controller Setup in the left pane. Choose Option | Expert to see this option. For this example, the information displayed is shown in the following figure.
513
For this example, the automatic choice of parameters gives a condition number of 18. If the Control and Constraint parameters are highly co-linear, that is reflecting the same information, it is possible that Control and Constraint parameters cannot be selected for some of the Manipulate parameters. Also, under certain conditions, the user can choose to force this condition by removing a parameter in the selection list as shown above if this leads to a lower condition number. Generally, better control will be provided by a lower condition number. The Standard objective function provided as the default for MPCPro can be used without modification for many applications. This default objective function is designed to provide control action that maintains the Control parameters at setpoint within the operating constraints. When there are extra degrees of freedom, for example, the number of manipulate parameters exceed the number of Controlled parameters as in this example, the Manipulated parameters will be minimized while maintaining the Control parameters at setpoint. When it is predicted that a Constraint parameter will violate one of its limits, the working setpoint of the Control parameters can be automatically modified within their specified range. If there is a conflict in satisfying the constraints and operating range, then the Control or Constraint parameters that are at their limit and are of lowest priority will be given up so that the remaining Control and Constraint parameters can be maintained within limits. For this application, the Standard objective function can be used. However, under certain market conditions, it can be desirable to maximize the top draw while maintaining the composition. Thus, a second objective function can be defined as shown in the following figure.
514
In this case, the dollar profit associated with a percent change in the top and side end point composition and the top draw flow are not known or can change daily. Thus, the unit cost that is provided is used to indicate the relative value of maintaining composition versus maximizing top draw. For this objective, an objective name of MaxTopDraw is defined. Click the Operator Selectable checkbox for this objective to be available to the operator. Once any objectives have been defined, it is important to download the module to use these new objective functions in simulation and in on-line operation.
515
To test the column control off-line, select the model in the left pane and click the Simulate button. This command is available if you have selected Options | Expert. The following figure shows the Simulate interface for the example MPCPro block when MPCPro is in Automatic mode and the Standard objective function has been selected.
516
You can observe the control responses by changing the setpoint. You can also change the control objective to examine the impact on the process. For example, the impact of changing the objective from Standard to MaxTopDraw is reflected in the trend as shown in the following figure.
517
Once the MPCPro control has been verified using the simulation environment of PredictPro, the module containing the MPCPro block can be put into service. The predefined dynamos for PredictPro can be included in the Operator Interface. The following figure shows an MPCPro Operate view for this example.
518
519
5 6
Note Set the Historian Sampling Period only from the Properties dialog of the NN function block. Do not use the History Collection dialog.
520
7 8 9
Save the module and download it to the controller. Verify that the transmitters that provide the inputs are working correctly. Make sure the Continuous Historian is enabled, the area containing the module has been assigned to the historian and the Continuous Historian has been downloaded.
10 Start the Neural application and connect to the NN block. 11 Select historical data and train the network. 12 Download the trained network to the controller. Refer to the DeltaV Neural topic for more information on using the Neural application to train, test, and download your network model. Defining Process Inputs Because the number of inputs to a neural network can vary, the NN function block uses extensible parameters for process inputs. After you decide which process inputs may affect the process output you are modeling, right click the NN function block and select Extensible Parameters. The following dialog appears:
Use the spin buttons to enter the number of extensible parameters you need for the number of process inputs you are using, and then click OK. You can configure as many as 20 variables as inputs to the Neural Network, but the model uses a maximum of 16 inputs. You (or the Neural application) eliminate variables when creating the model so that no more than 16 inputs remain. Next, right click the NN block and select Properties. The Neural Network block Properties dialog appears with default process input parameter information. The dialog also contains the modeled parameter (the process output the network models) name and a default description. You can change the text in the Parameter description field if you desire.
521
Next, configure the Historian Sampling Period to define the rate at which the data is going to be stored in the DeltaV Historian. This should correspond to sampling period required by the fastest moving process input.
Use the Properties dialog to open the Parameter Properties dialog for all process inputs to configure the Neural Network's input parameters. Select a parameter and click the Modify button. The Parameter Properties dialog opens.
Use the Parameter Properties dialog to specify a valid parameter path and a unique identifier for each process input. Note that the path and identifier must be unique for each process input parameter. Note that you cannot change the value in the Used field from either the Neural Network Properties or the parameter Properties dialog. That field indicates if the specific parameter is used in the neural network model assigned to the Neural Network block after training. Because the Neural Network is not trained yet, the Used fields default to No for all the input parameters. Note Set the Historian Sampling Period only from the Properties dialog of the NN function block. Do not use the History Collection dialog. After you make all the required changes to the module, you can save and download the module to the DeltaV controller. You must also download the Continuous Historian for data to be historically trended.
522
523
524
BLOCK_ERR
None
CORR_FILTER
Seconds
525
Parameter CORR_LIM
Description Absolute value of the maximum difference between the sampled value and the neural network output. Limited to 10% of scale. The time elapsed between sampling and lab analysis or sampled analyzer output being available to the NN block. In AUTO mode, the OUT parameter tracks the SAMPLE input value and status when FOLLOW is active (True). If FOLLOW is inactive (False), OUT is calculated based on the block algorithm. The predicted value that the process output would become if the input values were to remain constant at their current value and status. User-specified unique description of INn. These parameters appear only after the network has been trained. Input value and status. These parameters appear only after the network has been trained.
DELAY FOLLOW
FUTURE
EU of OUT_SCALE None
INSPECT_ACT
Indicates if Inspect is enabled and one or more of the limits for the block have been exceeded. The normal value is 0. This parameter is set by the Inspect application and is set to 1 if the following conditions are true: - The Write To Inspect Alarm context menu item was selected from Inspect for this block. - With the Current Hour filter selected, Inspect indicates that an abnormal condition exists for Mode, Control, Input, or Variability. (Note that an abnormal condition will only exist for Variability if both the Variability Index and the Standard Deviation have exceeded their defined limits.) Parameter used to show and set the block operating state. MODE contains the actual, target, permitted, and normal modes. The process output value calculated by the neural network based on process inputs. The high and low scale values, engineering units code, and number of digits to the right of the decimal point associated with OUT. Sampled process output determined by lab analysis or by a sampled analyzer.
MODE
None
OUT OUT_SCALE
EU of OUT_SCALE None
SAMPLE
EU of PV_SCALE
526
Description Description of the sampled process output. This description appears in the parameter list in the Neural application. The standard deviation of PV. For analog control blocks in AUTO, mean is assumed to be the SP. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The estimated capability standard deviation (measurement of short term variation). An estimate of the least standard deviation the process could achieve ideally. Refer to Loop Performance Calculations for more details on how this parameter is calculated. The timeframe over which STDEV and STDEV_CAP are performed. The default value of zero is good for most processes where the scan rate is no more than approximately 10 times faster than the time to steady state. If the process is relatively much slower, it is recommended that you enter the approximate time it takes for the process to return to steady state after a change. This ensures that the STDEV and STDEV_CAP calculations accurately consider the actual time constant of the process.
STDEV_CAP
Percent of scale
STDEV_TIME
Seconds
527
528
Custom Blocks
You can create custom blocks that meet your specific needs. The custom block can be an embedded composite, a linked composite, or a module block. Use the Custom Block Assistant to create a custom function block.
Custom Blocks
529
530
Input Parameter
An input parameter appears automatically as an input connector when the object is included in a module or composite block. The input parameter provides an input connection that allows you to bring in signals from other modules or from the field.
531
The following figure shows an example of an input parameter that has been added at the module level and how it looks on a function block diagram. Notice in the Parameter View that the INPUT parameter appears at the module level. If this module were used inside of another module on a function block diagram, you could directly wire a signal to that parameter.
Example of Input Parameter Promoted to Module Level Use the input parameter to make a parameter visible outside of its current level. If you had put this module with the input parameter into another function block diagram as a module block, you would see the input parameter as shown below:
Module Block View of Input Parameter Note Do not reference an external parameter that references another external parameter. (You can configure this, but it will cause you problems at run time.)
Note In most cases, if the input parameter is used as an external reference to another module's parameter, the external reference will not work if the referenced parameter does have the CV field. There is one exception; you can reference Mode of a standard DeltaV function block. The Mode parameter does not have the CV field.
Output Parameter
An output parameter appears automatically as an output connector when the object is included in a module block or composite. The output parameter provides an output connection that allows you to send signals to other blocks, modules, displays, or to field devices.
532
The following figure shows an example of an output parameter that has been added at the module level and how it looks on a function block diagram. Notice in the Parameter View that the OUTPUT parameter appears at the module level. If this module were used inside of another module on a function block diagram, you could directly wire a signal from that parameter.
Example of Output Parameter Promoted to Module Level Use the output parameter to make a parameter visible outside of its current level. If you had put this module with the output parameter into another function block diagram as a module block, you would see the output parameter as shown below:
Module Block View of Output Parameter Note In most cases, if the output parameter is used as an external reference to another module's parameter, the external reference will not work if the referenced parameter does have the CV field. There is one exception; you can reference Mode of a standard DeltaV function block. The Mode parameter does not have the CV field.
533
Note Make sure this parameter does not reference an external reference parameter from within this same module. (You can configure this, but it will cause problems at run time.)
Custom Block Wizard Block Types Function Block - A primitive or basic block that provides commonly used functions for your algorithm. Extended Block - A DeltaV function block that has been defined to run in a fieldbus device. Embedded Composite - A block that is not linked to the original object. An embedded composite contains one or more other blocks and parameters. If changes are made to the original object, this composite will be unaffected. Use this type when you want an independent, standalone copy of an existing composite. Linked Composite - A block that is linked to a composite block or template. A linked block is a composite of one or more other blocks and parameters. If changes are made to the original composite block, the changes affect this block (unless the changes are made to a parameter that is no longer linked to the original template). Module Block - A block that provides input/output connectors to another module from within the module you are editing. For example, when implementing cascade control, you could have an inner loop and an outer loop that execute at different rates. The module block you add here could control one loop, and the module you are editing could control the other. The scan rate is a property of a module.
Index
Numerics
848T Device and the MAI function block 144
117
Discrete Output,Parameters
117
A
Action function block Add function block 382 293 78
306
E
engineering units,custom EU,custom 78 79 41 41 79
F
Filter function block filtering,AI block floating point 56 FRSI add-on options 74 85 178
385 474
application examples,MPC
function blocks
1 454
B
Bias/Gain function block 156 390 392
I
I/O options 68 input options 73 531 183 456
Boolean Fan Input function block Boolean Fan Output function block
input parameter
C
Calculation/Logic function block cascade 19 395 159
Inspect Function Block, block execution Inspect Function Block, parameters integration options 72 317 533 533 457
Integrator function block 74 internal read parameter internal write parameter 169
Control Selector function block Counter function block custom block assistant 326 534
L
LE Function Block, modes 460 461 460 LE Function Block, parameters
D
Date Time Event function block Deadtime function block 174 412 329
LE Function Block,schematic diagram LE function block,status handling Lead/Lag function block limit conditions 29 197 461
Index
535
202
427 532
M
Manual function block mode,shedding 17 464 209
P
parameter data types parameter filtering parameters,alarm 41 55 74 74
parameters,conditional alarming physical block assistant 464 PID 210 210 534
MPC Process Simulator Function Block,application example 485 MPC Process Simulator Function Block,Block Execution 484 MPC Process Simulator Function Block,Parameters 484 MPC Process Simulator Function Block,Schematic Diagram 483 MPC,application examples MPC,template 482 502 488 474
430
PT_COMP,faceplate
R
Ramp function block 247 250 Rate Limit function block Ratio function block 260 432
339
S
Scaler function block 264 434 Set/Reset Flip-flop function block 423 shed 17 270
N
NAMUR alarming 86 Negative Edge Trigger function block
Neural Network Function Block,schematic diagram 520 NN Function Block,block execution NN Function Block,configuration NN Function Block,modes 523 520 524 523 520
Signal Characterizer function block Signal Generator function block Signal Selector function block Splitter function block status options 70 29 322 285
274 277
NN Function Block,parameters
O
Off-Delay Timer function block On-Delay Timer function block 333 336
T
Timed Pulse function block Transfer function block 436 342
536