ControlEdge RTU Electronic Flow Measurement Users Guide RTDOC X547 en 172A
ControlEdge RTU Electronic Flow Measurement Users Guide RTDOC X547 en 172A
Release 172.1
2
Contents
CONTENTS
Contents 3
Chapter 1 - About this guide 5
Chapter 2 - Overview 9
Chapter 3 - Compatibility 11
Chapter 4 - Configuring gas meter runs 13
Creating a new meter run 13
Meter Information properties for a gas meter run 14
Variable Selection properties for a gas meter run 18
Contract Settings properties for a gas meter run 25
Composition properties for a gas meter run 27
Record properties for a gas meter run 30
3
Contents
4
CHAPTER
Revision history
Revision Date Description
A February 2022 Initial release of this document
Intended audience
This documentation is intended for the following audience: Users who plan,
install, configure, operate, or maintain ControlEdge™ 2020 controllers
running the eCLR (IEC 61131-3) execution environment.
Prerequisite skills
Knowledge of SCADA systems and experience of working in a Microsoft
Windows environment are required.
5
Chapter 1 - About this guide
Special terms
The following table describes some commonly used industry-wide and
Honeywell-specific terminology:
Terminology Description
AI Analog Input
AO Analog Output
ControlEdge A integrated configuration tool to design, configure, program and maintain
Builder ControlEdge controllers.
CPM Control Processor Module
DI Digital Input
DNP3 Distributed Network Protocol V3.0
DO Digital Output
EFM Electronic Flow Measurement
Enron An extension of standard Modbus supports for 32-bit Integer and Floating
Modbus Point variables, and historical and flow data.
Experion® Experion® Process Knowledge System
PKS
Meter run Meter run in a flow measurement system represents a physical system
comprising primary flow measurement element supported by devices
measuring secondary parameters like density, pressure, temperature and
composition etc., to determine the quantifiable flow through the
measurement system.
6
Chapter 1 - About this guide
Related documents
The following list identifies publications that may contain information
relevant to the information in this document.
n ControlEdge Builder Software Installation User’s Guide
7
Chapter 1 - About this guide
8
CHAPTER
2 OVERVIEW
Electronic flow measurement systems are used for the measurement and
recording of flow parameters of gaseous phase hydrocarbon and other
related fluids for custody transfer applications utilizing industry recognized
primary measurement devices.
For the non-redundant controller, up to four meter runs, including gas and
liquid meter runs, can be created.
For the redundant controller, up to twelve meter runs, including gas and
liquid meter runs, can be created.
If a project upgraded from earlier to R161.2 or above releases is running in
the controller, before downloading a new project created using ControlEdge
Builder R161.2 or above releases with API21_1_V2 & API21_2_V2 function
blocks (new meter runs added) along with/without older meter runs,
perform the following steps:
1. Back up the current upgraded project before adding new meter runs.
2. Collect and back up all audit trail data by connecting with SCADA.
3. Remove all meter runs in the upgraded project, and download the
project to the controller. It is required to reset or free up the memory
resources of the controller, occupied by the meter runs.
4. Add new meter runs accordingly, either in a new project or the existing
upgraded project.
5. Compile and download the project.
9
Chapter 2 - Overview
10
CHAPTER
3 COMPATIBILITY
V1
ControlEdg
Project FW version Controller function V2 function block
e Builder
version selection type block (add/edit)
version
(add/edit)
R151.1 R151.1 or lower SC-UCMX01 R171.1 Supported Not supported
or
lower
R151.1 R151.1 or lower SC-UCNN11 R171.1 Supported Not supported
or
lower
R160.2 R160 SC- R171.1 Supported Not supported
UCNN11/S
C-UCMX02
R160.2 R161/R170/R17 SC- R171.1 Only Supported
1 UCNN11/S support
C-UCMX02 edit It is required to
upgrade controller to
R161.2/R170.1/R171.
1 first.
R161.1 R161/R170/R17 SC- R171.1 Only Supported
1 UCNN11/S support
C-UCMX02 edit It is required to
upgrade controller to
R161.2/R170.1/R171.
1 first.
R161.2 R170/R171 SC- R171.1 Not Supported
UCNN11/S applicable
C-UCMX02 It is required to
upgrade controller to
R170.1/R171.1 first.
11
Chapter 3 - Compatibility
12
CHAPTER
For register range, offset, system event and description, see EFM meter
run registers for more information.
2. Click Add and select a type of meter run. There are four meter run types
can be selected and see the following table for information of the four
meter types.
Parameter Description
Orifice Orifice meter run calculates the volumetric flow-rate for
an orifice meter using flange or pipe tap based on the
differential pressure, temperature and pressure input
parameters.
Turbine Turbine meter run corrects measured volume at flowing
conditions read by turbine meter to volume at base
conditions. The main input parameter of the Turbine
meter is pulse.
Ultrasonic Ultrasonic meter run also corrects measured volume at
flowing conditions read by Ultrasonic meter to volume at
base conditions. The main input parameter of the
Ultrasonic meter is pulse. Technically both Turbine and
Ultrasonic meters are same.
Coriolis Coriolis meter run converts gas mass to volume. Gas
mass is directly measured from Coriolis Meter.
13
Chapter 4 - Configuring gas meter runs
You can also copy a existing meter run by clicking to create a new meter
run.
Parameter Description
Meter name The name of the meter
14
Chapter 4 - Configuring gas meter runs
Parameter Description
units
Description (Optional) A description of the meter
Parameter Description
Flow Starting from R161.2, different AGA3 standard can
calculation be selected:
type
l AGA 3(1992)
l AGA 3(2012)
Orifice If Flow calculation type is selected as AGA 3
Material (1992), Stainless Steel, Monel, CarbonSteel are
available.
15
Chapter 4 - Configuring gas meter runs
Parameter Description
If Flow calculation type is selected as AGA 3
(2012), Stainless Steel, Monel, CarbonSteel,
Stainless_S_304, Stainless_S_316 are available.
16
Chapter 4 - Configuring gas meter runs
Parameter Description
Meter K (Turbine/Ultrasonic meter run) Meter K factor
factor converts pulse from flow meter into volume. The
value should be in pulses/m3 or pulses/ft3. When the
flow type is analog, this is the correction factor to
apply for volume calculation and the default value
should be 1.0.
17
Chapter 4 - Configuring gas meter runs
Parameter Description
Variable Name of variable
name
LOLO This parameter is extreme low value for static pressure. If static pressure
goes below this value then an alarm is logged. This value should be in the
same units chosen by user for static pressure.
LO This parameter is low value for static pressure. If static pressure goes below
this value then an alarm is logged. This value should be in the same units
chosen by user for static pressure.
HI This parameter is extreme high value for static pressure. If static pressure
goes beyond this value then an alarm is logged. This value should be in the
same units chosen by user for static pressure.
HIHI This parameter is high value for static pressure. If static pressure goes
18
Chapter 4 - Configuring gas meter runs
Parameter Description
beyond this value then an alarm is logged. This value should be in the same
units chosen by user for static pressure.
Status Status for Static Pressure. The value should be {0} for good status, or any
positive integer for bad status.
Override Keypad value for Static Pressure. This value is used when the Static
Value Pressure status is bad.
I/O Selection I/O selection for Static Pressure. The value should be 1 for Live or 2 for
Keypad value.
Atmospheric Absolute Pressure, Gauge Pressure
pressure
Local If Atmospheric Pressure option is Gauge Pressure then local atmospheric
atmospheric pressure must be entered by the user.
pressure
Unit: This value should be in the same units chosen by the user for static
pressure.
19
Chapter 4 - Configuring gas meter runs
Parameter Description
Variable Name of variable
name
LOLO This parameter is extreme low value for differential
pressure. If differential pressure goes below this value
then an alarm is logged. This value should be in the
same units chosen by user for differential pressure.
LO This parameter is low value for differential pressure. If
differential pressure goes below this value then an
alarm is logged. This value should be in the same units
chosen by user for differential pressure.
HI This parameter is extreme high value for differential
pressure. If differential pressure goes beyond this value
then an alarm is logged. This value should be in the
same units chosen by user for differential pressure.
HIHI This parameter is high value for differential pressure. If
differential pressure goes beyond this value then an
alarm is logged. This value should be in the same units
chosen by user for differential pressure.
Low DP Low DP cutoff value checks the no flow condition in the
cutoff calculations. The value should be in the same units
chosen by user for differential pressure.
20
Chapter 4 - Configuring gas meter runs
Parameter Description
Variable Name of variable
name
Input Pulse: If the input is pulse.
This is the LoLo limit for analog input. The value should
be in ft3/hr for US unit or m^3/hr for Metric unit.
LO It appears when Input is Analog.
This is the HiHi limit for analog input. The value should
21
Chapter 4 - Configuring gas meter runs
Parameter Description
be in ft3/hr for US unit or m^3/hr for Metric unit.
Low pulse It appears when Input is Pulse.
cutoff
Low pulse cutoff value checks the no flow condition in
the calculations. If the Pulse increment is less than this
number, it will be considered as no flow condition.
Low flow It appears when Input is Analog.
cutoff
Low flow cutoff value checks the no flow condition in the
calculations. If the flow is s less than this number, it will
be considered as no flow condition. Unit is m3/hr for
Metric unit, ft3/hr for US unit.
n If meter run type is Coriolis, configure Gas Mass parameters. See the
following table for parameter descriptions.
Parameter Description
Variable Name of variable
name
Input Pulse: If the input is pulse.
22
Chapter 4 - Configuring gas meter runs
Parameter Description
Analog: If the input is uncorrected analog value.
This is the LoLo limit for analog input. The value should
be in lb/hr for US unit or kg/hr for Metric unit.
LO It appears when Input is Analog.
This is the HiHi limit for analog input. The value should
be in lb/hr for US unit or kg/hr for Metric unit.
Low pulse It appears when Input is Pulse.
cutoff
Low pulse cutoff value checks the no flow condition in
the calculations. If the Pulse increment is less than this
number, it will be considered as no flow condition.
Low flow It appears when Input is Analog.
cutoff
Low flow cutoff value checks the no flow condition in the
calculations. If the flow is s less than this number, it will
be considered as no flow condition. Unit is kg/hr for
Metric unit, lb/hr for US unit.
23
Chapter 4 - Configuring gas meter runs
Parameter Description
Variable Name of variable
name
LOLO This parameter is extreme low value for temperature. If
temperature goes below this value then an alarm is logged.
This value should be in the same units chosen by user for
temperature.
LO This parameter is low value for temperature. If temperature
goes below this value then an alarm is logged. This value
should be in the same units chosen by user for
temperature.
HI This parameter is extreme high value for temperature. If
temperature goes beyond this value then an alarm is
logged. This value should be in the same units chosen by
user for temperature.
HIHI This parameter is high value for temperature. If temperature
goes beyond this value then an alarm is logged. This value
should be in the same units chosen by user for
temperature.
24
Chapter 4 - Configuring gas meter runs
Parameter Description
Status Status for Temperature. The value should be {0} for good
status, or any positive integer for bad status.
Override Keypad value for Temperature. This value is used when the
Value Temperature status is bad.
I/O I/O selection for Temperature. The value should be 1 for
Selection Live or 2 for Keypad value.
Parameter Description
Compressibility calculation Starting from R161.2, compressibility
calculation can be selected from different
AGA 8 versions:
l AGA 8(1994)
l AGA 8(2017)
25
Chapter 4 - Configuring gas meter runs
Parameter Description
Calculation type l Detailed: Gas densities calculation with
all gas composition parameters
l GrossMethod1: Gas densities
calculation with fewer number of
parameters (CO2, Hydrogen and CO)
l GrossMethod2: Gas densities
calculation with fewer number of
parameters (CO2, Hydrogen, CO and
Nitrogen)
l GERG: Compressibility calculation
using GERG method based on AGA 8
(2017) with all gas composition details
are available.
For US units, Standard temperature is 60 F°, and standard pressure is 14.73 psi.
26
Chapter 4 - Configuring gas meter runs
Parameter Description
For SI/Metric units, Standard temperature is 15 C°, and standard pressure is 101.325 Kpa.
Parameter Description
Source Constant, Live
Format Percentage, Mole Fraction
Configurable Methane, CO2, Propane, H2S, CO, Argon, I_Butane,
Composition I_Pentane, Hexane, Octane, Decane, Nitrogen,
Ethane, Water, Hydrogen, Oxygen, Helium, N_
Butane, N_Pentane, Heptane, and Nonane.
Normalize To normalize the gas composition values if their sum
27
Chapter 4 - Configuring gas meter runs
Parameter Description
is not 100.
Parameter Description
Source Constant, Live
Format Percentage, Mole Fraction
Composition l CO2
Parameter
l Hydrogen
l CO
l Nitrogen(Only for GrossMethod2)
Gas relative density Gas relative density measured at reference
condition, input parameter for Gross Method
1 & 2.
Reference Reference temperature for calorimeter
Temperature For density required parameter for Gross Method
28
Chapter 4 - Configuring gas meter runs
Parameter Description
Calorimeter Density 1 & 2.
Gas heating value Heating value for the gas mixture.
Reference Pressure Reference pressure for calorimeter density
For Calorimeter required parameter for Gross Method 1 & 2.
Density
Reference Reference temperature for combustion
Temperature For required parameter for Gross Method 1 & 2.
Combustion
29
Chapter 4 - Configuring gas meter runs
Parameter Description
Start Date Start date of the logged hourly/ daily QTR (Quantity Transaction Record)
Start Time Start time of the logged hourly/ daily QTR.
End Date End date of the logged hourly/ daily QTR.
End Time End time of the logged hourly/ daily QTR
Flow Time Flow time in seconds for hourly/ daily QTR
Volume at Accumulated volume at base condition for hourly/ daily QTR
Base
Mass Accumulated gas mass for hourly/ daily QTR
Energy Accumulated energy for hourly/ daily QTR
Temperature Averaged temperature for hourly/ daily QTR
Pressure Averaged pressure for hourly/ daily QTR
Differential Only apply to Orifice Meter.
30
Chapter 4 - Configuring gas meter runs
Parameter Description
Pressure Averaged differential pressure for hourly/ daily QTR
Analog Only applicable to Turbine, Ultrasonic and Coriolis meter when flow type is
selected as Analog.
or,
Maintenance
Mass
Pulse Start This is applicable for Turbine, Ultrasonic and Coriolis meter when flow type
is selected as Pulse. This is snapshot value when transaction time starts
31
Chapter 4 - Configuring gas meter runs
Parameter Description
(hour/day).
Pulse End This is applicable for Turbine, Ultrasonic and Coriolis meter when flow type
is selected as Pulse. This is snapshot value when transaction time ends
(hour/day).
UserDefined1 Average value of user defined parameter for hourly and daily QTR
UserDefined2 Average value of user defined parameter for hourly and daily QTR
UserDefined3 Average value of user defined parameter for hourly and daily QTR
UserDefined4 Average value of user defined parameter for hourly and daily QTR
32
CHAPTER
See the following table for the recommended configurations of liquid meter
runs:
33
Chapter 5 - Configuring liquid meter runs
34
Chapter 5 - Configuring liquid meter runs
When a project requires flow calculation based on single pulse stream from
primary flow meter and secondary measurements as analog input, onboard
I/O or expansion I/O can be used.
See the following solution diagram for Liquid Electronic Flow Measurement
system with the onboard I/O or expansion I/O:
Figure 5-2: Liquid Electronic Flow Measurement system with the onboard
or expansion I/O
Prerequisites
35
Chapter 5 - Configuring liquid meter runs
ST103A Specification
Item Description
Type of Inputs 0 to 5 Volt or 4-20 mA nominal i/p type
Isolation All channels individually isolated to 50 V RMS
Conversion Method Integrating charge - balance
Effective resolution More than 18 bits, auto zero, auto calibrate
Conversion time Less than 100 mSec per channel
Scan Rate All channels can be acquired in under 1 second
Series mode rejection >100 dB at 50 Hz and 60 Hz
Voltage Common mode range ±50 V relative to computer ground or other input
Calibration Period 2 Years to 0.005% of Voltage. 5 Years to 0.01 % of
Voltage
36
Chapter 5 - Configuring liquid meter runs
Item Description
Type of Inputs Differential voltage inputs
Input Range 0 to +5.5 V
Accuracy +/- 0.005% of FSD at 23 °C
Ambient Temperature +/- 7 ppm/°C from 23°C in the range 0 to 45°C. 0.05% -40°C to
effect +85°C
Item Description
Type of Inputs Isolated current inputs
Input Range 0 to 22mA.
Accuracy +/- 0.02% of FSD at 23 °C
Ambient Temperature +/-10 ppm/°C from 23°C in range 0°C to 45°C. .0.1% -40°C to
effect +85°C
Item Description
Type of Inputs 4 wire using Pt 100 RTD
Temperature measuring range -100°C to +300°C.
Resolution 0.01°C
Accuracy 0.05°C
PRT cables Loop resistance up to 600 Ohms
Barriers 9 V, 100 Ohms are satisfactory.
Security Continuous cable/PRT integrity tests
3 Wire Mode Not recommended, but possible
37
Chapter 5 - Configuring liquid meter runs
Item Description
Type Each channel is an individually isolated current
controlled 0 to 21 mA output, that can be used to sink
or source cubicle power
Effective resolution 12 bit minimum.
Accuracy +/- 0.1% at 23°C.
Temperature Coefficient 20ppm / °C
Minimum Load Loop resistance Safe down to zero ohms from +32V external supply.
Maximum Load Loop resistance 1000 Ohms when powered from +24V external
Maximum External Supply 32 Volts
Output Form Isolated active current controller
Number of field connections 2 terminals per channel
Update time 500mSec to within 1%
Item Description
Configuration Individually Opto-isolated inputs
Max Input Voltage 30V
Min Input on Voltagee 12V
Max Input off voltage 3.0V
Input Impedance 2-2.5K Ohm typical
Protection Surge and reverse voltage protection
Additional Features Filtering and fleeting input detection provided
38
Chapter 5 - Configuring liquid meter runs
Item Description
Configuration Individually galvanically isolated
Max Output Current 100mA
Min Output Saturation Voltage 2.1V @ 100mA
Max Output Standoff Voltage 32V, limited by input protection
When off|Reset/Power on State All digital outputs OFF
Item Description
Configuration AC Coupled, Galvanically Isolated, with active limiting
Sensitivity 3.0 V peak to peak minimum
Maximum Input Voltage 24V peak to peak
Input current Internally limited to 3mA
Frequency Range 50Hz to 5 kHz.
Accuracy of frequency 10 ppm
measurement
Resolution 25 nanoseconds
Note Info from Solartron – a 220R resistor inline will give approx 3.5V
peak to peak signal.
Item Description
Input Type Can use "best in class" differential mode or single ended.
Configuration Opto-coupled inputs.
Input signal levels +/- 3.5 V to +/- 24 V.
Input current minimum 5 mA
Frequency range DC to 10 kHz.
Line Integrity Dual back-to-back optos, allowing full quiescent line and
39
Chapter 5 - Configuring liquid meter runs
Item Description
electronic integrity testing, when used with differential
pre-amps and VS300 pulser
Dual Pulse compliance IP 252/76 or API Ch 5.5 level A or B, or E
Item Description
Configuration Digital Ground referenced Differential transceiver
Gating & Direction Software controlled
Use To bus together several streams to a common prover
Signalling RS422 Compatible drive & receive levels
Max output frequency 10 KHz
Item Description
Configuration Individually Isolated
Max Output Current 100 mA
Max Output Saturation Voltage 2.1 V @ 100 mA
Max Output Standoff Voltage 32V, limited by Transorb
Frequency range DC to 100Hz
Item Description
Contact Form Form B (Normally Closed)
Max current 1A
Max Voltage 32 V, limited by input protection
Maximum Power 30 VA
Control Released on de-power or watchdog restart or software command
40
Chapter 5 - Configuring liquid meter runs
The ST103A is equipped with two Modbus serial ports to give dual
redundant links to DCS or PLCs.
Item Description
Port Type Dual RS485, two wire half Duplex
Isolation None
Protection Highly ruggedised ports with Full EMC protection, including
transient and surge protection
Biasing/Determination Very light biasing to maintain receivers in an off state when
disconnected
Baud Rate Fixed at 19,200 Baud
Above technical specification may change, the latest data should refer to
the module specification published on the website.
ST103A needs to be procured from Swinton Technology, UK.
Please contact this email id for procurement -
[email protected]
Swinton Technology's contact details :
Swinton House, Hertford Way
York Road Business Park
Malton - YO17 6YG
United Kingdom
Telephone: +44 (0)1653 698844
Fax: +44 (0)1653 605679
41
Chapter 5 - Configuring liquid meter runs
Installing ST103A
Installation Dimension for a ST103A
See the following table for ST103A installation dimension:
Item Description
Length on Rail 168mm
Height 56mm
Width across Rail 128mm
Weight 650 grams
Structure: PVC extrusion with passivated steel lid
Mounting a ST103A
ST103A acting as a slave communicates with the controller which acts as a
master through any one of two RS485 ports over Modbus.
ST103A can be remotely mounted (>1km) to the controller.
To mount ST103A
42
Chapter 5 - Configuring liquid meter runs
43
Chapter 5 - Configuring liquid meter runs
Analog Input P1 P2 P3 P4 P5 P6 P7 P8
1 (1-5V)-factory setting OFF
1 (4-20mA) ON
2 (1-5V)-factory setting OFF
2 (4-20mA) ON
3 (1-5V)-factory setting OFF
3 (4-20mA) ON
4 (1-5V)-factory setting OFF
4 (4-20mA) ON
5 (1-5V)-factory setting OFF ON
5 (4-20mA) ON ON
5 (RTD2) OFF OFF
44
Chapter 5 - Configuring liquid meter runs
Analog Input P1 P2 P3 P4 P5 P6 P7 P8
6 (1-5V)-factory setting OFF ON
6 (4-20mA) ON ON
6 (RTD1) OFF OFF
NOTE: Access to bit links cover from the unit should only be attempted
by an engineer with suitable training.
If the bit links on the analog board need to be changed you need to first
remove the unit's cover .
To remove the cover of the unit:
1. Remove the Earth stand-off which secures the cover earth tag using a
9/32" or 7mm socket driver.
2. Remove the M3x6mm pozidrive pan head screw which is next to the
Status LED and above the ETH2 connector.
3. Remove the remaining four M3x20mm pozidrive pan head screws.
4. Remove the cover by lifting it vertically away from the base.
To re-fit the cover:
1. Slid the cover back into position, taking care that the earth tag slips over
the earth stud.
2. Refit the screws to secure the cover.
3. Screw the stand-off back into the Earth Stud.
Wiring ST103A
Power Cabling
Item Description
Input Voltage & Current 20-32V D.C 2W nominal, 4 W Max
No of DC Inputs 2 off, allowing direct connection to redundant supplies
Galvanic isolation 50V RMS to Instrument Earth
45
Chapter 5 - Configuring liquid meter runs
Item Description
Maximum Input Ripple 2V pp
DC Input Power fail flag 19V +/- 0.5v
Hold up period after powerfail flag 4ms
Input protection Non-replaceable 1A Input Fuse
Item Description
Output Nominal 12V supply for turbine pre-amplifiers
Isolation Isolated from incoming power and computer 0 V
Regulation Fully regulated
Voltage level 12V, 500mV p-p ripple
Output Current 75 mA
Output protection Electronic current limit and thermal shutdown
46
Chapter 5 - Configuring liquid meter runs
47
Chapter 5 - Configuring liquid meter runs
2. Click Add and select a type of meter run. There are five meter run types
can be selected and see the following table for information of the five
meter types.
Parameter Description
Turbine, Positive Different primary meter types measuring
Displacement, liquid flow in a meter run.
Ultrasonic, Coriolis
Station Totalizer Station Totalizer is used when multiple
streams are connected to a station and the
totals should be calculated from multiple
streams.
48
Chapter 5 - Configuring liquid meter runs
4. Click the arrow besides each meter to unfold tabs, including Information,
Liquid Type, Densitometer, Meter Information, Contract Settings, Natural
Gas Liquefied and Records. You can configure each tab with required
parameters.
5. Click Save. It will take 3~5 minutes to save the configuration.
Parameter Description
Meter name The name of the meter
49
Chapter 5 - Configuring liquid meter runs
Parameter Description
units
Description (Optional) A description of the meter
Parameter Description
Liquid to be measured You can measure the following liquid:
l Crude oil
l Refined Products
l Special products
l Lubricating Oil
l Natural Gas Liquefied
Thermal expansion It is ONLY applicable for the Special products
factor at 60F liquid type.
50
Chapter 5 - Configuring liquid meter runs
Parameter Description
I/O Type for the Meter l ST103A
Run
l Others
Select it if onboard I/O or expansion I/O or
any other device is used as an I/O.
I/O Identifier It is available when you select ST103A for I/O
Type for the Meter Run.
51
Chapter 5 - Configuring liquid meter runs
Parameter Description
Maixmum wait time in seconds for ST103A
to restore the connection after the
connection failure with ControlEdge 2020
controller. Beyond this limit, pulse increment
will not be utilized in volume calculations.
The status for hourly/daily/Batch totals will
be set to 1, i.e. the totals are unreliable.
Pulse Max Increment It is available when you select ST103A for I/O
Type for the Meter Run.
Parameter Description
Densitometer is available Option to set whether the
Densitometer is available or not. The
value should be either 1 for Yes or 0
for No.
52
Chapter 5 - Configuring liquid meter runs
Parameter Description
l Yes
l No
Coriolis meter to provide It is available when the meter run
density measurement type is Coriolis.
l 1 (A)
l 2 (A, B)
Base density It is available when you select No for
Densitometer is available.
53
Chapter 5 - Configuring liquid meter runs
Parameter Description
Variable name Parameter to set the Densitometer
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
Status Status for Densitometer
Temperature. The value should be
{0} for good status, or any positive
integer for bad status.
LOLO This is the LoLo limit for
Densitometer temperature. The
value should be in Fahrenheit for US
unit and in Celcius for Metric unit.
Override Value Keypad value for Densitometer
temperature. This value is used
when the densitometer temperature
status is bad.
LO This is the Lo limit for Densitometer
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
I/O Selection I/O selection for Densitometer
Temperature. The value should be 1
for Live or 2 for Keypad value.
HI This is the Hi limit for Densitometer
54
Chapter 5 - Configuring liquid meter runs
Parameter Description
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
HIHI This is the HiHi limit for
Densitometer temperature. The
value should be in Fahrenheit for US
unit and in Celcius for Metric unit.
Parameter Description
Variable name Parameter to set the Densitometer
pressure. The value should be in
Psig for US unit and in Kpag for
Metric unit.
Status Status for Densitometer Pressure.
The value should be {0} for good
status, or any positive integer for bad
status.
LOLO This is the LoLo limit for
Densitometer pressure. The value
should be in Psig for US unit and in
Kpag for Metric unit.
55
Chapter 5 - Configuring liquid meter runs
Parameter Description
Override Value Keypad value for Densitometer
pressure. This value is used when
the densitometer pressure status is
bad.
LO This is the Lo limit for Densitometer
pressure. The value should be in
Psig for US unit and in Kpag for
Metric unit.
I/O Selection I/O selection for Densitometer
pressure. The value should be {1} for
Live or {2) for Keypad value.
HI This is the Hi limit for Densitometer
pressure. The value should be in
Psig for US unit and in Kpag for
Metric unit.
HIHI This is the HiHi limit for
Densitometer pressure.The value
should be in Psig for US unit and in
Kpag for Metric unit.
56
Chapter 5 - Configuring liquid meter runs
Parameter Description
Measured density Density value of the Densitometer.
The value should be in lb/ft^3 for US
unit and kg/m^3 for Metric unit.
l A
l B
Override Value Keypad value for Densitometer
measured density. This value is used
when the densitometer status is bad.
The value should be in lb/ft^3 for US
unit and kb/m^3 for Metric unit.
57
Chapter 5 - Configuring liquid meter runs
Parameter Description
Meter K Meter K factor converts pulse from flow meter into
factor volume. The value should be in pulses/m3 or pulses/ft3.
When the flow type is analog, this is the correction
factor to apply for volume calculation and the default
value should be 1.0.
58
Chapter 5 - Configuring liquid meter runs
Parameter Description
Variable name Parameter to set the meter
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
Status Analog input channel status for meter
temperature. The value should be {0}
for good status, or any positive
integer for bad status.
LOLO This is the LoLo limit for meter
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
Override Value Keypad value for meter temperature.
The value is used when the
densitometer temperature status is
not good.
LO This is the Lo limit for meter
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
I/O Selection I/O selection for meter temperature.
The value should be {1} for Live or {2)
59
Chapter 5 - Configuring liquid meter runs
Parameter Description
for Keypad value.
HI This is the Hi limit for meter
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
HIHI This is the HiHi limit for meter
temperature. The value should be in
Fahrenheit for US unit and in Celcius
for Metric unit.
n If the meter run type is Coriolis, configure the Density parameters. See
the following table for parameter descriptions.
Parameter Description
Measured density Density value from the
Densitometer. The value should be
in lb/ft^3 for US unit and kg/m^3 for
Metric unit.
Status Status of Densitometer. The value
should be {0} for good status, or any
positive integer for bad status.
Override Value Keypad value is used when
measured density status is bad.
60
Chapter 5 - Configuring liquid meter runs
Parameter Description
Generally this will be base density.
The value should be in lb/ft^3 for US
unit and kg/m^3 for Metric unit.
I/O Selection I/O selection for Density. The value
should be {1} for Live or {2} for
Keypad value.
Parameter Description
Variable name Parameter to set the meter pressure.
The value should be in Psig for US
unit and in Kpag for Metric unit.
Status Analog input channel status for meter
pressure. The value should be {0} for
good status, or any positive integer
for bad status.
LOLO This is the LoLo limit for meter
pressure. The value should be in Psig
for US unit and in Kpag for Metric
unit.
Override Value Keypad value for meter pressure.
61
Chapter 5 - Configuring liquid meter runs
Parameter Description
The value is used when the meter
pressure status is bad.
LO This is the Lo limit for meter pressure.
The value should be in Psig for US
unit and in Kpag for Metric unit.
I/O Selection I/O selection for meter pressure. The
value should be {1} for Live or {2) for
Keypad value.
HI This is the Hi limit for meter
pressure.The value should be in Psig
for US unit and in Kpag for Metric
unit.
HIHI This is the HiHi limit for meter
pressure. The value should be in Psig
for US unit and in Kpag for Metric
unit.
Parameter Description
Variable name The parameter to set pulse/analog
input for flow.
62
Chapter 5 - Configuring liquid meter runs
Parameter Description
Input Parameter to set the flow type. The
value should be {0} for Pulse and {1}
for Analog.
63
Chapter 5 - Configuring liquid meter runs
Parameter Description
for Input.
Parameter Description
Averaging FlowWeighted: Parameter to choose the Averaging
Method method. By default in AP21.2, the averaging method
is flow weighted average.
Averaging Parameter to set the variable used for averaging.
Variable The value should be {0} for Gross Volume or {1} for
Mass.
Contract Hour Parameter represents the time of daily QTR
64
Chapter 5 - Configuring liquid meter runs
Parameter Description
generation. Its value should be from 0 to 23.
Base Temperature at Base conditions. The value should
Temperature be in Fahrenheit for US units and in Celcius for
Metric units. The contract unit setting on the Basic
Information is used for QTR calculation. The default
value for US unit is 60 Deg F and ranges from 15 to
20 Deg C for Metric units.
API Rounding Option to enable or disable the API rounding. This
option will round-off the input and output float values
according to API standards.
l Enable
l Disable
Sediments & Parameter to set whether the Water and Sediments
water is available in the Crude Oil or not. The value should
measurement be {1} if it is available, otherwise it should be {0}.
is available
l Yes
l No
Sediments & Parameter to set the percentage of Water and
water Sediments present in the Crude Oil.
Status Analog input channel status for Water and
Sediments. The value should be {0} for Good or any
positive integer for Bad status.
Override Value Keypad value in percentage for Water and
Sediments. The value that should be used when the
Water and Sediments status is not good.
I/O Selection I/O selection for Water and Sediments value. The
value should be {1} for Live or {2} for Keypad value.
65
Chapter 5 - Configuring liquid meter runs
Parameter Description
Maintenance Mode Flag Parameter to Start or Stop the
Maintenance Mode. The value should
be either {0} Maintenance End or {1}
for Maintenance Start.
Operation Type Parameter to set the type of
Operation. The value should be {1}
for Continuous or {2} for Batch.
66
Chapter 5 - Configuring liquid meter runs
Parameter Description
CPL calculation type CPL Calculation Type. The value should be {1} for None or {2} for
API21.2 or {3} for API21.2M.
Convergence criteria IP2 Convergence limit. Default value is 0.001.
Maximum iterations IP2 Max loop limit. Default value is 50.
Iteration method Main calculation method. The value should be either {1} for ASTM or
{2} for IP2.
Vapor pressure input Parameter to set the Vapour Pressure Input.
Vapor pressure Vapour Pressure calculation options. The value should be {1} for
calculation method None, {2} for User Observed or {3} for API 11.2.5
67
Chapter 5 - Configuring liquid meter runs
Parameter Description
Meter ID The unique identifier of the meter.
Third-party flow analysis applications use the meter ID to uniquely identify the
meter.
Liquid Type Liquid to be measured:
l Crude oil
l Refined Products
l Special products
68
Chapter 5 - Configuring liquid meter runs
Parameter Description
l Lubricating Oil
Parameter Description
Start Date Start date of the Quantity Transaction Record (QTR).
Start Time Start time of the QTR.
End Date End date of the QTR.
End Time End time of the QTR.
Pulse Start Pulse value at the start of the QTR.
Pulse End Pulse value at the end of the QTR.
Meter K- Meter K factor converts pulse from flow meter into volume. The value should
69
Chapter 5 - Configuring liquid meter runs
Parameter Description
Factor be in pulses/m3 or pulses/ft3. When the flow type is analog, this is the
correction factor to apply for volume calculation and the default value should
be 1.0.
CTL Flow weighted average temperature correction factor.
CPL Flow weighted average pressure correction factor.
Observed Flow weighted Average of Observed Density for the hour / day.
Density
Observed Flow weighted Average of Observed Temperature for the hour / day.
Temperature
Observed Flow weighted Average of Observed Pressure for the hour / day.
Pressure
Base Density Flow weighted Average of Base Density for the hour / day.
Temperature Flow weighted Average of Temperature for the hour / day.
Pressure Flow weighted Average of Pressure for the hour / day.
Gross Volume Gross Standard volume total for this hour/day.
SW Volume Sediments and Water volume total for this hour/day.
Mass Mass total for this hour/day.
Non Apply to Turbine, Positive Displacement, Ultrasonic and Station Totalizer
Resettable meters.
Gross Std Vol
Non-Resettable or Cumulative total for Gross Standard volume.
Non Only apply to Coriolis meter.
Resettable
Mass Non-Resettable or Cumulative total for Mass.
For station totalizer, the same description in the above table are applicable.
70
CHAPTER
1. Select EFM meters from the Navigation pane. A list of meters appears
with the first meter selected.
2. Select the target meter you want to edit. The properties tabs enable you
to edit the configuration of the meter.
3. Click Save. It will take 3~5 minutes to save the configuration.
71
Chapter 6 - Editing a meter run
72
CHAPTER
This section introduces how to change meter run types from Gas to Liquid
or vice versa in a project.
You must reinitialize memory resources for the required meter run in the
controller. Perform the following steps:
1. Obtain QTR data from ControlEdge 2020 controller via SCADA for the
meter run that needs to be deleted.
2. Delete the meter run from the project.
3. Compile the project, and download it to the controller.
4. Add and configure the required meter run with required type
(Gas/Liquid).
5. Compile the project, and download it to the controller.
73
Chapter 7 - Changing meter run types
74
CHAPTER
1. Navigate to "C:\ProgramData\Honeywell\ControlEdge
Builder\SampleProjects\EFM", copy a sample project to a folder.
75
Chapter 8 - Quickly configuring meter runs using sample projects
76
CHAPTER
77
Chapter 9 - Configuring Function Blocks
78
Chapter 9 - Configuring Function Blocks
Library Specification
Metering Gas
Calculation Library
AGA 3 (1992) Orifice Meter
AGA 3 (2012) Orifice Meter
AGA 5 (2009) Volume to Energy Calculation
AGA 7 (1996) Turbine Meter
AGA 8 (1994) Gas Compressibility
AGA 8 (2017) Gas Compressibility
AGA 9 (1996) Ultrasonic Meter
AGA 11 (2013) Coriolis Meter
ISO 6976 (1995) Natural gas: calorific value density, relative
density and Wobbe Index
Liquid
79
Chapter 9 - Configuring Function Blocks
AGA
The following libraries of AGA Function Blocks are supported:
Library Description
AGALib Basic version of AGA function block library. It supports AGA 3 (1992), AGA5
(1996), AGA8 (1994), AGA 7(1996), AGA 11 (2013) and AGA 9 (1996)
Function block with structure input is not supported and will not be available in
this library.
NOTE: When the outcode for any of the function block in AGALib_V3 is
error, other corresponding output parameters from the same function
block are invalid. Hence caution must be taken in project engineering
when processing of the output parameters in conjunction with the
outcode.
80
Chapter 9 - Configuring Function Blocks
81
Chapter 9 - Configuring Function Blocks
AGA8_GrossMethod1
Description
AGA8_GrossMethod1 and AGA8_GrossMethod1_st calculate Gas
Compressibility, Density and Gas Super-compressibility at base, standard
and flowing condition that is flowing temperature and pressure based on the
input parameters defined below.
82
Chapter 9 - Configuring Function Blocks
n AGA8_GrossMethod1
Input
Data
Input Parameter Description
types
UnitSystem INT {1} for US unit system and {2} for Metric unit
83
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
system
GasCompFormat INT Gas Composition Format:
84
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
BasePressure LREAL It is in PSIA for US unit and Kpa for Metric
unit.
Output
Data
Output Parameter Description
types
GasDensityAtFlowCond LREAL It is Gas Density at flowing temperature and
pressure. It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System). It is an input to AGA3
Function Block.
GasDensityAtBaseCond LREAL It is Gas Density at base temperature and pressure.
85
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).
86
Chapter 9 - Configuring Function Blocks
Following is the table that describes different out code for both AGA8_
GrossMethod1 and AGA8_GrossMethod2 function blocks:
Out
Description Apply to
Code
0 SUCCESS All
5 ERROR: THE ROOT WAS NOT BOUNDED IN DGROSS All
6 ERROR: NO CONVERGENCE IN DGROSS All
7 ERROR: VIRGS SQURE ROOT NEGATIVE All
8 ERROR: COMBINED VALUES OF GRGR, X[2] AND HV All
NOT CONSISTENT
9 ERROR: INVALID TERM IN VIRGS All
11 ERROR: METHOD WAS NOT 1 OR 2 All
12 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 1740.0 All
PSIA
13 ERROR: FLOWING TEMPERATURE (TF) < 14.0 OR > All
149.0 DEG F
14 ERROR: HEATING VALUE (HV) < 477.0 OR > 1211.0 AGA8_
BTU/FT^3 GrossMethod1
AGA8_
GrossMethod1_V2
AGA8_
GrossMethod1_V3
87
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
15 ERROR: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > All
0.870
16 ERROR: MOLE FRACTION FOR N2 < 0.0 OR > 0.50 All
OR FOR CO2 < 0.0 OR > 0.30
OR FOR H2 < 0.0 OR > 0.10
OR FOR CO < 0.0 OR > 0.03
17 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 All
DEG F
18 ERROR: REFERENCE PRESSURE < 13.0 OR > 16.0 PSIA All
22 WARNING: FLOWING PRESSURE (PF) <= 0.0 OR > AGA8_
1200.0 PSIA GrossMethod1&2
AGA8_
GrossMethod1&2_
V2
23 WARNING: FLOWING TEMPERATURE (TF) < 32.0 OR > AGA8_
130.0 DEG F GrossMethod1&2
AGA8_
GrossMethod1&2_
V2
24 WARNING: HEATING VALUE (HV) < 805.0 OR > 1208.0 AGA8_
BTU/FT^3 GrossMethod1
AGA8_
GrossMethod1_V2
25 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.55 OR AGA8_
> 0.800 GrossMethod1&2
AGA8_
GrossMethod1&2_
V2
26 WARNING: MOLE FRACTION FOR N2 < 0.0 OR > 0.20 AGA8_
OR FOR CO2 < 0.0 OR > 0.20 GrossMethod1&2
OR FOR H2 < 0.0 OR > 0.0
OR FOR CO < 0.0 OR >0.0 AGA8_
GrossMethod1&2_
V2
88
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
81 WARNING: FLOWING PRESSURE (PF) > 1500.0 PSIA AGA8_
AGA8 2017 RANGE 1 GrossMethod1&2_
V3
82 WARNING: FLOWING TEMPERATURE (TF) < 17.01 OR > AGA8_
143.0 DEG F AGA8 2017 RANGE 2 OR (TF) < 25.0 OR > GrossMethod1&2_
143.0 DEG F AGA8 2017 RANGE 1 V3
83 WARNING: HEATING VALUE (HV) < 665.0 OR > 1100.0 AGA8_
BTU/FT^3 AGA8 2017 RANGE 2 OR (HV) < 930.0 OR > GrossMethod1_V3
1040.0 BTU/FT^3 AGA8 2017 RANGE 1
84 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.554 OR AGA8_
> 0.801 AGA8 2017 RANGE 2 OR (GRGR) < 0.554 OR > GrossMethod1&2_
0.630 AGA8 RANGE 1 V3
85 WARNING: MOLE FRACTION FOR N2 > 0.20 AGA8 2017 AGA8_
RANGE 2 OR N2 > 0.07 AGA8 2017 RANGE 1 GrossMethod1&2_
V3
OR FOR CO2 > 0.25 AGA8 2017 RANGE 2 OR CO2 > 0.03
AGA8 2017 RANGE 1
AGA8_GrossMethod2
Description
This AGA8_GrossMethod2 function block calculates Gas Compressibility,
Density and Gas Super-compressibility at base, standard and flowing
condition that is flowing temperature and pressure based on the input
parameters defined below. It takes Nitrogen fraction as input but does not
take gas heating value. This description is applicable to following function
blocks
89
Chapter 9 - Configuring Function Blocks
n AGA8_GrossMethod2
This function block has input parameters in the form of structures to make
the function block organized and compact.
Input
Data
Input Parameter Description
types
UnitSystem INT {1} for US unit system and {2} for Metric unit system
GasCompFormat INT Gas Composition Format - {1} for Mole Fraction
and {2} for Percentage
90
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
91
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
location and 2 for DOWNSTREAM location
Ouput
Data
Output Parameter Description
types
GasDensityAtFlowCond LREAL It is Gas Density at flowing temperature and
pressure. It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).It is an input to AGA3
Function Block
GasDensityAtBaseCond LREAL It is Gas Density at base temperature and pressure.
It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).
92
Chapter 9 - Configuring Function Blocks
Following is the table that describes different out code for both AGA8_
GrossMethod1 and AGA8_GrossMethod2 function blocks:
Out
Description Apply to
Code
0 SUCCESS All
5 ERROR: THE ROOT WAS NOT BOUNDED IN DGROSS All
6 ERROR: NO CONVERGENCE IN DGROSS All
7 ERROR: VIRGS SQURE ROOT NEGATIVE All
8 ERROR: COMBINED VALUES OF GRGR, X[2] AND HV All
NOT CONSISTENT
93
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
9 ERROR: INVALID TERM IN VIRGS All
11 ERROR: METHOD WAS NOT 1 OR 2 All
12 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 1740.0 All
PSIA
13 ERROR: FLOWING TEMPERATURE (TF) < 14.0 OR > All
149.0 DEG F
14 ERROR: HEATING VALUE (HV) < 477.0 OR > 1211.0 AGA8_
BTU/FT^3 GrossMethod1
AGA8_
GrossMethod1_V2
AGA8_
GrossMethod1_V3
15 ERROR: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > All
0.870
16 ERROR: MOLE FRACTION FOR N2 < 0.0 OR > 0.50 All
OR FOR CO2 < 0.0 OR > 0.30
OR FOR H2 < 0.0 OR > 0.10
OR FOR CO < 0.0 OR > 0.03
17 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 All
DEG F
18 ERROR: REFERENCE PRESSURE < 13.0 OR > 16.0 PSIA All
22 WARNING: FLOWING PRESSURE (PF) <= 0.0 OR > AGA8_
1200.0 PSIA GrossMethod1&2
AGA8_
GrossMethod1&2_
V2
23 WARNING: FLOWING TEMPERATURE (TF) < 32.0 OR > AGA8_
130.0 DEG F GrossMethod1&2
AGA8_
GrossMethod1&2_
V2
24 WARNING: HEATING VALUE (HV) < 805.0 OR > 1208.0 AGA8_
BTU/FT^3 GrossMethod1
94
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
AGA8_
GrossMethod1_V2
25 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.55 OR AGA8_
> 0.800 GrossMethod1&2
AGA8_
GrossMethod1&2_
V2
26 WARNING: MOLE FRACTION FOR N2 < 0.0 OR > 0.20 AGA8_
OR FOR CO2 < 0.0 OR > 0.20 GrossMethod1&2
OR FOR H2 < 0.0 OR > 0.0
OR FOR CO < 0.0 OR >0.0 AGA8_
GrossMethod1&2_
V2
81 WARNING: FLOWING PRESSURE (PF) > 1500.0 PSIA AGA8_
AGA8 2017 RANGE 1 GrossMethod1&2_
V3
82 WARNING: FLOWING TEMPERATURE (TF) < 17.01 OR > AGA8_
143.0 DEG F AGA8 2017 RANGE 2 OR (TF) < 25.0 OR > GrossMethod1&2_
143.0 DEG F AGA8 2017 RANGE 1 V3
83 WARNING: HEATING VALUE (HV) < 665.0 OR > 1100.0 AGA8_
BTU/FT^3 AGA8 2017 RANGE 2 OR (HV) < 930.0 OR > GrossMethod1_V3
1040.0 BTU/FT^3 AGA8 2017 RANGE 1
84 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.554 OR AGA8_
> 0.801 AGA8 2017 RANGE 2 OR (GRGR) < 0.554 OR > GrossMethod1&2_
0.630 AGA8 RANGE 1 V3
85 WARNING: MOLE FRACTION FOR N2 > 0.20 AGA8 2017 AGA8_
RANGE 2 OR N2 > 0.07 AGA8 2017 RANGE 1 GrossMethod1&2_
V3
OR FOR CO2 > 0.25 AGA8 2017 RANGE 2 OR CO2 > 0.03
AGA8 2017 RANGE 1
95
Chapter 9 - Configuring Function Blocks
AGA8_DetailMethod
Description
This AGA8_DetailMethod function block calculates Gas Compressibility,
Density and Gas Super-compressibility at base, standard and flowing
condition that is flowing temperature and pressure based on the input
parameters defined below. It is used when all 21 gas composition elements
are available to get more accurate densities. This description is applicable
to following function blocks
n AGA8_DetailMethod
96
Chapter 9 - Configuring Function Blocks
Input
Data
Input Parameter Description
types
UnitSystem INT {1} for US unit system and {2} for Metric unit system
GasCompFormat INT Gas Composition Format: {1} for Mole Fraction and
{2} for Percentage
97
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
N_Butane LREAL It can be in Mole Fraction or Percentage
I_Pentane LREAL It can be in Mole Fraction or Percentage
N_Pentane LREAL It can be in Mole Fraction or Percentage
Hexane LREAL It can be in Mole Fraction or Percentage
Heptane LREAL It can be in Mole Fraction or Percentage
Octane LREAL It can be in Mole Fraction or Percentage
Nonane LREAL It can be in Mole Fraction or Percentage
Decane LREAL It can be in Mole Fraction or Percentage
Helium LREAL It can be in Mole Fraction or Percentage
Argon LREAL It can be in Mole Fraction or Percentage
FlowingTemp LREAL It is in FAHRENHEIT for US unit and Celcius for
Metric unit.
FlowingPressure LREAL It is in PSIA for US unit and Kpa for Metric unit.
DifferentialPressure LREAL It is in INH2O for US unit and in Kpa for Metric unit.
98
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
The recommended default is 14.73 PSIA for
reference pressure.
TapsLocation INT It is unit less number. It is 1 for UPSTREAM
location and 2 for DOWNSTREAM location.
Ouput
Data
Output Parameter Description
types
GasDensityAtFlowCond LREAL It is Gas Density at flowing temperature and
pressure. It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).It is an input to AGA3
Function Block
GasDensityAtBaseCond LREAL It is Gas Density at base temperature and pressure.
It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).
99
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
Zb LREAL It is gas compressibility factor at base condition. It
is an input to AGA5_DETAIL function block.
Zf LREAL It is gas compressibility factor at flowing condition.
Out_Code INT This out parameter returns success or fail code.
100
Chapter 9 - Configuring Function Blocks
Following is the table that describes different out code for AGA8_
DetailMethod function blocks.
Out
Description Apply to
Code
0 SUCCESS All
1 ERROR: PRESSURE HAS A NEGATIVE DERIVATIVE All
DEFAULT GAS DENSITY USED
2 WARNING: DENSITY IN BRAKET EXCEEDS MAXIMUM All
101
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
DEFAULT PROCEEDURE USED
3 ERROR: MAXIMUM ITERATIONS EXCEEDED IN BRAKET All
DEFAULT DENSITY USED
4 ERROR: MAXIMUM ITERATIONS IN DDETAIL EXCEEDED All
LAST DENSITY USED
32 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 40,000. PSIA All
33 ERROR: FLOWING TEMPERATURE (TF) < -200 OR > 760 DEG All
F
35 ERROR: ANY COMPONENT MOLE FRACTION < 0.0 OR > 1.0 AGA8_
DetailMethod_
V3
36 ERROR: MOLE FRACTION FOR METHANE < 0.0 OR > 1.0 AGA8_
FOR NITROGEN < 0.0 OR > 1.0 DetailMethod &
FOR CARBON DIOXIDE < 0.0 OR > 1.0 AGA8_
FOR ETHANE < 0.0 OR > 1.0 DetailMethod_
FOR PROPANE < 0.0 OR > 0.12 V2
FOR WATER < 0.0 OR > 0.10
FOR H2S < 0.0 OR > 1.0
FOR HYDROGEN < 0.0 OR > 1.0
FOR CARBON MONOXIDE < 0.0 OR > 0.03
FOR OXYGEN < 0.0 OR > 0.21
FOR BUTANES < 0.0 OR > 0.06
FOR PENTANES < 0.0 OR > 0.04
FOR HEXANES + < 0.0 OR > 0.10
FOR HELIUM < 0.0 OR > 0.03
FOR ARGON < 0.0 OR > 1.0
37 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 DEG All
F
38 ERROR: REFERENCE PRESSURE < 13.0 OR > 16.0 PSIA All
39 ERROR: SUM OF MOLE FRACTIONS < 0.98 OR > 1.020 All
42 WARNING: FLOWING PRESSURE (PF) < 0.0 OR > 1750. PSIA All
43 WARNING: FLOWING TEMPERATURE (TF) < 17 OR > 143 All
DEG F
45 WARNING: ANY COMPONENT MOLE FRACTION OUTSIDE AGA8_
OF AGA REPORT NO. 8 RECOMMENDED RANGE DetailMethod_
102
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
V3
46 WARNING: MOLE FRACTION FOR METHANE < 0.45 OR > 1.0 AGA8_
FOR NITROGEN < 0.0 OR > 0.5 DetailMethod &
FOR CARBON DIOXIDE < 0.0 OR > 0.3 AGA8_
FOR ETHANE < 0.0 OR > 0.1 DetailMethod_
FOR PROPANE < 0.0 OR > 0.04 V2
FOR WATER < 0.0 OR >= 0.0005
FOR H2S < 0.0 OR > 0.0002
FOR HYDROGEN < 0.0 OR > 0.1
FOR CARBON MONOXIDE < 0.0 OR > 0.03
FOR OXYGEN < 0.0 OR > 0.0
FOR BUTANES < 0.0 OR > 0.01
FOR PENTANES < 0.0 OR >= 0.003
FOR HEXANES + < 0.0 OR >= 0.002
FOR HELIUM < 0.0 OR >= 0.002
FOR ARGON < 0.0 OR > 0.0
49 WARNING: SUM OF MOLE FRACTIONS < 0.9999 OR > 1.0001 All
AGA8_GERGMethod
Description
This AGA8_GERGMethod function block calculates Gas Compressibility,
Density and Gas Super-compressibility at base, standard and flowing
condition that is flowing temperature and pressure based on the input
parameters defined below. Apart from this, it also calculating speed of
sound in gas that can be used in health monitoring of Ultrasonic meters. It is
used when all 21 gas composition elements are available to get more
accurate densities. This description is applicable to following function
blocks. This function block is based on AGA 8 (2017) upgrade and available
only from R161.2 release.
103
Chapter 9 - Configuring Function Blocks
Input
Data
Input Parameter Description
types
UnitSystem INT {1} for US unit system and {2} for Metric unit system
GasCompFormat INT Gas Composition Format:
104
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
105
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
DifferentialPressure LREAL It is in INH2O for US unit and in Kpa for Metric unit.
Output
Data
Output Parameter Description
types
GasDensityAtFlowCond LREAL It is Gas Density at flowing temperature and
pressure. It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System). It is an input to AGA3
Function Block.
GasDensityAtBaseCond LREAL It is Gas Density at base temperature and pressure.
It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).
106
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
It is an input to AGA3 Function Block.
GasDensityAtStdCond LREAL It is Gas Density at standard temperature and
pressure. It will be in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System). It is an input to AGA3
Function Block.
GasSuperCompStdCond LREAL It is gas super-compressiblity factor at standard
conditions. It is an input to AGA 7/9 function block
and it is unitless.
GasSuperCompBaseCond LREAL It is gas super-compressiblity factor at standard
conditions. It is an input to AGA 3 function block
and it is unitless.
GasRelDenAtStdCond LREAL It is Gas Relative Density at standard temperature
and pressure. It is an input to AGA3 Function
Block. It is unitless.
Zb LREAL It is gas compressibility factor at base condition.
Zf LREAL It is gas compressibility factor at flowing condition.
GERG2008Cp LREAL Heat Capacity at Constant Pressure (J/mol K).
GERG2008Cv LREAL Heat Capacity at Constant Volume (J/mol K).
GERG2008W LREAL Speed of sound in gas being measured. Unit -
ft/sec for US, meter/sec for Metric.
Out_Code INT This out parameter returns success or fail code.
107
Chapter 9 - Configuring Function Blocks
AGA3_Orifice
Description
This AGA3_Orifice function block calculates the volumetric flow-rate for an
orifice meter using flange or pipe tap based on the input parameters defined
below. It is used along with any one of the AGA8 function blocks since it
requires densities @flowing, standard and base conditions as well as gas
super compressibility and gas relative density @ standard condition coming
out of AGA8 function block. This description is applicable to following
function blocks
108
Chapter 9 - Configuring Function Blocks
n AGA3_Orifice
109
Chapter 9 - Configuring Function Blocks
Input
Data
Input Parameter Description
types
UnitSystem INT {1} for US unit system and {2} for Metric unit system
FlowingTemp LREAL It is in FAHRENHEIT for US unit and Celcius for
Metric unit.
FlowingPressure LREAL It is in PSIA for US unit and Kpa for Metric unit.
DifferentialPressure LREAL It is in INH2O for US unit and in Kpa for Metric unit.
GasDensityAtFlowCond LREAL It is Gas Density at flowing temperature and pressure.
It is in KG/M^3 for (Metric System) & LBM/FT^3 for
(US System). It is an output of AGA8.
GasDensityAtStdCond LREAL It is Gas Density at standard temperature and
pressure. It is in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).It is an output of AGA8.
GasDensityAtBaseCond LREAL It is Gas Density at base temperature and pressure. It
is in KG/M^3 for (Metric System) & LBM/FT^3 for (US
System).It is an output of AGA8.
GasSuperComp LREAL It is unit less number. It is an output of AGA8
GasRelDenAtStdCond LREAL It is unit less number. It is an output of AGA8
TapsType INT FLANGE=1 and PIPE=2
OrificeMaterial INT STAINLESS STEEL=1, MONEL=2, CARBON
STEEL=3, STAINLESS_S_304=4 and STAINLESS_
S_316=5
110
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
PipeMaterial INT STAINLESS STEEL=1, MONEL=2, CARBON
STEEL=3, STAINLESS_S_304=4 and STAINLESS_
S_316=5
FluidType INT COMPRESSIBLE FLUID =1 and NON-
COMPRESSIBLE FLUID=2
TapsLocation INT UPSTREAM=1 and DOWNSTREAM=2
OrificeDiameter LREAL It is in inches for US unit system & in milimeter for
Metric unit system.
OrfDiaMsrdTemp LREAL It is in FAHRENHEIT for US unit and Celcius for
Metric unit.
PipeDiameter LREAL It is in inches for US unit system & in milimeter for
Metric unit system.
PipeDiaMsrdTemp LREAL It is in FAHRENHEIT for US unit and Celcius for
Metric unit.
AbsViscosity LREAL AGA3 Orifice method expects absolute viscosity in
CENTIPOISE unit only for both US & Metric unit
system.
(RECOMMENDED DEFAULT=0.010268 cP - PG 34
PART 4)
IsenExponent LREAL ISENTROPIC EXPONENT is unit less number.
(RECOMMENDED DEFAULT=1.3 - PG 34 PART 4)
CalibFactor LREAL It is unit less number. Default value is 1.0
AirCompFactAtStdCond LREAL It is unit less number. COMPRESSIBILITY FACTOR
OF AIR AT standard temperature and pressure. It is
used for Pipe tap only.
AtmosphericPressure LREAL It is in PSIA for US unit and Kpa for Metric unit.
111
Chapter 9 - Configuring Function Blocks
Output
Output Data
Description
Parameter types
Aga3_QV LREAL This is volume flow rate at standard (TS & PS) conditions. It is in
Scf/Hr for US unit system and in cubic meter per hour in Metric unit
system.
Aga3_QM LREAL This is mass flow rate. It is in Lbm/Hr for US unit system and Kg/Hr
for Metric unit system.
Aga3_QB LREAL This is volumetric flow rate at base (TB & PB) conditions. It is in
Scf/Hr for US unit system and in cubic meter per hour in Metric unit
system.
CD LREAL It is Orifice plate coefficient of discharge (flange).
Y LREAL It is Expansion factor (flange and pipe).
EV LREAL It is Velocity of approach factor (flange).
Out_Code INT This out parameter returns success or fail code.
112
Chapter 9 - Configuring Function Blocks
Following is the table that describes different out code for AGA3_Orifice
function blocks.
Out
Description Apply to
Code
0 SUCCESS, NO WARNING OR ERROR All
51 ERROR: NTAPS WAS NOT 0, 1 OR 2 All
52 ERROR: FLOWING PRESSURE WAS <= 0.0 OR > 40000. PSIA All
53 ERROR: FLOWING TEMPERATURE < -200. OR > 760. DEG F All
54 ERROR: MATORF OR MATPIPE WAS NOT 0, 1, 2 OR 3 All
55 ERROR: ORIFICE DIAMETER WAS <= 0 OR => 100.0 INCHES All
56 ERROR: PIPE DIAMETER WAS <= 0 OR => 100.0 INCHES All
57 ERROR: FLOWING OR STANDARD DENSITY WAS <= 0.0 LBM/FT^3 All
58 ERROR: DIFFERENTIAL PRESSURE WAS <= 0.0 INCHES H2O All
59 ERROR: GAS VISCOSITY WAS <= 0.005 OR > 0.5 CENTIPOISES All
60 ERROR: ISENTROPIC EXPONENT <= 1.0 OR => 2.0 All
113
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
61 ERROR: IFLUID WAS NOT 0, 1 OR 2 All
62 ERROR: STANDARD TEMPERATURE WAS NOT = 60.0 DEG F All
63 ERROR: STANDARD PRESSURE WAS NOT = 14.73 PSIA All
64 ERROR: TAP LOCATION WAS NOT 0, 1 OR 2 FOR NTAPS=2 (PIPE) All
OR TAP LOCATION WAS NOT 1 FOR NTAPS=1 (FLANGE)
65 ERROR: SUPERCOMPRESSIBILITY FACTOR WAS <= 0.0 All
66 ERROR: RELATIVE DENSITY AT STANDARD CONDITIONS WAS < All
0.07 OR > 1.52
67 ERROR: CALIBRATION FACTOR WAS <= 0.0 All
68 ERROR: COMPRESSIBILITY FACTOR AT STANDARD CONDITIONS All
<= 0.0
69 ERROR: BETA RATIO (DO/DM) <= 0.0 OR => 1.0 All
70 ERROR: IF NTAPS = 1, GOF2015_OPTION NOT = 1 OR = 0 AGA3_
Orifice_
V3
71 ERROR: IF NTAPS = 2, GOF2015_OPTION NOT = 0 AGA3_
Orifice_
V3
72 ERROR: DIFFERENTIAL PRESSURE WAS GREATER THAN AGA3_
UPSTREAM STATIC PRESSURE Orifice_
V3
75 WARNING: ORIFICE DIAMETER WAS <= 0.45 INCHES All
76 WARNING: PIPE DIAMETER WAS <= 2.0 INCHES All
79 WARNING: BETA RATIO (DO/DM) WAS <= 0.1 OR >= 0.75 All
80 WARNING: IF GOF2015_OPTION = 1, (HW)/(27.7072*(PF)) = OR > AGA3_
0.25; Orifice_
V3
IF GOF2015_OPTION = 0, (HW)/(27.707*(PF)) > 0.2
114
Chapter 9 - Configuring Function Blocks
AGA3_Orifice_LIQ
Description
This AGA3_Liquid Orifice function block calculates the volumetric flow-rate
of Liquid for an orifice meter using flange or pipe tap based on the input
parameters defined below. It is used along with any one of the API 11.1
function blocks since it requires densities @flowing, standard and base
conditions. This standard is based on AGA 3 (2012) update and this block is
available from R161.2 release.
115
Chapter 9 - Configuring Function Blocks
Input
Data
Input Parameter Description
types
UnitSystem INT {1} for US unit system and {2} for Metric unit system
FlowingTemp LREAL It is in FAHRENHEIT for US unit and Celcius for
Metric unit.
FlowingPressure LREAL It is in PSIA for US unit and Kpa for Metric unit.
DifferentialPressure LREAL It is in INH2O for US unit and in Kpa for Metric unit.
GasDensityAtFlowCond LREAL It is Gas Density at flowing temperature and pressure.
It is in KG/M^3 for (Metric System) & LBM/FT^3 for
(US System). It is an output of AGA8.
GasDensityAtStdCond LREAL It is Gas Density at standard temperature and
pressure. It is in KG/M^3 for (Metric System) &
LBM/FT^3 for (US System).It is an output of AGA8.
GasDensityAtBaseCond LREAL It is Gas Density at base temperature and pressure. It
is in KG/M^3 for (Metric System) & LBM/FT^3 for (US
System).It is an output of AGA8.
GasSuperComp LREAL It is unit less number. It is an output of AGA8
GasRelDenAtStdCond LREAL It is unit less number. It is an output of AGA8
TapsType INT FLANGE=1 and PIPE=2
OrificeMaterial INT STAINLESS STEEL=1, MONEL=2, CARBON
STEEL=3, STAINLESS_S_304=4 and STAINLESS_
S_316=5
PipeMaterial INT STAINLESS STEEL=1, MONEL=2, CARBON
STEEL=3, STAINLESS_S_304=4 and STAINLESS_
S_316=5
FluidType INT COMPRESSIBLE FLUID =1 and NON-
COMPRESSIBLE FLUID=2
TapsLocation INT UPSTREAM=1 and DOWNSTREAM=2
OrificeDiameter LREAL It is in inches for US unit system & in milimeter for
Metric unit system.
OrfDiaMsrdTemp LREAL It is in FAHRENHEIT for US unit and Celcius for
Metric unit.
PipeDiameter LREAL It is in inches for US unit system & in milimeter for
116
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
Metric unit system.
PipeDiaMsrdTemp LREAL It is in FAHRENHEIT for US unit and Celcius for
Metric unit.
AbsViscosity LREAL AGA3 Orifice method expects absolute viscosity in
CENTIPOISE unit only for both US & Metric unit
system.
(RECOMMENDED DEFAULT=0.010268 cP - PG 34
PART 4)
IsenExponent LREAL ISENTROPIC EXPONENT is unit less number.
(RECOMMENDED DEFAULT=1.3 - PG 34 PART 4)
CalibFactor LREAL It is unit less number. Default value is 1.0
AirCompFactAtStdCond LREAL It is unit less number. COMPRESSIBILITY FACTOR
OF AIR AT standard temperature and pressure. It is
used for Pipe tap only.
AtmosphericPressure LREAL It is in PSIA for US unit and Kpa for Metric unit.
Output
Output Data
Description
Parameter types
Aga3_QV LREAL This is volume flow rate at standard (TS & PS) conditions. It is in
Scf/Hr for US unit system and in cubic meter per hour in Metric unit
system.
Aga3_QM LREAL This is mass flow rate. It is in Lbm/Hr for US unit system and Kg/Hr
for Metric unit system.
Aga3_QB LREAL This is volumetric flow rate at base (TB & PB) conditions. It is in
Scf/Hr for US unit system and in cubic meter per hour in Metric unit
system.
CD LREAL It is Orifice plate coefficient of discharge (flange).
117
Chapter 9 - Configuring Function Blocks
Output Data
Description
Parameter types
Y LREAL It is Expansion factor (flange and pipe).
EV LREAL It is Velocity of approach factor (flange).
Out_Code INT This out parameter returns success or fail code.
Out
Description
Code
51 ERROR: NTAPS WAS NOT 0, 1 OR 2
52 ERROR: FLOWING PRESSURE WAS <= 0.0 OR > 40000. PSIA
53 ERROR: FLOWING TEMPERATURE < -200. OR > 760. DEG F
54 ERROR: MATORF OR MATPIPE WAS NOT 0, 1, 2 OR 3
55 ERROR: ORIFICE DIAMETER WAS <= 0 OR => 100.0 INCHES
56 ERROR: PIPE DIAMETER WAS <= 0 OR => 100.0 INCHES
57 ERROR: FLOWING OR STANDARD DENSITY WAS <= 0.0 LBM/FT^3
58 ERROR: DIFFERENTIAL PRESSURE WAS <= 0.0 INCHES H2O
60 ERROR: ISENTROPIC EXPONENT <= 1.0 OR => 2.0
61 ERROR: IFLUID WAS NOT 0, 1 OR 2
62 ERROR: STANDARD TEMPERATURE WAS NOT = 60.0 DEG F
63 ERROR: STANDARD PRESSURE WAS NOT = 14.73 PSIA
64 ERROR: TAP LOCATION WAS NOT 0, 1 OR 2 FOR NTAPS=2 (PIPE) OR TAP
LOCATION WAS NOT 1 FOR NTAPS=1 (FLANGE)
65 ERROR: SUPERCOMPRESSIBILITY FACTOR WAS <= 0.0
66 ERROR: RELATIVE DENSITY AT STANDARD CONDITIONS WAS < 0.07 OR >
1.52
118
Chapter 9 - Configuring Function Blocks
Out
Description
Code
67 ERROR: CALIBRATION FACTOR WAS <= 0.0
68 ERROR: COMPRESSIBILITY FACTOR AT STANDARD CONDITIONS <= 0.0
69 ERROR: BETA RATIO (DO/DM) <= 0.0 OR => 1.0
70 ERROR: IF NTAPS = 1, GOF2015_OPTION NOT = 1 OR = 0
71 ERROR: IF NTAPS = 2, GOF2015_OPTION NOT = 0
72 ERROR: DIFFERENTIAL PRESSURE WAS GREATER THAN UPSTREAM
STATIC PRESSURE
80 WARNING: IF GOF2015_OPTION = 1, (HW)/(27.7072*(PF)) = OR > 0.25;
Description
AGA7_Turbine or AGA9_Ultrasonic function block corrects measured
volume at flowing conditions read by either turbine or ultrasonic meter to
volume at base conditions; based on the input parameters defined below.
This description is applicable to following function blocks.
n AGA7_Turbine
119
Chapter 9 - Configuring Function Blocks
n AGA7_Turbine_V3
n AGA9_Ultrasonic
120
Chapter 9 - Configuring Function Blocks
n AGA9_Ultrasonic_V3
121
Chapter 9 - Configuring Function Blocks
Input
Data
Input Parameter Description Apply to
types
UnitSystem INT {1} US unit system and {2} Metric unit All
system
FlowType INT {1} Pulse Accumulated or {2} Analog All
Flow Rate
FlowingTemp LREAL If the unit system is US then it should All
be in FAHRENHEIT and if the unit
system is Metric then it should be in
Celsius
FlowingPressure LREAL If the unit system is US then it should All
be in PSIA and if the unit system is
Metric then it should be in KPA.
AtmosphericPressure LREAL If the unit system is US then it should All
be in PSIA and if the unit system is
Metric then it should be in KAR
122
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
it absolute pressure. If flowing
pressure is already absolute then it can
be left zero.
GasDensityAtBaseCond LREAL Gas density @ base condition should All
be in LBM/FT^3 (for US Unit System).
For Metric unit system it should be in
KG/M^3.
It is an output parameter of
AGA8function block.
GasSuperComp LREAL It is unit less number. It is gas super All
compressibility calculated by AGA8
function block.
123
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
for US unit or m^3/hr for Metric unit. & AGA9_
Ultrasonic_
V3
Pulse UDINT Pulse counter value AGA7_
Turbine_V3
& AGA9_
Ultrasonic_
V3
MeterCalFactor LREAL This input parameter is a Meter All
Calibration factor which is a unit less
value.
BaseTemp LREAL If the unit system is US then it must be All
in Deg Fahrenheit. If the unit system is
Metric then it must be in Deg Celsius.
Output
Following table describes output parameters for AGA7_Turbine function
block.
Output Data
Description
Parameter types
AGA7_Qv LREAL This is uncorrected volume @ Flowing conditions TF and PF. It’s
US unit is SCF/HR and Metric unit is M^3 /HR
AGA7_Qb LREAL This is Corrected volume at base conditions using compressibility
from AGA8. It’s US unit is SCF/HR and Metric unit is M^3 /HR
AGA7_Qm LREAL This is mass using base density (RHOB) from AGA8. Its US unit is
LBM/HR and Metric unit is KG/HR.
AGA7_Qe LREAL This is energy flow using heating value. It’s US unit is BTU/Hr
(British thermal units) and Metric unit is GJ/hr (gigajoules per hour)
124
Chapter 9 - Configuring Function Blocks
Output Data
Description
Parameter types
AGA9_Qv LREAL This is uncorrected volume @ Flowing conditions TF and PF. It’s
US unit is SCF/HR and Metric unit is M^3 /HR
AGA9_Qb LREAL This is Corrected volume at base conditions using compressibility
from AGA8. It’s US unit is SCF/HR and Metric unit is M^3 /HR
AGA9_Qm LREAL This is mass using base density (RHOB) from AGA8. Its US unit is
LBM/HR and Metric unit is KG/HR.
AGA9_Qe LREAL This is energy flow using heating value. Its US unit is BTU/hr (British
thermal units).
125
Chapter 9 - Configuring Function Blocks
AGA11_Coriolis
Description
AGA11_Coriolis function block converts gas mass (absolute) to volume at
base condition; based on the input parameters defined below. This
description is applicable to following function block:
n AGA11_Coriolis
Input
Input Parameter Data types Description
Gas_Mass LREAL Gas mass should be in US unit or Metric
unit.
126
Chapter 9 - Configuring Function Blocks
Output
Output Data
Description
Parameter types
AGA11_Qb LREAL This is volume @ base conditions. It’s US unit is SCF/HR and
Metric unit is M^3 /HR
AGA5_HV_CONSTANT
Description
AGA5_HV_CONSTANT function block calculates gas flow energy when we
have gas heating value and volume at base condition. This function block
can be used when gas heating value is directly available.
Input
Data
Input Parameter Description
types
Unit System INT It is unit less number. For US unit it is 1 and for
Metric it is 2
Heating Value LREAL If using US {1} unit then heating value should
be in US unit. If using Metric {2} unit then its
value should be in Metric unit. Its US unit is
BTU/FT^3.
127
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
It's Metric unit is MJ/m^3
BaseTemp LREAL If the unit system is US then it must be in Deg
Fahrenheit. If the unit system is Metric then it
must be in Deg Celsius.
Output
128
Chapter 9 - Configuring Function Blocks
AGA5_DETAIL
Description
AGA5_DETAIL function block calculates gas flow energy when all 21 gas
elements are available. This description is applicable to following function
block:
n AGA5_DETAIL
n AGA5_DETAIL_st
129
Chapter 9 - Configuring Function Blocks
n AGA5_DETAIL_V3
This function block can be used to calculate gas energy flow or gas heating
value when all 21 gas composition elements are available.
Input
Data
Input Parameter Description Apply to
types
Unit System INT For US unit it is 1 and for Metric it is All
2
GasCompFormat INT Gas Composition Format - {1} for All
Mole Fraction and {2} for
Percentage
NOTE: It is recommended to
use 2 percentage as a
default option.
130
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Methane LREAL It can be in Mole Fraction or All
Percentage
Nitrogen LREAL It can be in Mole Fraction or All
Percentage
CO2 LREAL It can be in Mole Fraction or All
Percentage
Ethane LREAL It can be in Mole Fraction or All
Percentage
Propane LREAL It can be in Mole Fraction or All
Percentage
Water LREAL It can be in Mole Fraction or All
Percentage
H2S LREAL It can be in Mole Fraction or All
Percentage
Hydrogen LREAL It can be in Mole Fraction or All
Percentage
CO LREAL It can be in Mole Fraction or All
Percentage
Oxygen LREAL It can be in Mole Fraction or All
Percentage
I_Butane LREAL It can be in Mole Fraction or All
Percentage
N_Butane LREAL It can be in Mole Fraction or All
Percentage
I_Pentane LREAL It can be in Mole Fraction or All
Percentage
N_Pentane LREAL It can be in Mole Fraction or All
Percentage
Hexane LREAL It can be in Mole Fraction or All
Percentage
Heptane LREAL It can be in Mole Fraction or All
Percentage
131
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Octane LREAL It can be in Mole Fraction or All
Percentage
Nonane LREAL It can be in Mole Fraction or All
Percentage
Decane LREAL It can be in Mole Fraction or All
Percentage
Helium LREAL It can be in Mole Fraction or All
Percentage
Argon LREAL It can be in Mole Fraction or All
Percentage
BaseTemp LREAL If the unit system is US then it must All
be in Deg Fahrenheit. If the unit
system is Metric then it must be in
Deg Celsius.
132
Chapter 9 - Configuring Function Blocks
Output
Data
Output Parameter Description Apply to
types
HeatingValue LREAL This is gas heating value in BTU/FT^3 AGA5_Detail &
for US unit. AGA5_Detail_V2
GrossHeatingValue LREAL This is gross heating value in AGA5_Detail_V3
BTU/FT^3 for US unit. MJ/M3 for
Metric.
NetHeatingValue LREAL This is net heating value in BTU/FT^3 AGA5_Detail_V3
for US unit. MJ/M3 for Metric.
Aga5_hv LREAL This is gas flow energy at base All
condition. It’s US unit is BTU/Hr.
Aga5_qd LREAL This is dry gas flow energy at base All
condition. It’s US unit is BTU/Hr.
Outcode INT This out parameter returns success or AGA5_Detail_V3
fail code.
For AGA5_DETAIL_st function block input structures are user defined data
type. They are defined in Aga_Data Types under Data Types in IEC
Programming Workspace.
133
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
1 ERROR: A COMPONENT MOLE FRACTION < 0.0 OR > 1.0 AGA5_DETAIL_
V3
2 WARNING: SUM OF MOLE FRACTIONS < 0.9999 OR > AGA5_DETAIL_
1.0001 V3
3 WARNING: PRESSURE BASE (PB) <= 0.0 OR >= 16 PSIA AGA5_DETAIL_
V3
4 WARNING: TEMPERATURE BASE (TB) <= 32.0 OR >= 77.0 AGA5_DETAIL_
DEG F V3
API 11.1
The following API 11.1 function blocks are available:
134
Chapter 9 - Configuring Function Blocks
135
Chapter 9 - Configuring Function Blocks
Supported commodities
n Crude oil
n Refined products
n Special products
n Lubricating oil
Supported calculations
n API TYPE1- US unit system
n API TYPE2- US unit system
n API TYPE3- US unit system
n API TYPE4- Metric unit system
n API TYPE5- Metric unit system
n API TYPE6- Metric unit system
136
Chapter 9 - Configuring Function Blocks
Parameter Description
0 No error, Calculations Successful
1 Error - Illegal arguments
2 Error - Memory allocation
3 Error - VCF out of range
4 Error - Non convergence
5 Error - Temperature out of range
6 Error - Density out of range
7 Error - Pressure out of range
8 Error - Alpha60 out of range
9 Error - Supercritical fluid
10 Error - No reference fluids
11 Error - No Solution
Description
These function blocks calculates the Volume Correction Factor (VCF) for
correcting from the density at the base conditions (60°F and 0 psig) to
alternate temperature and pressure conditions for crude-oil, refined
products, special products and lubricating oil.
These function blocks are specific to US unit system.
API TYPE1 Function Blocks include the following function blocks:
137
Chapter 9 - Configuring Function Blocks
n CRUDE_OIL_ALT_US
n REFINED_PRODUCTS_ALT_US
n SPECIAL_PRODUCTS_ALT_US
n LUBRICATING_OIL_ALT_US
These Function block expects the input values in the proper units (°F, psig,
and kg/m³). If they are not in the proper units then appropriate unit
conversion block should be used. The density values calculated by these
function block are in the units of kg/m³. If these units do not match the
original input units, then the output densities should be converted to that of
the original input value’s units appropriate unit conversion block.
138
Chapter 9 - Configuring Function Blocks
Input
Data
Input Parameter Description
types
AlternateTemperature LREAL Value of alternate temperature in °F
AlternatePressure LREAL Value of alternate Pressure in kpa
BaseDensity LREAL Value of base density (kg/m3). If input density
type is relative density or API Gravity then it
must be converted into Density(kg/m3) using
provided unit conversion blocks
VolumeatAlternetTempPressure LREAL No Conversion needed, Most of the time it is
optional input
Output
Data
Output Parameter Description
types
VCFTemerature LREAL Volume correction factor due to temperature
VCFPressure LREAL Volume correction factor due to pressure
ScaledCompressibilityFactor LREAL Scaled compressibility factor
CombineVCF LREAL Combined volume correction factor due to
temperature and pressure
AlternetDensity LREAL Density at alternate conditions
VolumeatBase LREAL Volume at base conditions
Out_Code INT This out parameter returns success or fail code.
Description
These function blocks calculates the density at the base conditions (60°F
and 0 psig) that is consistent with an observed density at its temperature
and pressure condition. It has the flexibility of accepting a pre-calculated
60°F thermal expansion factor as per the commodity type of the liquid that
is crude-oil, refined products, special products and lubricating oil. These
function blocks are specific to US unit system.
139
Chapter 9 - Configuring Function Blocks
n REFINED_PRODUCTS_OBS_US
n SPECIAL_PRODUCTS_OBS_US
n LUBRICATING_OIL_OBS_US
140
Chapter 9 - Configuring Function Blocks
These Function block expects the input values in the proper units (°F, Kpa,
and kg/m³). If they are not in the proper units then appropriate unit
conversion block should be used. The density values calculated by these
function block are in the units of kg/m³. If these units do not match the
original input units, then the output densities should be converted to that of
the original input value’s units appropriate unit conversion block.
Input
Data
Input Parameter Description
types
ObservedTemperature LREAL Value of observed temperature in °F
ObservedPressure LREAL Value of observed Pressure in kpa
ObservedDensity LREAL Value of observed density (kg/m3). If input
density type is relative density or API
Gravity then it must be converted into
Density(kg/m3) using provided unit
conversion blocks
AlphaAt60F LREAL Pre-calculated 60°F thermal expansion
factor. This input parameter is only
applicable for special products. For other
commodity types this parameter is not
present
VolumeatObservedTempPressure LREAL No Conversion needed, Most of the time it
is optional input
Ouput
Data
Output Parameter Description
types
VCFTemerature LREAL Volume correction factor due to temperature
VCFPressure LREAL Volume correction factor due to pressure
ScaledCompressibilityFactor LREAL Scaled compressibility factor
CombineVCF LREAL Combined volume correction factor due to
temperature and pressure
BaseDensity LREAL Density at Base conditions
141
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
VolumeatBase LREAL Volume at base conditions
Out_Code INT This out parameter returns success or fail code.
Description
These function blocks combines those in TYPE1 and TYPE2. First, the
density at the base conditions (60°F and 0 psig) consistent with an
observed density is calculated. This base density is then corrected to the
alternate temperature and pressure conditions as per commodity type of
the liquid that is crude-oil, refined products, special products and lubricating
oil. These function blocks are specific to US unit system.
This description is applicable to following function blocks:
n CRUDE_OIL_AO_US
142
Chapter 9 - Configuring Function Blocks
n REFINED_PRODUCTS_AO_US
n SPECIAL_PRODUCTS_AO_US
143
Chapter 9 - Configuring Function Blocks
n LUBRICATING_OIL_AO_US
These Function block expects the input values in the proper units (°F, Kpa,
and kg/m³). If they are not in the proper units then appropriate unit
conversion block should be used. The density values calculated by these
function block are in the units of kg/m³. If these units do not match the
original input units, then the output densities should be converted to that of
the original input value’s units appropriate unit conversion block.
Input
Data
Input Parameter Description
types
AlternetTemperature LREAL Value of alternate temperature in °F
AlternetPressure LREAL Value of alternate Pressure in kpa
ObservedTemperature LREAL Value of observed temperature in °F
ObservedPressure LREAL Value of observed Pressure in kpa
ObservedDensity LREAL Value of observed density (kg/m3). If input
density type is relative density or API
Gravity then it must be converted into
Density(kg/m3) using provided unit
conversion blocks
AlphaAt60F LREAL Pre-calculated 60°F thermal expansion
factor. This input parameter is only
144
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
applicable for special products. For other
commodity types this parameter is not
present
VolumeatObservedTempPressure LREAL No Conversion needed, Most of the time it
is optional input
Output
Data
Output Parameter Description
types
VCFBaseAndObservedTemerature LREAL Volume correction factor due to
temperature between the base and
observed temperatures
VCFBaseAndObservedPressure LREAL Volume correction factor due to pressure
between the base and observed pressures
at the observed
temperature
SCFObserved LREAL Scaled compressibility factor at the
observed temperature
CombineVCFBaseAndObserved LREAL Combined volume correction factor due to
temperature and pressure between the
base and observed
conditions
BaseDensity LREAL Density at Base conditions
VolumeatBase LREAL Volume at base conditions
VCFBaseAndAlternetTemerature LREAL Volume correction factor due to
temperature between the base and
alternate temperatures
VCFBaseAndAlternetPressure LREAL Volume correction factor due to pressure
between the base and alternate pressures
at the alternate
temperature
SCFAlternet LREAL Scaled compressibility factor at the
145
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
alternate temperature
CombineVCFBaseAndAlternet LREAL Combined volume correction factor due to
temperature and pressure between the
base and alternate
conditions
AlternetDensity LREAL Density at alternate conditions
VolumeatAlternet LREAL Volume at alternate conditions
Out_Code INT This out parameter returns success or fail
code.
Description
This procedure calculates the Volume Correction Factor (VCF) given the
density at the metric base conditions (15°C or 20°C and 0 kPa (gauge)).
The parameters used in these function blocks depends upon the
commodity group to which the liquid belongs that is crude-oil, refined
products, special products and lubricating oil. These function blocks are
specific to Metric unit system.
This description is applicable to following function blocks:
n CRUDE_OIL_ALT_ME
146
Chapter 9 - Configuring Function Blocks
n REFINED_PRODUCTS_ALT_ME
n SPECIAL_PRODUCTS_ALT_ME
n LUBRICATING_OIL_ALT_ME
147
Chapter 9 - Configuring Function Blocks
These Function block expects the input values in the proper units (°C, kPa).
If they are not in the proper units then appropriate unit conversion block
should be used. The density values calculated by these function block are
in the units of kg/m³. If these units do not match the original input units, then
the output densities should be converted to that of the original input value’s
units appropriate unit conversion block.
Input
Data
Input Parameter Description
types
BaseTemperature LREAL Value of Base temperature °C
AlternateTemperature LREAL Value of alternate temperature in °C
AlternatePressure LREAL Value of alternate Pressure in kpa
BaseDensity LREAL Value of base density (kg/m3). If input density
type is relative density or API Gravity then it
must be converted into Density(kg/m3) using
provided unit conversion blocks
AlphaAt60F LREAL Pre-calculated 60°F thermal expansion factor.
This input parameter is only applicable for
special products. For other commodity types
this parameter is not present
VolumeatAlternetTempPressure LREAL No Conversion needed, Most of the time it is
optional input
Output
Data
Output Parameter Description
types
VCFTemerature LREAL Volume correction factor due to temperature
VCFPressure LREAL Volume correction factor due to pressure
ScaledCompressibilityFactor LREAL Scaled compressibility factor
CombineVCF LREAL Combined volume correction factor due to
temperature and pressure
AlternetDensity LREAL Density at alternate conditions
VolumeatBase LREAL Volume at base conditions
148
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
Out_Code INT This out parameter returns success or fail code.
Description
These function blocks calculates the density at the metric base conditions
(15°C or 20°C and 0 kPa (gauge)) that is consistent with an observed
density measured at the observed temperature and pressure conditions for
crude-oil, refined products, special products and lubricating oil. These
function blocks are specific to Metric unit system.
This description is applicable to following function blocks
n CRUDE_OIL_OBS_ME
n REFINED_PRODUCTS_OBS_ME
149
Chapter 9 - Configuring Function Blocks
n SPECIAL_PRODUCTS_OBS_ME
n LUBRICATING_OIL_OBS_ME
These Function block expects the input values in the proper units (°C, Kpa,
and kg/m³). If they are not in the proper units then appropriate unit
conversion block should be used. The density values calculated by these
function block are in the units of kg/m³. If these units do not match the
original input units, then the output densities should be converted to that of
the original input value’s units appropriate unit conversion block.
Input
Data
Input Parameter Description
types
BaseTemperature LREAL Value of Base temperature °C
ObservedTemperature LREAL Value of observed temperature in °C
ObservedPressure LREAL Value of observed Pressure in kpa
ObservedDensity LREAL Value of observed density (kg/m3). If input
density type is relative density or API
150
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
Gravity then it must be converted into
Density(kg/m3) using provided unit
conversion blocks
AlphaAt60F LREAL Pre-calculated 60°F thermal expansion
factor. This input parameter is only
applicable for special products. For other
commodity types this parameter is not
present
VolumeatObservedTempPressure LREAL No Conversion needed, Most of the time it
is optional input
Output
Data
Output Parameter Description
types
VCFTemerature LREAL Volume correction factor due to temperature
VCFPressure LREAL Volume correction factor due to pressure
ScaledCompressibilityFactor LREAL Scaled compressibility factor
CombineVCF LREAL Combined volume correction factor due to
temperature and pressure
BaseDensity LREAL Density at Base conditions
VolumeatBase LREAL Volume at base conditions
Out_Code INT This out parameter returns success or fail code.
Description
These function blocks combines those in TYPE4 and TYPE5. The density
at conditions of 60°F and 0 psig that is consistent with the observed density
is first calculated. This density is then corrected to the alternate
temperature and pressure conditions.
The corresponding density at the metric base temperature (15°C or 20°C) is
also
151
Chapter 9 - Configuring Function Blocks
Calculated as per the commodity type of the liquid that is crude-oil, refined
products, special products and lubricating oil. These function blocks are
specific to Metric unit system.
This description is applicable to following function blocks
n CRUDE_OIL_AO_ME
n REFINED_PRODUCTS_AO_ME
n SPECIAL_PRODUCTS_AO_ME
152
Chapter 9 - Configuring Function Blocks
n LUBRICATING_OIL_AO_ME
These Function block expects the input values in the proper units (°C, Kpa,
and kg/m³). If they are not in the proper units then appropriate unit
conversion block should be used. The density values calculated by these
function block are in the units of kg/m³. If these units do not match the
original input units, then the output densities should be converted to that of
the original input value’s units appropriate unit conversion block.
Input
Data
Input Parameter Description
types
BaseTemperature LREAL Value of Base temperature °C
AlternetTemperature LREAL Value of alternate temperature in °F
AlternetPressure LREAL Value of alternate Pressure in kpa
ObservedTemperature LREAL Value of observed temperature in °F
ObservedPressure LREAL Value of observed Pressure in kpa
ObservedDensity LREAL Value of observed density (kg/m3). If input
density type is relative density or API
Gravity then it must be converted into
Density(kg/m3) using provided unit
conversion blocks
AlphaAt60F LREAL Pre-calculated 60°F thermal expansion
factor. This input parameter is only
applicable for special products. For other
commodity types this parameter is not
present
153
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
VolumeatObservedTempPressure LREAL No Conversion needed, Most of the time it
is optional input
Output
Data
Output Parameter Description
types
VCFBaseAndObservedTemerature LREAL Volume correction factor due to
temperature between the base and
observed temperatures
VCFBaseAndObservedPressure LREAL Volume correction factor due to pressure
between the base and observed pressures
at the observed
temperature
SCFObserved LREAL Scaled compressibility factor at the
observed temperature
CombineVCFBaseAndObserved LREAL Combined volume correction factor due to
temperature and pressure between the
base and observed
conditions
BaseDensity LREAL Density at Base conditions
VolumeatBase LREAL Volume at base conditions
VCFBaseAndAlternetTemerature LREAL Volume correction factor due to
temperature between the base and
alternate temperatures
VCFBaseAndAlternetPressure LREAL Volume correction factor due to pressure
between the base and alternate pressures
at the alternate
temperature
SCFAlternet LREAL Scaled compressibility factor at the
alternate temperature
CombineVCFBaseAndAlternet LREAL Combined volume correction factor due to
temperature and pressure between the
154
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
base and alternate
conditions
AlternetDensity LREAL Density at alternate conditions
VolumeatAlternet LREAL Volume at alternate conditions
Out_Code INT This out parameter returns success or fail
code.
APINGLLIB
Function
Short description
block
API NGL API NGL Block calculates:
Block
Base density using API Chapter 11, Section 2, Part 4 in conjunction with either
API Chapter 11.2.2 or Chapter 11.2.2M.
155
Chapter 9 - Configuring Function Blocks
The basic function of API NGL block when set for line to base operation is
to calculate standard density and associated volume correction factor from
an observed density, temperature and pressure with an option to either
calculate a vapor pressure or use an operator entered value.
The basic function of API NGL block when set for base to line operation is
to calculate meter density and associated volume correction factor from an
observed density, temperature and pressure with an option to either
calculate a vapor pressure or use an operator entered value.
API NGL block solves either a line to base or base to line correction but not
both.
It is possible, however, to connect the resulting standard density from a line
to base block to the input of a base to line block.
Input
Data
Input Parameter Description
types
APITables INT This can be from one of the following standards:
relative density)
156
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
2 - API1122 (CPL calculated from standard)
4 - API1122M
ConverCriteria LREAL IP2 Convergence limit. Reserved for future use.
Set to 0.001
MaxIterations INT IP2 Max loop limit. Reserved for future use. Preset to
Set to 50.
DensityInput LREAL Density Input
DensityUnits INT This can be from one of the following options:
0 - Kg/m3
1 - RD
2 - Degrees API
IterationMethod INT Main calculation method such as ASTM and IP2
0 - ASTM
1 - IP2
PressureInput LREAL Pressure Input.
PressureUnits INT 0 - PSIA
1 - PSIG
2 - Kpa
3 - Bar
4 - BarG
EquilibPressureInput LREAL Operator Entered or Observed Vapor Pressure Input
PECalcType INT Vapor Pressure Options.
following values:
157
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
1 - Use Observed (The operator entered value is used)
Temperature.)
ReferanceTemperature LREAL Reference Temperature. This is only used by T59E
and T60E. The usual value is 20. 0 degC.
Rounding INT 0 – Rounding Disabled
2 – Rounding Enabled
1 – Deg C
Output
Data
Output Parameter Description
types
CPL LREAL Correction factor for effects of pressure on the liquid
CTL LREAL Correction factor for effects of temperature on the
liquid
CTPL LREAL Correction factor for effects of temperature and
pressure on the liquid
AFactor LREAL CPL calculation interim result
BFactor LREAL CPL calculation interim result
EquilibriumPressureOut LREAL Calculated (or used) Vapor Pressure
158
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
Relative Density LREAL Relative Density Corrected
CorrectedDensity LREAL Calculated Density in kg/m3 units
CorrectedDensityAPI LREAL Calculated Density in degrees API
ErrorCode INT Critical error code
WarningCode INT Warning code
Operating Limits:
The API 11 Chapter 11 methods are derived from correlations of density
versus physical conditions of liquids. As such they are only valid over
certain operating ranges. To allow flexibility, especially with the IP2 iteration
method where compressibility and temperature correction calculation
results interact, the limits are set as follows:
159
Chapter 9 - Configuring Function Blocks
160
Chapter 9 - Configuring Function Blocks
Warning codes
Code Description
1 Density input is out of range (all calculations)
2 Temperature input is out of range (all calculations)
3 Pressure input is out of range (all calculations)
4 Calculation combination is invalid (all calculations)
5 Reserved
6 Reserved
7 Reserved
8 Reserved
9 Reserved
10 Reserved
11 Reserved
12 Reserved
13 Reserved
14 API.11.2.4: Alpha error
15 API.11.2.4: Interpolation variable error
16 API.11.2.4: TC error
17 API.11.2.4: TRX error
18 API.11.2.4: H2 error
19 API.11.2.4: Saturated density error
20 API.11.2.4: Interpolation factor error
21 API.11.2.4: Step 4-5 error
22 API.11.2.4: Fluid 2 relative density low error
23 API.11.2.4: Step 6 TC2_TC1 error
24 API.11.2.4: RD X < Lower Limit
25 API.11.2.4: RD 60 Mid error
26 API.11.2.4: Step 9 Phi error
161
Chapter 9 - Configuring Function Blocks
Code Description
27 API.11.2.4: Step 9 A error
28 API.11.2.4: Step 9 B error
29 API.11.2.4: Step 9 RD 60 Trial error
30 API.11.2.4: Iteration Fail error
31 API.11.2.4: CTL range error
32 API.11.2.4: T60 Step 6 density error
101 API.11.2.4: Density conversion error
102 API.11.2.4: Rounding error
103 API.11.2.4: Reserved
104 API.11.2.4: CTL range error
105 API.11.2.4: CPL range error
106 API.11.2.4: Reserved
107 API.11.2.4: Reserved
108 API.11.2.4: Calculated density range error
109 API.11.2.4: Density units conversion error
110 API.11.2.4: Pressure units conversion error
111 API.11.2.4: CTPL range error
211 API 1122 and API1122M: TR > Max error
212 API 1122 and API1122M: Factor error
301 Ch.11.2.5: relative density out of range
302 Ch.11.2.5: Temperature out of range
162
Chapter 9 - Configuring Function Blocks
ISO5167DualLIB
ISO 5167Dual
ISO 5167 is an international standard covering the measurement of fluid
flow by means of pressure differential devices such as orifice plates and
venturis. When some parameters are known, ISO 5167 allows other
variables to be calculated. The most common usage is to calculate mass
flow rate from differential pressure, static pressure and density. ISO 5167 is
widely used in most areas of the world except North America.
The basic function of the ISO 5167 block is to calculate mass flow rate from
primary element DP and other required inputs. This block supports the
1991, 1997 and 2003 versions of the ISO 5167 standard. These versions
differ in small but significant ways.
n The basic functions supported are listed below
n Calculation of mass flow to the 1991, 1997 and 2003 versions of ISO
5167.
n Calculation of gross volume flow, standard volume flow and energy
flow.
n Calculation of fully-recovered downstream pressure (see section 9).
n Dual density inputs with automatic fail-over and deviation checking (see
section 5.4).
163
Chapter 9 - Configuring Function Blocks
Input
Data
Input Parameter Description
types
CalorificValue LREAL Calorific value in MJ/Sm3
ISO5167Version INT ISO5167Version:
0 = version 1991;
1 = version 1997;
2 = version 2003
FluidType INT 0 = Compressible;
1 = Uncompressible
DensityFromBlockPin BOOL 1: RHOTP from block pin;
0: constant value
ConstantDensity LREAL Const Density
164
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
DensityInput1 LREAL Density Input 1
DensityInput2 LREAL Density Input 1
ViscosityFromBlockPin BOOL 1: VISC from block pin;
0: constant value
ViscosityOfFluid LREAL DP transmitter input - range 1 (in selected DP
units)
ISEN_EXPFromBlockPin BOOL true: ISEN_EXP from block pin;
1 = kg/min;
2 = kg/hour;
3 = tonne/min;
4 = tonne/hour
MassFlowScaling LREAL mass flow scaling factor
QVComputation BOOL true = computation for Volume Flow
VolumeFlowUnit INT 0 = m3/sec;
1 = m3/min;
2 = m3/hour;
4 = km3/hour
VolumeFlowScaling LREAL Volume flow scaling factor
QSComputation BOOL true = Standard Volume Flow Computation
1 = Sm3/min;
165
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
2 = Sm3/hour;
4 = kSm3/hour
StdVolumeFlowScaling LREAL Standard volume flow scaling factor
QHComputation BOOL true = Energy Flow
EnergyFlowUnit INT 0 = KJ/sec;
1 = MJ/sec;
2 = MJ/min;
3 = MJ/hour;
4 = GJ/hour
EnergyFlowScaling LREAL Energy flow scaling factor
InitialCValue LREAL initial C value
MaxItrations INT max number of iterations
PrecisionLimit LREAL Precision Limits
FiscalMetering BOOL Fiscal Metering 1 = YES , 0 =NO
PrmiaryElementType INT 0 = Orifice Plate;
1 = Classical Venturi
OrificeTapType INT 0 = Corner;
1 = Flange;
2 = D&D/2
VenturiType INT 0 = As-Cast;
1 = Machined;
2 = Roughwelded
AllowanceForExp BOOL true = allowance for expansion
PipeRefTemperature LREAL pipe reference temperature (deg C)
PipeCoefficient LREAL pipe coefficient of expansion (mm/mm/deg C)
ElementRefTemperature LREAL primary element reference temperature (deg
C)
166
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
ElementCoefficient LREAL primary element coefficient of expansion
(mm/mm/deg C)
PipeReferenceBore LREAL pipe reference bore (mm)
ElementReferenceBore LREAL primary element reference bore (mm)
PermLossA LREAL venturi permanent pressure loss(%DP) for
coefficients A
PermLossB LREAL venturi permanent pressure loss(%DP) for
coefficients B
StaticPressMeasurementPos INT static pressure measurement position
(0 = Upstream, 1 = Downstream)
StaticPressUnit INT 0 = KPa;
1 = MPa;
2 = bar
StaticPressBasis INT 0 = Gauge;
1 = Absolute
AtmosphericPress LREAL Atmospheric Pressure
AtmosphericPressUnit INT atmospheric pressure measurement unit, 0 =
KPa abs, 1 = MPa abs, 2 = bara
DiffPressUnit INT diffrential pressure measurement unit, 0 =
KPa, 1 = MPa, 2 = bar, 3 = mbar
TempMeasurePosition INT temperature measurement position at 0 =
Upstream, 1= Downstream
DiffPressureTxNumber INT 1 = 1 transmitter;
2 = 2 transmitter;
3 = 3 transmitter
HiLimDP1 LREAL hight limit value of transition 1-2
HiLimDP2 LREAL hight limit value of transition 2-3
DeadbandValueDP1 LREAL deadband value of transition 1-2
167
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
DeadbandValueDP2 LREAL deadband value of transition 2-3
NoOfDensityInputs INT Number of density inputs
DensityInputSelection INT Density input selection
DensityMeasurPosition1 INT density measurement position for input1
(0 = Upstream, 1 = Downstream)
DensityMeasurPosition2 INT density measurement position for input2
(0 = Upstream, 1 = Downstream)
DensityInputComparDB LREAL Density inputs 1 and 2 comparison deadband
DensityInputComparTimeDelay INT Density inputs 1 and 2 comparison time delay
CalorificValue LREAL Calorific Value
DiffPressInputRange1 LREAL Diff Pressure Transmitter input range1
DiffPressInputRange2 LREAL Diff Pressure Transmitter input range2
DiffPressInputRange3 LREAL Diff Pressure Transmitter input range3
DiffPressureStatus1 BOOL Diff Pressure Transmitter 1 status; 0=OK,
1=fault
DiffPressureStatus2 BOOL Diff Pressure Transmitter 2 status; 0=OK,
1=fault
DiffPressureStatus3 BOOL Diff Pressure Transmitter 3 status; 0=OK,
1=fault
DPPVEUHI1 LREAL DP transmitter x EUHI
DPPVEUHI2 LREAL DP transmitter x EUHI
RhoInputSelStatus1 BOOL RhoInputSel Input Status 1
RhoInputSelStatus2 BOOL RhoInputSel Input Status 2
StaticPressure LREAL Static Pressure
StandardDensity LREAL Standard density
Temperature LREAL Temperature
Output
168
Chapter 9 - Configuring Function Blocks
In ISO 5167 block, there is DP, static pressure, temperature and density
exposed as input pin (or constant density from the configuration form) and
measured form field. There are other additional inputs as well. Based on
these inputs, the mass flow, volume flow, standard volume flow and energy
flow of the fluid can be figured out via ISO5167_DUAL function block.
169
Chapter 9 - Configuring Function Blocks
170
Chapter 9 - Configuring Function Blocks
Code Description
5 Viscosity value is invalid.
6 Isentropic exponent value is invalid (if a compressible fluid is selected).
7 Iteration failed to converge.
8 Multiple DP transmitter configuration is invalid.
9 Pipe bore is invalid.
10 Beta is invalid.
11 P2 is invalid (if a compressible fluid is selected).
20 If standard volume is enabled, standard density is invalid.
21 If energy flow is enabled, CV by volume is invalid.
30 Configuration parameter invalid.
Warning codes
Code Description
1 For a compressible fluid, P2/P1 ratio is too low.
2 Element bore is too small.
3 Pipe size is out of range for an orifice plate.
4 Pipe size is out of range for a venturi.
5 Orifice beta ratio is outside fiscal limits.
6 Orifice beta ratio is outside limits.
7 Venturi beta ratio is outside limits.
171
Chapter 9 - Configuring Function Blocks
Code Description
8 Orifice plate is outside Reynolds No limits.
9 Orifice plate is above fiscal Reynolds No limit.
10 Venturi is outside Reynolds No limits.
11 For dual density inputs, input 1 is invalid.
12 For dual density inputs, input 2 is invalid.
13 For dual density inputs, the deviation between the inputs is greater than the
deadband.
ISO5167DualJTLib
Function
Short description
block
ISO 5167 ISO 5167 Dual JT Block calculates
DUAL JT
1. Mass flow to the 1991, 1997 and 2003 versions of ISO 5167.Calorific value
on a superior and inferior basis
172
Chapter 9 - Configuring Function Blocks
The basic function of the ISO 5167 block is to calculate mass flow rate from
primary element DP and other required inputs. This block supports the
1991, 1997 and 2003 versions of the ISO 5167 standard. These versions
differ in small but significant ways.
The basic functions supported are listed below
n Calculation of mass flow to the 1991, 1997 and 2003 versions of ISO
5167.
n Calculation of gross volume flow, standard volume flow and energy
flow.
n Calculation of fully-recovered downstream pressure (see section 9).
n Dual density inputs with automatic fail-over and deviation checking (see
section 5.4).
n Calculation of upstream density from a downstream measurement (see
section 11.2). Each density measurement input can be configured
upstream or downstream independently.
n Calculation of upstream temperature from a downstream measurement
(see section 11.1).
n Temperature compensation of primary element and pipe.
n Gauge or absolute static pressure transmitters located upstream or
downstream.
n Automatic selection of DP from up to three DP transmitters (see section
0).
n Orifice plates with all three tapping types (corner, D and D/2 and
flange).
n Classical ventures of all three construction types: as-cast, machined
and rough-welded.
n Externally calculated viscosity and isentropic exponent or constant
values.
n Incompressible fluids (liquids) or compressible ones (gases).
n UK DTI limits on beta and Reynolds No for fiscal purposes.
Input
Data
Parameter Description
type
173
Chapter 9 - Configuring Function Blocks
Data
Parameter Description
type
CalorificValue LREAL Calorific value in MJ/Sm3
ISO5167Version INT ISO5167Version:
0 = 1991;
1 = 1997;
2 = 2003
FluidType INT 0 = Compressible;
1 = Uncompressible
DensityFromBlockPin BOOL 1: RHOTP from block pin;
0: constant value
ConstantDensity LREAL Const Density
DensityInput1 LREAL Density Input 1
DensityInput2 LREAL Density Input 1
ViscosityFromBlockPin BOOL 1: VISC from block pin;
0: constant value
ViscosityOfFluid LREAL DP transmitter input - range 1 (in selected
DP units)
ISEN_EXPFromBlockPin BOOL 1 : ISEN_EXP from block pin;
0: constant value
IsentropicExponent LREAL Isentropic Exponent
MassFlowUnit INT 0 = kg/sec;
1 = kg/min;
2 = kg/hour;
3 = tonne/min;
4 = tonne/hour
MassFlowScaling LREAL mass flow scaling factor
QVComputation BOOL true = computation for Volume Flow
174
Chapter 9 - Configuring Function Blocks
Data
Parameter Description
type
VolumeFlowUnit INT 0 = m3/sec;
1 = m3/min;
2 = m3/hour;
4 = km3/hour
VolumeFlowScaling LREAL Volume flow scaling factor
QSComputation BOOL true = Standard Volume Flow Computation
StdVolumeFlowUnit INT 0 = Sm3/sec;
1 = Sm3/min;
2 = Sm3/hour;
4 = kSm3/hour
StdVolumeFlowScaling LREAL Standard volume flow scaling factor
QHComputation BOOL Energy Flow computation
1 = enable;
0 = disable
EnergyFlowUnit INt 0 = KJ/sec;
1 = MJ/sec;
2 = MJ/min;
3 = MJ/hour;
4 = GJ/hour
EnergyFlowScaling LREAL Energy flow scaling factor
InitialCValue LREAL initial C value
MaxItrations INT max number of iterations
PrecisionLimit LREAL Precision Limits
FiscalMetering BOOL Fiscal Metering:
1= Yes;
175
Chapter 9 - Configuring Function Blocks
Data
Parameter Description
type
0 =No
PrmiaryElementType INT 0 = Orifice Plate;
1 = Classical Venturi
OrificeTapType INT 0 = Corner;
1 = Flange;
2 = D&D/2
VenturiType INT 0 = As-Cast;
1 = Machined;
2 = Roughwelded
AllowanceForExp BOOL allowance for expansion:
1 = Yes;
0 = No
PipeRefTemperature LREAL pipe reference temperature (deg C)
PipeCoefficient LREAL pipe coefficient of expansion (mm/mm/deg
C)
ElementRefTemperature LREAL primary element reference temperature (deg
C)
ElementCoefficient LREAL primary element coefficient of expansion
(mm/mm/deg C)
PipeReferenceBore LREAL pipe reference bore (mm)
ElementReferenceBore LREAL primary element reference bore (mm)
PermLossA LREAL venturi permanent pressure loss(%DP) for
coefficients A
PermLossB LREAL venturi permanent pressure loss(%DP) for
coefficients B
StaticPressMeasurementPos INT static pressure measurement position at
(0 = Upstream, 1 = Downstream)
StaticPressUnit INT 0 = KPa;
176
Chapter 9 - Configuring Function Blocks
Data
Parameter Description
type
1 = MPa;
2 = bar
StaticPressBasis INT 0 = Gauge;
1 = Absolute
AtmosphericPress LREAL Atmospheric Pressure
AtmosphericPressUnit INT atmospheric pressure measurement unit:
0 = KPa abs;
1 = MPa abs;
2 = bara
DiffPressUnit INT diffrential pressure measurement unit:
0 = KPa;
1 = MPa;
2 = bar;
3 = mbar
TempMeasurePosition INT temperature measurement position at
(0 = Upstream, 1 = Downstream)
DiffPressureTxNumber INT 1 = 1 transmitter;
2 = 2 transmitter;
3 = 3 transmitter
HiLimDP1 LREAL hight limit value of transition 1-2
HiLimDP2 LREAL hight limit value of transition 2-3
DeadbandValueDP1 LREAL deadband value of transition 1-2
DeadbandValueDP2 LREAL deadband value of transition 2-3
NoOfDensityInputs INT Number of density inputs
DensityInputSelection INT Density input selection
DensityMeasurPosition1 INT density measurement position for input1
177
Chapter 9 - Configuring Function Blocks
Data
Parameter Description
type
(0 = Upstream, 1 = Downstream)
DensityMeasurPosition2 INT density measurement position for input2
(0 = Upstream, 1 = Downstream)
DensityInputComparDB LREAL Density inputs 1 and 2 comparison
deadband
DensityInputComparTimeDelay INT Density inputs 1 and 2 comparison time
delay
CalorificValue LREAL Calorific Value
DiffPressInputRange1 LREAL Diff Pressure Transmitter input range1
DiffPressInputRange2 LREAL Diff Pressure Transmitter input range2
DiffPressInputRange3 LREAL Diff Pressure Transmitter input range3
DiffPressureStatus1 BOOL Diff Pressure Transmitter 1 status; 0=OK,
1=fault
DiffPressureStatus2 BOOL Diff Pressure Transmitter 2 status; 0=OK,
1=fault
DiffPressureStatus3 BOOL Diff Pressure Transmitter 3 status; 0=OK,
1=fault
DPPVEUHI1 LREAL DP transmitter x EUHI
DPPVEUHI2 LREAL DP transmitter x EUHI
RhoInputSelStatus1 BOOL RhoInputSel Input Status 1
RhoInputSelStatus2 BOOL RhoInputSel Input Status 2
StaticPressure LREAL Static Pressure
StandardDensity LREAL Standard density
Temperature LREAL Temperature
ZP1T1 LREAL Compressibility at P1, T1 line conditions.
ZP2T3 LREAL Compressibility at P2, T3 line conditions.
178
Chapter 9 - Configuring Function Blocks
Output
Data
Output Parameter Description
types
BetaRatio LREAL Beta ratio (d/D) at flowing conditions
ElementActualBore LREAL Corrected bore/throat size
CValue LREAL Coefficient of discharge
SelectedDiffPressure LREAL Selected differential pressure
DiffTxInuse INT In-use DP transmitter
ExpFactor LREAL Expansibility factor
Pressure1Abs LREAL Upstream absolute pressure in Pa
Pressure1Guage LREAL Upstream gauge pressure
Pressure3Abs LREAL Fully recovered downstream absolute press
Pressure3Guage LREAL Fully recovered downstream gauge press
PipeActBore LREAL Corrected pipe size
Qh LREAL Energy flow
Qm LREAL Mass flow
Qs LREAL Standard volume flow
Qv LREAL Volume flow
Red LREAL Reynolds Number
RHO1 LREAL In-use Upstream density
RHO1_1 LREAL Upstream density derived from RHOTP1
RHO1_2 LREAL Upstream density derived from RHOTP2
Temperature1 LREAL Upstream temperature
VelApproachFactor LREAL Velocity of Approach factor
NumberIterations LREAL Number of Iterations for the last scan
ErrorCode INT Critital Error Code
WarningCode INT Warning Code
JT_COEFF LREAL Joule-Thomson coefficient in K/bar. If Version < 2003
Or Fluid is incompressible, value = NaN.
179
Chapter 9 - Configuring Function Blocks
Information:
Compared with ISO5167_DUAL, ISO5167_DUAL_JT function block have
another two extra pin inputs, ZP1T1 and ZP2T3, based on these two inputs,
ISO5167_DUAL_JT adopts different algorithm to calculate RHO1_1 and
RHO1_2.
In addition, ISO5167_DUAL_JT calculate T1 based on Joule-Thomson
coefficient, finally flow rate can be figured out via ISO5167_DUAL_JT
Function Block.
180
Chapter 9 - Configuring Function Blocks
181
Chapter 9 - Configuring Function Blocks
Warning codes
Code Description
1 For a compressible fluid, P2/P1 ratio is too low.
2 Element bore is too small.
3 Pipe size is out of range for an orifice plate.
4 Pipe size is out of range for a venturi.
5 Orifice beta ratio is outside fiscal limits.
6 Orifice beta ratio is outside limits.
7 Venturi beta ratio is outside limits.
8 Orifice plate is outside Reynolds No limits.
9 Orifice plate is above fiscal Reynolds No limit.
182
Chapter 9 - Configuring Function Blocks
Code Description
10 Venturi is outside Reynolds No limits.
11 For dual density inputs, input 1 is invalid.
12 For dual density inputs, input 2 is invalid.
13 For dual density inputs, the deviation between the inputs is greater than the
deadband.
183
Chapter 9 - Configuring Function Blocks
Warning codes
Code Description
1 For a compressible fluid, P2/P1 ratio is too low.
2 Element bore is too small.
3 Pipe size is out of range for an orifice plate.
4 Pipe size is out of range for a venturi.
5 Orifice beta ratio is outside fiscal limits.
6 Orifice beta ratio is outside limits.
7 Venturi beta ratio is outside limits.
8 Orifice plate is outside Reynolds No limits.
9 Orifice plate is above fiscal Reynolds No limit.
10 Venturi is outside Reynolds No limits.
11 For dual density inputs, input 1 is invalid.
12 For dual density inputs, input 2 is invalid.
13 For dual density inputs, the deviation between the inputs is greater than the
deadband.
ISO6976lib
184
Chapter 9 - Configuring Function Blocks
ISO 6976
ISO 6976:1995 is an international standard covering the calculation for
natural gas of calorific value, density, relative density and Wobbe Index
from its composition. ISO 6976 is widely used in most areas of the world
except North America.
Description
The basic function of this block is to calculate the following values using gas
composition and the ISO 6976 definitive methods:
n Molar mass
n Ideal relative density
n Real relative density at 1.01325 bara and selected metering
temperature.
n Ideal density at 1.01325 bara and selected metering temperature.
n Ideal density at 1.01325 bara and 15 deg C.
n Real density at 1.01325 bara and selected metering temperature.
n Real density at 1.01325 bara and 15 deg C.
n Compressibility at 1.01325 bara and 15 deg C.
n Compressibility at 1.01325 bara and metering temperature.
n CV on a molar basis – superior
n CV on a molar basis – inferior
n CV on a mass basis – superior
n CV on a mass basis – inferior
n Ideal CV on a volumetric basis – superior
185
Chapter 9 - Configuring Function Blocks
186
Chapter 9 - Configuring Function Blocks
ISO6976 Components
ISO 6976 defines 58 components and provides complete or partial constant
data for them. This function block input shows the name of the real
components as seen in the below table. The mol fractions of the non-
exposed components and indexes should be forced to 0.0.
Input
Data
Input Parameter Description
types
Methane LREAL Input mol fractions or mol percentage
Ethane LREAL Input mol fractions or mol percentage
Propane LREAL Input mol fractions or mol percentage
n_Butane LREAL Input mol fractions or mol percentage
i_Butane LREAL Input mol fractions or mol percentage
n_Pentane LREAL Input mol fractions or mol percentage
i_Pentane LREAL Input mol fractions or mol percentage
neo_Pentane LREAL Input mol fractions or mol percentage
n_Hexane LREAL Input mol fractions or mol percentage
Methylpentane_2 LREAL Input mol fractions or mol percentage
Methylpentane_3 LREAL Input mol fractions or mol percentage
Dimethylbutane_2_2 LREAL Input mol fractions or mol percentage
Dimethylbutane_2_3 LREAL Input mol fractions or mol percentage
n_Heptane LREAL Input mol fractions or mol percentage
n_Octane LREAL Input mol fractions or mol percentage
n_Nonane LREAL Input mol fractions or mol percentage
n_Decane LREAL Input mol fractions or mol percentage
Ethylene LREAL Input mol fractions or mol percentage
Propylene LREAL Input mol fractions or mol percentage
Butene1 LREAL Input mol fractions or mol percentage
187
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
cis_2_Butene LREAL Input mol fractions or mol percentage
trans_2_Butene LREAL Input mol fractions or mol percentage
2-Methylpropene LREAL Input mol fractions or mol percentage
Pentene_1 LREAL Input mol fractions or mol percentage
Propadiene LREAL Input mol fractions or mol percentage
Butadiene_1_2 LREAL Input mol fractions or mol percentage
Butadiene_1_3 LREAL Input mol fractions or mol percentage
Acetylene LREAL Input mol fractions or mol percentage
Cyclopentane LREAL Input mol fractions or mol percentage
Methylcyclopentane LREAL Input mol fractions or mol percentage
Ethylcyclopentane LREAL Input mol fractions or mol percentage
Cyclohexane LREAL Input mol fractions or mol percentage
Methylcyclohexane LREAL Input mol fractions or mol percentage
Ethylcyclohexane LREAL Input mol fractions or mol percentage
Benzene LREAL Input mol fractions or mol percentage
Toluene LREAL Input mol fractions or mol percentage
Ethylbenzene LREAL Input mol fractions or mol percentage
o_Xylene LREAL Input mol fractions or mol percentage
Methano LREAL Input mol fractions or mol percentage
Methanethiol LREAL Input mol fractions or mol percentage
Hydrogen LREAL Input mol fractions or mol percentage
Water LREAL Input mol fractions or mol percentage
Hydrogensulphide LREAL Input mol fractions or mol percentage
Ammonia LREAL Input mol fractions or mol percentage
Hydrogencyanide LREAL Input mol fractions or mol percentage
Carbonmonoxide LREAL Input mol fractions or mol percentage
Carbonyldisulphide LREAL Input mol fractions or mol percentage
188
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
Carbondisulphide LREAL Input mol fractions or mol percentage
Helium LREAL Input mol fractions or mol percentage
Neon LREAL Input mol fractions or mol percentage
Argon LREAL Input mol fractions or mol percentage
Nitrogen LREAL Input mol fractions or mol percentage
Oxygen LREAL Input mol fractions or mol percentage
Carbondioxide LREAL Input mol fractions or mol percentage
Sulphurdioxide LREAL Input mol fractions or mol percentage
Dinitrogenmonoxide LREAL Input mol fractions or mol percentage
Krypton LREAL Input mol fractions or mol percentage
Xenon LREAL Input mol fractions or mol percentage
MeteringTemperature INT The possible combinations are:
25 = 25/20
InferiorCV_Values INT If inferior values are required, this needs to be set to 1
DensityScalingFactor LREAL The function block only calculates density in units of
kg/Sm3. However, it is possible to use it for alternative
metric units or non- metric units by scaling the output
using the scale factor. For instance from, say, kg/Sm3 to
lbs/Scuf.
189
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
types
mol percentage terms. Mol fractions must sum to 1.0
and mol percentages must sum to 100.0.
0 = fraction , 1 = percent.
CV_ INT If mass based CV is required, this must be set to 1.
onMassBasisMode
CV_ LREAL The function block only calculates CV on a mass basis in
MassScalingFactor units of MJ/kg. However, it is possible to use it for
alternative metric units or non- metric units by scaling
the output using the scale factor. For instance from, say,
MJ/kg to BTU/lb.
Output
Data
Output Parameter Description
types
ErrorCode INT Critical error code
CV_MolarBasisSuperior LREAL Calorific value on a molar basis, superior (KJ/mol)
CV_MolarBasisInferior LREAL Calorific value on a molar basis, inferior (KJ/mol)
CV_MassBasisSuperior LREAL Calorific value on a mass basis,superior (MJ/kg)
CV_MassBasisInferior LREAL Calorific value on a mass basis,inferior (MJ/kg)
CVIdeal_ LREAL Ideal calorific value on a volumetric basis, superior
VolBasisSuperior (MJ/Sm3)
CVReal_ LREAL Real calorific value on a volumetric basis, superior
VolBasisSuperior (MJ/Sm3)
190
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description
types
CVIdeal_VolBasisInferior LREAL Ideal calorific value on a volumetric basis, inferior
(MJ/Sm3)
CVReal_VolBasisInferior LREAL Real calorific value on a volumetric basis, inferior
(MJ/Sm3)
MolarMass LREAL Molar mass
ComponentCount INT Number of components
RelativeDensityIdeal LREAL Relative density - ideal
RelativeDensityReal LREAL Relative density - real
ReferenceDensityIdeal LREAL Density at metering conditions – ideal (kg/Sm3)
ReferenceDensityReal LREAL Density at metering conditions – real (kg/Sm3)
StandardDensityIdeal LREAL Standard density - ideal (kg/Sm3)
StandardDensityReal LREAL Standard density - real (kg/Sm3)
SumOfComponentFracs LREAL Sum of component fractions
WobbeIdxIdeal LREAL Wobbe Index - ideal
WobbeIdxReal LREAL Wobbe Index - real
WarningCode INT Warning code
CompressAtRefCond LREAL Compressibility at metering conditions
CompressAtStdCond LREAL Compressibility at standard conditions
Information
ISO 6976 defines 58 components and provides complete or partial constant
data for them.
This data is used in the calculation of molar mass, CV etc. Each component
has an index number (1- 58) and this index will be used to refer to the
particular component. These same index numbers are also used to point at
elements in data arrays. The relationship of indexes and component names
is as follows:
191
Chapter 9 - Configuring Function Blocks
192
Chapter 9 - Configuring Function Blocks
193
Chapter 9 - Configuring Function Blocks
194
Chapter 9 - Configuring Function Blocks
Warning codes
Code Description
1 Inputs do not sum to 1.0 +/- 0.0001.
2 Ethane mol fraction is > 0.15.
3 Water mol fraction is > 0.00005.
4 Nitrogen mol fraction is > 0.3.
5 Carbon dioxide mol fraction is > 0.15.
6 General component mol fraction is > 0.05.
7 Methane mol fraction is < 0.5.
HWPI_Freq
Description
This function block is connected to a pulse input channel’s counter and
outputs frequency and pulse delta count (at 1 sec interval). The first order
filter is used to filter variations and help to calculate frequency.
NOTE: The POU containing this block must be configured at the 50mS
cycle task. The FREQ can be used to calculate the instantaneous flow
rate of the meter.
195
Chapter 9 - Configuring Function Blocks
Input
Input Data
Description
Parameter types
PI UDINT Counter of a pulse input channel.
FILT REAL First order filter time constant in minutes for smoothing calculated
frequency output FREQ. Recommended value is 0.05 to 0.1.
Output
Output Parameter Data types Description
DELTA LREAL Delta counts in last 1 sec
FREQ REAL Calculated pulse frequency in Hz.
PISTS STRING Pulse input channel status message.
Library
Short Description
Name
API This library provides function blocks to support API21.1 for electronic gas
21.1 Lib measurement systems. These function blocks provide flow measurement,
and API reporting and change management logs required for accurate and auditable gas
21.1 measurement.
Lib_V2
196
Chapter 9 - Configuring Function Blocks
Library
Short Description
Name
API This library provides function blocks to support API 21.2 measures the liquid flow
21.2 Lib for the configured meter type. The function block calculates meter density, Gross
and API and Net standard volume, Sediments and Water volume, mass flow rate,
21.2 averaging and Totalization based on the input parameters. It generates events,
Lib_V2 alarms, hourly and daily QTR's which can be read from SCADA using MODBUS
or DNP3 protocol.
API 21.1
The following libraries of API21.1 Function Blocks are supported:
Library Description
API21_1Lib The function block library provides support for creating flow measurement
calculations for gas based on API 21.1 standard for Orifice, Turbine,
Corolis and ultrasonic meters.
API21_1_V2 It is supported from R161.2 release.
The function block library provides support for creating flow measurement
calculations for gas based on API 21.1 standard for Orifice, Turbine,
Corolis and ultrasonic meters with upgraded recent standards AGA3
(2012), AGA8 (2017) including GERG method and AGA5 (2009). This
version also supports using override values in case of communication/out
of range errors and also supports extended Quantity Transactions and
Alarm and Events for effective audit trail.
The following API 21.1 meter run function blocks are available.
Function
Description
Block
Orifice_Dtl_ Orifice_Dtl_MeterRun calculates
MeterRun
1. Gas compressibility factor, density, relative density and molecular weight
from AGA8 detailed method.
2. Volume flow rate at standard condition, mass flow rate and volume flow
rate at base condition from AGA3.
197
Chapter 9 - Configuring Function Blocks
Function
Description
Block
Orifice_GM_ Orifice_GM_MeterRun calculates
MeterRun
1. Gas compressibility factor, density, relative density and molecular weight
from AGA8 gross method.
2. Volume flow rate at standard condition, mass flow rate and volume flow
rate at base condition from AGA3.
2. Uncorrected volume flow rate at standard condition, mass flow rate and
volume flow rate at base condition from AGA7.
2. Uncorrected volume flow rate at standard condition, mass flow rate and
volume flow rate at base condition from AGA7.
198
Chapter 9 - Configuring Function Blocks
Function
Description
Block
3. Gas energy per hour
199
Chapter 9 - Configuring Function Blocks
Description
This Orifice_Dtl_MeterRun function block calculates gas compressibility
factor, density, relative density and molecular weight from AGA8 detailed
method, volume flow rate at standard condition, mass flow rate and volume
flow rate at base condition from AGA3 and gas energy per hour from AGA5.
It also calculates hourly and daily averages and totals. It generates hourly &
daily QTRs and sends them to EFM application which logs them on the
contoller’s MRAM and flash memory. It also generates alarms when any of
the process value crosses specified alarm limit. Orifice_Dtl_MeterRun
expects the input parameters to be in US or Metric unit system. The
exception is absolute viscosity of the gas that should be in centipoise in
either unit system.
Input
Data
Input Parameter Description Apply to
types
Methane REAL It could be in mole fraction or All
percentage.
Nitrogen REAL It could be in mole fraction or All
percentage.
CO2 REAL It could be in mole fraction or All
percentage.
Ethane REAL It could be in mole fraction or All
200
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
percentage.
Propane REAL It could be in mole fraction or All
percentage.
Water REAL It could be in mole fraction or All
percentage.
H2S REAL It could be in mole fraction or All
percentage.
Hydrogen REAL It could be in mole fraction or All
percentage.
CO REAL It could be in mole fraction or All
percentage.
Oxygen REAL It could be in mole fraction or All
percentage.
IButane REAL It could be in mole fraction or All
percentage.
NButane REAL It could be in mole fraction or All
percentage.
IPentane REAL It could be in mole fraction or All
percentage.
NPentane REAL It could be in mole fraction or All
percentage.
Hexane REAL It could be in mole fraction or All
percentage.
Heptane REAL It could be in mole fraction or All
percentage.
Octane REAL It could be in mole fraction or All
percentage.
Nonane REAL It could be in mole fraction or All
percentage.
Decane REAL It could be in mole fraction or All
percentage.
Helium REAL It could be in mole fraction or All
201
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
percentage.
Argon REAL It could be in mole fraction or All
percentage.
DetailMethod INT Selection for Detail method: Orifice_Dtl_
MeterRun_
1- Detail Method V2
2- GERG Method. GERG Method is
only applicable for V2 function block.
BaseTemp REAL Base temperature should be in All
Fahrenheit for US unit system and in
Celcius for Metric unit system. The
recommended default is 60 Deg F.
BasePressure REAL Base pressure should be in Psia for US All
unit system and in Kpa for Metric unit
system. The recommended default is
14.73 Psia.
FlowingTemp REAL Flowing temperature should be in All
Fahrenheit for US unit system and in
Celcius for Metric unit system.
TempHiHi REAL This is the HiHi limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
TempHi REAL This is the Hi limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
TempLoLo REAL This is the LoLo limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
TempLo REAL This is the Lo limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
FlowTempIOSelection INT IO selection for meter temperature. The Orifice_Dtl_
value should be {1} for Live or {2) for MeterRun_
Keypad value. V2
FlowTempStsStatus USINT Analog input channel status for meter Orifice_Dtl_
202
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
temperature. The value should be {0} MeterRun_
for Good or any positive integer for bad V2
status.
FlowTempKeypadVal REAL Keypad value for meter temperature. Orifice_Dtl_
The value that should be used when the MeterRun_
meter temperature status is bad. V2
FlowingPressure REAL Flowing pressure should be in Psia for All
US unit system and in Kpa for Metric
unit system.
PressureHiHi REAL This is the HiHi limit for flowing All
pressure. It should be either in Psia or
Kpa.
PressureHi REAL This is the Hi limit for flowing pressure. All
It should be either in Psia or Kpa.
PressureLoLo REAL This is the LoLo limit for flowing All
pressure. It should be either in Psia or
Kpa.
PressureLo REAL This is the Lo limit for flowing pressure. All
It should be either in Psia or Kpa.
FlowPresIOSelection INT IO selection for meter pressure. The Orifice_Dtl_
value should be {1} for Live or {2) for MeterRun_
Keypad value. V2
FlowPresStsStatus USINT Analog input channel status for meter Orifice_Dtl_
pressure. The value should be {0} for MeterRun_
Good or any positive integer for Bad V2
status.
FlowPresKeypadVal REAL Analog input channel status for meter Orifice_Dtl_
pressure. The value should be {0} for MeterRun_
Good or any positive integer for Bad V2
status.
DifferentialPressure REAL Differential Pressure should be in All
Inches of H2O for US unit system and in
Kpa for Metric unit system.
DPHiHi REAL This is the HiHi limit for differential All
pressure. It should be either in Inches of
203
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
H2O or Kpa.
DPHi REAL This is the Hi limit for differential All
pressure. It should be either in Inches of
H2O or Kpa.
DPLoLo REAL This is the LoLo limit for differential All
pressure. It should be either in Inches of
H2O or Kpa.
DPLo REAL This is the Lo limit for differential All
pressure. It should be either in Inches of
H2O or Kpa.
LowDPCutOff REAL This is the low differential pressure cut All
off limit. It should be either in Inches of
H2O or Kpa. This limit decides no flow
condition.
MeterRunId INT This is an integer number that All
represents a configured meter run
identifier.
GasCompFormat INT This parameter is for the gas All
composition format. It should be either
mole fraction {1} or percentage {2}.
204
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
weighted linear average.
MaintMode INT Parameter to Start or Stop the Orifice_Dtl_
Maintenance Mode. The value should MeterRun_
be either {0} Maintenance End or {1} for V2
Maintenance Start. When Maintenance
mode is started, an independent
totalizer will be started and accumulate
all the flow until the maintenance mode
is stopped. During this period, non-
resettable totals, hourly/daily/batch
totals will be not incremented.
AGA8Version INT Selection for AGA 8 algorithm selection: Orifice_Dtl_
MeterRun_
1- AGA 8 (1994) V2
2 - AGA 8 (2017)
TapsType INT Flange=1 and Pipe=2 All
OrificeMaterial INT STAINLESS STEEL=1, MONEL=2, All
CARBON STEEL=3, STAINLESS_S_
304=4 and STAINLESS_S_316=5
PipeMaterial INT STAINLESS STEEL=1, MONEL=2, All
CARBON STEEL=3, STAINLESS_S_
304=4 and STAINLESS_S_316=5
FluidType INT Compressible Fluid =1 and Non- All
Compressible Fluid=2
TapsLocation INT Upstream=1 and Downstream=2 All
OrificeDiameter REAL This parameter is the for orifice plate All
diameter. It should be either in inches
for US unit system or in millimeter for
Metric unit system.
OrfDiaMsrdTemp REAL This parameter represents the All
temperature at which orifice plate
diameter is measured. It should be
either in Fahrenheit for US unit system
and in Celcius for Metric unit system.
PipeDiameter REAL This parameter is the for pipe diameter. All
205
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
It should be either in inches for US unit
system or in millimeter for Metric unit
system.
PipeDiaMsrdTemp REAL This parameter represents the All
temperature at which pipe diameter is
measured. It should be either in
Fahrenheit for US unit system and in
Celcius for Metric unit system.
AbsViscosity REAL This parameter represents the absolute All
viscosity of the gas in Centipoise. In
either unit system, it must be in
centipoise only.
(Recommended default=0.010268 cP -
pg 34 part 4)
IsenExponent REAL This parameter isentropic exponent is a All
unit less number. (Recommended
default=1.3 - pg 34 part 4)
AGA3Version INT Selection for AGA 3 algorithm selection: Orifice_Dtl_
MeterRun_
1- AGA 3 (1992) V2
2- AGA 3 (2012)
AtmosphericPressure REAL Atmospheric pressure should be in Psia All
for US unit system and in Kpa for Metric
unit system.
206
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
then user can use it, it will be averaged
and logged in the QTR.
UserDefined3 REAL This parameter is an optional one, if All
user wants to average some parameter
then user can use it, it will be averaged
and logged in the QTR.
UserDefined4 REAL This parameter is an optional one, if All
user wants to average some parameter
then user can use it, it will be averaged
and logged in the QTR.
Output
Data
Output Parameter Description Apply to
types
Out_Code INT This out parameter returns success All
or fail code.
GasCompAtBaseCond LREAL This parameter is gas All
compressibility factor at base
condition. It is calculated in AGA8
Detailed method. It is unit less.
GasDensityAtBaseCond LREAL This parameter is gas density at All
base condition. It is calculated
through AGA8 Detailed method. It is
in lbm/ft^3 for US unit system and in
kg/m^3 for Metric unit system.
GasRelDenAtBaseCond LREAL This parameter is gas relative All
density at base condition. It is
calculated through AGA8 Detailed
method. It is unit less.
GasMolecularWeight LREAL This parameter is gas molecular All
weight at base condition. It is
calculated through AGA8 Detailed
method. It is in lbm for US unit
system and in kg for Metric unit
system.
207
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
Aga3QV LREAL This parameter is volume flow rate All
at flowing condition. It is calculated
through AGA3 method. It is in ft^3/hr
for US unit system and in m^3/hr for
Metric unit system.
Aga3QM LREAL This parameter is gas mass flow All
rate. It is calculated through AGA3
method. It is in lbm/hr for US unit
system and in kg/hr for Metric unit
system.
Aga3QB LREAL This parameter is volume flow rate All
at base condition. It is calculated
through AGA3 method. It is in ft^3/hr
for US unit system and in m^3/hr for
Metric unit system.
Energy LREAL This parameter is gas energy per All
hour. It is calculated through AGA5
method. It is in Btu/hr for US unit
system and in MJ/hr for Metric unit
system.
PrevHrAvgTemp LREAL This parameter is previous hour All
average for temperature.
PreDayAvgTemp LREAL This parameter is previous day All
average for temperature.
PrevHrAvgPressure LREAL This parameter is previous hour All
average for pressure.
PreDayAvgPressure LREAL This parameter is previous day All
average for pressure.
PrevHrAvgDP LREAL This parameter is previous hour All
average for differential pressure.
PreDayAvgDP LREAL This parameter is previous day All
average for differential pressure.
PrevHrAvgDenAtBase LREAL This parameter is previous hour All
average for density at base
condition.
208
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
PreDayAvgDenAtBase LREAL This parameter is previous day All
average for density at base
condition.
PrevHrAvgRelDenAtBase LREAL This parameter is previous hour All
average for relative density at base
condition.
PreDayAvgRelDenAtBase LREAL This parameter is previous day All
average for relative density at base
condition.
PrevHrAvgFlowExt LREAL This parameter is previous hour All
average for flow extension.
PreDayAvgFlowExt LREAL This parameter is previous day All
average for flow extension.
PrevHrAvgUserDefined1 LREAL This parameter is previous hour All
average for user defined
parameter1.
PreDayAvgUserDefined1 LREAL This parameter is previous day All
average for user defined
parameter1.
PrevHrAvgUserDefined2 LREAL This parameter is previous hour All
average for user defined
parameter2.
PreDayAvgUserDefined2 LREAL This parameter is previous day All
average for user defined
parameter2.
PrevHrAvgUserDefined3 LREAL This parameter is previous hour All
average for user defined
parameter3.
PreDayAvgUserDefined3 LREAL This parameter is previous day All
average for user defined
parameter3.
PrevHrAvgUserDefined4 LREAL This parameter is previous hour All
average for user defined
parameter4.
209
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
PreDayAvgUserDefined4 LREAL This parameter is previous day All
average for user defined
parameter4.
QbTH LREAL This parameter is volume flow rate All
at base condition total for this hour.
QbLH LREAL This parameter is volume flow rate All
at base condition total for last hour.
QbTD LREAL This parameter is volume flow rate All
at base condition total for this day.
QbLD LREAL This parameter is volume flow rate All
at base condition total for last day.
MTH LREAL This parameter is mass flow rate All
total for this hour.
MLH LREAL This parameter is mass flow rate All
total for last hour.
MTD LREAL This parameter is mass flow rate All
total for this day.
MLD LREAL This parameter is mass flow rate All
total for last day.
ETH LREAL This parameter is energy total for All
this hour.
ELH LREAL This parameter is energy total for All
last hour.
ETD LREAL This parameter is energy total for All
this day.
ELD LREAL This parameter is energy total for All
last day.
QbNR LREAL Non-Resettable or Cumulative total Orifice_Dtl_
for volume at Base. Unit - ft3/hr for MeterRun_
US, m3/hr for Metric. V2
MNR LREAL Non-Resettable or Cumulative total Orifice_Dtl_
for Mass. Unit - lbm/hr for US, kg/hr MeterRun_
for Metric. V2
210
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
ENR LREAL Non-Resettable or Cumulative total Orifice_Dtl_
for Energy. Unit -Btu/hr for US, MeterRun_
MJ/hr for Metric. V2
QbRollover INT Rollover flag for volume at base Orifice_Dtl_
condition non-resettable total. The MeterRun_
value {1} indicates Rollover V2
otherwise {0}. The value for roll-over
is 999,999,999. The rollover flag will
be on 5 times interval time.
MRollover INT Rollover flag for Non-Resettable Orifice_Dtl_
Mass total. The value {1} indicates MeterRun_
Rollover otherwise {0}. The value for V2
roll-over is 999,999,999. The
rollover flag will be on 5 times
interval time.
ERollover INT Rollover flag for Non-Resettable Orifice_Dtl_
Energy total. The value {1} indicates MeterRun_
Rollover otherwise {0}. The value for V2
roll-over is 999,999,999. The
rollover flag will be on 5 times
interval time.
QbMaint LREAL Volume at Base in Maintenance Orifice_Dtl_
mode. MeterRun_
V2
MMaint LREAL Mass in Maintenance mode. Orifice_Dtl_
MeterRun_
V2
EMaint LREAL Energy at Base in Maintenance Orifice_Dtl_
mode. MeterRun_
V2
GERG2008CV LREAL Heat Capacity at Constant Volume Orifice_Dtl_
(J/mol K). MeterRun_
V2
GERG2008CP LREAL Heat Capacity at Constant Pressure Orifice_Dtl_
(J/mol K). MeterRun_
V2
211
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
GERG2008W LREAL Speed of sound in gas being Orifice_Dtl_
measured. Unit - ft/sec for US, MeterRun_
meter/sec for Metric. V2
Following are the error codes for the above meter run function block.
Out
Description Apply to
Code
0 SUCCESS All
1¹ ERROR: PRESSURE HAS A NEGATIVE DERIVATIVE DEFAULT All
GAS DENSITY USED
ERROR: A COMPONENT MOLE FRACTION < 0.0 OR > 1.0 Orifice_Dtl_
MeterRun_
V2
2¹ WARNING: DENSITY IN BRAKET EXCEEDS MAXIMUM DEFAULT All
PROCEEDURE USED
WARNING: SUM OF MOLE FRACTIONS < 0.9999 OR > 1.0001 Orifice_Dtl_
MeterRun_
V2
3¹ ERROR: MAXIMUM ITERATIONS EXCEEDED IN BRAKET All
DEFAULT DENSITY USED
WARNING: PRESSURE BASE (PB) <= 0.0 OR >= 16 PSIA Orifice_Dtl_
MeterRun_
V2
4¹ ERROR: MAXIMUM ITERATIONS IN DDETAIL EXCEEDED LAST All
DENSITY USED
212
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
WARNING: TEMPERATURE BASE (TB) <= 32.0 OR >= 77.0 DEG F Orifice_Dtl_
MeterRun_
V2
32 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 40,000. PSIA All
33 ERROR: FLOWING TEMPERATURE (TF) < -200 OR > 760 DEG F All
36 ERROR: MOLE FRACTION FOR METHANE < 0.0 OR > 1.0 Orifice_Dtl_
FOR NITROGEN < 0.0 OR > 1.0 MeterRun
FOR CARBON DIOXIDE < 0.0 OR > 1.0
FOR ETHANE < 0.0 OR > 1.0
FOR PROPANE < 0.0 OR > 0.12
FOR WATER < 0.0 OR > 0.10
FOR H2S < 0.0 OR > 1.0
FOR HYDROGEN < 0.0 OR > 1.0
FOR CARBON MONOXIDE < 0.0 OR > 0.03
FOR OXYGEN < 0.0 OR > 0.21
FOR BUTANES < 0.0 OR > 0.06
FOR PENTANES < 0.0 OR > 0.04
FOR HEXANES + < 0.0 OR > 0.10
FOR HELIUM < 0.0 OR > 0.03
FOR ARGON < 0.0 OR > 1.0
37 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 DEG F All
38 ERROR: REFERENCE PRESSURE < 12.9 OR > 16.01 PSIA All
39 ERROR: SUM OF MOLE FRACTIONS < 0.98 OR > 1.020 All
42 WARNING: FLOWING PRESSURE (PF) < 0.0 OR > 1750. PSIA All
43 WARNING: FLOWING TEMPERATURE (TF) < 17 OR > 143 DEG F All
45 WARNING: ANY COMPONENT MOLE FRACTION OUTSIDE OF Orifice_Dtl_
AGA REPORT NO. 8 RECOMMENDED RANGE MeterRun_
V2
46 WARNING: MOLE FRACTION FOR METHANE < 0.45 OR > 1.0 Orifice_Dtl_
FOR NITROGEN < 0.0 OR > 0.5 MeterRun
FOR CARBON DIOXIDE < 0.0 OR > 0.3
FOR ETHANE < 0.0 OR > 0.1
FOR PROPANE < 0.0 OR > 0.04
FOR WATER < 0.0 OR >= 0.0005
FOR H2S < 0.0 OR > 0.0002
213
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
FOR HYDROGEN < 0.0 OR > 0.1
FOR CARBON MONOXIDE < 0.0 OR > 0.03
FOR OXYGEN < 0.0 OR > 0.0
FOR BUTANES < 0.0 OR > 0.01
FOR PENTANES < 0.0 OR >= 0.003
FOR HEXANES + < 0.0 OR >= 0.002
FOR HELIUM < 0.0 OR >= 0.002
FOR ARGON < 0.0 OR > 0.0
49 WARNING: SUM OF MOLE FRACTIONS < 0.9999 OR > 1.0001 All
51 ERROR: NTAPS WAS NOT 0, 1 OR 2 All
52 ERROR: FLOWING PRESSURE WAS <= 0.0 OR > 40000. PSIA All
53 ERROR: FLOWING TEMPERATURE < -200. OR > 760. DEG F All
54 ERROR: MATORF OR MATPIPE WAS NOT 0, 1, 2 OR 3 All
55 ERROR: ORIFICE DIAMETER WAS <= 0 OR => 100.0 INCHES All
56 ERROR: PIPE DIAMETER WAS <= 0 OR => 100.0 INCHES All
57 ERROR: FLOWING OR STANDARD DENSITY WAS <= 0.0 All
LBM/FT^3
58 ERROR: DIFFERENTIAL PRESSURE WAS <= 0.0 INCHES H2O All
59 ERROR: GAS VISCOSITY WAS <= 0.005 OR > 0.5 CENTIPOISES All
60 ERROR: ISENTROPIC EXPONENT <= 1.0 OR => 2.0 All
61 ERROR: IFLUID WAS NOT 0, 1 OR 2 All
62 ERROR: STANDARD TEMPERATURE WAS NOT = 60.0 DEG F All
63 ERROR: STANDARD PRESSURE WAS NOT = 14.73 PSIA All
64 ERROR: TAP LOCATION WAS NOT 0, 1 OR 2 FOR NTAPS=2 All
(PIPE) OR TAP LOCATION WAS NOT 1 FOR NTAPS=1 (FLANGE)
65 ERROR: SUPERCOMPRESSIBILITY FACTOR WAS <= 0.0 All
66 ERROR: RELATIVE DENSITY AT STANDARD CONDITIONS WAS All
< 0.07 OR > 1.52
67 ERROR: CALIBRATION FACTOR WAS <= 0.0 All
68 ERROR: COMPRESSIBILITY FACTOR AT STANDARD All
CONDITIONS <= 0.0
214
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
69 ERROR: BETA RATIO (DO/DM) <= 0.0 OR => 1.0 All
70 ERROR: IF NTAPS = 1, GOF2015_OPTION NOT = 1 OR = 0 Orifice_Dtl_
MeterRun_
V2
71 ERROR: IF NTAPS = 2, GOF2015_OPTION NOT = 0 Orifice_Dtl_
MeterRun_
V2
72 ERROR: DIFFERENTIAL PRESSURE WAS GREATER THAN Orifice_Dtl_
UPSTREAM STATIC PRESSURE MeterRun_
V2
75 WARNING: ORIFICE DIAMETER WAS <= 0.45 INCHES All
76 WARNING: PIPE DIAMETER WAS <= 2.0 INCHES All
79 WARNING: BETA RATIO (DO/DM) WAS <= 0.1 OR >= 0.75 All
80 WARNING: IF GOF2015_OPTION = 1, (HW)/(27.7072*(PF)) = OR > Orifice_Dtl_
0.25; MeterRun_
V2
IF GOF2015_OPTION = 0, (HW)/(27.707*(PF)) > 0.2
86 WARNING: Flowing Pressure greater than 2017 AGA8 GERG-2008 Orifice_Dtl_
Full Quality Range (10,150 PSIA) MeterRun_
V2
87 WARNING: Flowing Pressure greater than 2017 AGA8 GERG-2008 Orifice_Dtl_
Range (5075 PSIA) MeterRun_
V2
88 WARNING: Flowing Temperature outside 2017 AGA8 GERG-2008 Orifice_Dtl_
Full Quality Range (-352 F < TF < 800 F) MeterRun_
V2
89 WARNING: Flowing Temperature outside 2017 AGA8 GERG-2008 Orifice_Dtl_
Range (-298 F < TF < 350 F) MeterRun_
V2
90 WARNING: A Component Mole % outside 2017 AGA8 GERG-2008 Orifice_Dtl_
Intermediate Quality Range MeterRun_
V2
91 WARNING: A Component Mole % outside 2017 AGA8 GERG-2008 Orifice_Dtl_
Pipeline Quality Range MeterRun_
215
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
V2
NOTE 1: Error codes 1~4 are common between AGA 8 and AGA 5. You must take caution
and analyze when these specific out codes appear to determine the source.
216
Chapter 9 - Configuring Function Blocks
Description
This Orifice_GM_MeterRun function block calculates gas compressibility
factor, density, relative density and molecular weight from AGA8 gross
method, volume flow rate at standard condition, mass flow rate and volume
flow rate at base condition from AGA3 and gas energy per hour from AGA5.
It also calculates hourly and daily averages and totals. It generates hourly &
daily QTRs and sends them to EFM application which logs them on the
217
Chapter 9 - Configuring Function Blocks
contoller’s MRAM and flash memory. It also generates alarms when any of
the process value crosses specified alarm limit. Orifice_GM_MeterRun
expects the input parameters to be in US or Metric unit system. The
exception is absolute viscosity of the gas that should be in centipoise in
either unit system.
Input
Data
Input Parameter Description Apply to
types
GrossMethod INT This parameter represents All
gross method number. It
should be either {1} for gross
method 1 and {2} for gross
method 2.
GasRelDensity REAL This parameter is gas relative All
density at reference condition.
It is unit less.
CO2 REAL It could be in mole fraction or All
percentage.
Hydrogen REAL It could be in mole fraction or All
percentage.
CO REAL It could be in mole fraction or All
percentage.
Nitrogen REAL It could be in mole fraction or All
percentage. This parameter is
only required for gross method
2, for gross method 1, it can be
zero.
GasHeatingValue REAL This parameter is gas heating All
value. It is only required for
gross method 1, for gross
method 2, it can be zero. It is in
Btu/ft^3 for US unit system and
in MJ/m^3 for Metric unit
system.
RefTempForCalorimeterDensity REAL This parameter is reference All
temperature for calorimeter
density. It should be in
Fahrenheit for US unit system
218
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
and in Celcius for Metric unit
system. The recommended
default is 60 Deg F.
RefPressForCalorimeterDensity REAL This parameter is reference All
pressure for calorimeter
density. It should be in Psia for
US unit system and in Kpa for
Metric unit system. The
recommended default is 14.73
Psia.
RefTempForCombustion REAL This parameter is reference All
temperature for combustion. It
should be in Fahrenheit for US
unit system and in Celcius for
Metric unit system. The
recommended default is 60
Deg F.
BaseTemp REAL Base temperature should be in All
Fahrenheit for US unit system
and in Celcius for Metric unit
system. The recommended
default is 60 Deg F.
BasePressure REAL Base pressure should be in All
Psia for US unit system and in
Kpa for Metric unit system. The
recommended default is 14.73
Psia.
FlowingTemp REAL Flowing temperature should be All
in Fahrenheit for US unit
system and in Celcius for
Metric unit system.
TempHiHi REAL This is the HiHi limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
TempHi REAL This is the Hi limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
219
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
TempLoLo REAL This is the LoLo limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
TempLo REAL This is the Lo limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
FlowTempIOSelection INT IO selection for meter Orifice_GM_
temperature. The value should MeterRun_
be {1} for Live or {2) for Keypad V2
value.
FlowTempStsStatus USINT Analog input channel status for Orifice_GM_
meter temperature. The value MeterRun_
should be {0} for Good or any V2
positive integer for bad status.
FlowTempKeypadVal REAL Keypad value for meter Orifice_GM_
temperature. The value that MeterRun_
should be used when the meter V2
temperature status is bad.
FlowingPressure REAL Flowing pressure should be in All
Psia for US unit system and in
Kpa for Metric unit system.
PressureHiHi REAL This is the HiHi limit for flowing All
pressure. It should be either in
Psia or Kpa.
PressureHi REAL This is the Hi limit for flowing All
pressure. It should be either in
Psia or Kpa.
PressureLoLo REAL This is the LoLo limit for flowing All
pressure. It should be either in
Psia or Kpa.
PressureLo REAL This is the Lo limit for flowing All
pressure. It should be either in
Psia or Kpa.
FlowPresIOSelection INT IO selection for meter pressure. Orifice_GM_
The value should be {1} for Live MeterRun_
or {2) for Keypad value. V2
220
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
FlowPresStsStatus USINT Analog input channel status for Orifice_GM_
meter pressure. The value MeterRun_
should be {0} for Good or any V2
positive integer for Bad status.
FlowPresKeypadVal REAL Analog input channel status for Orifice_GM_
meter pressure. The value MeterRun_
should be {0} for Good or any V2
positive integer for Bad status.
DifferentialPressure REAL Differential Pressure should be All
in Inches of H2O for US unit
system and in Kpa for Metric
unit system.
DPHiHi REAL This is the HiHi limit for All
differential pressure. It should
be either in Inches of H2O or
Kpa.
DPHi REAL This is the Hi limit for All
differential pressure. It should
be either in Inches of H2O or
Kpa.
DPLoLo REAL This is the LoLo limit for All
differential pressure. It should
be either in Inches of H2O or
Kpa.
DPLo REAL This is the Lo limit for All
differential pressure. It should
be either in Inches of H2O or
Kpa.
LowDPCutOff REAL This is the low differential All
pressure cut off limit. It should
be either in Inches of H2O or
Kpa. This limit decides no flow
condition.
MeterRunId INT This is an integer number that All
represents a configured meter
run identifier.
221
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
GasCompFormat INT This parameter is for the gas All
composition format. It should
be either mole fraction {1} or
percentage {2}.
NOTE: It is
recommended to use 2
percentage as a default
option.
222
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
AGA8Version INT Selection for AGA 8 algorithm Orifice_GM_
selection: MeterRun_
V2
1- AGA 8 (1994)
2 - AGA 8 (2017)
TapsType INT Flange=1 and Pipe=2 All
OrificeMaterial INT STAINLESS STEEL=1, All
MONEL=2, CARBON
STEEL=3, STAINLESS_S_
304=4 and STAINLESS_S_
316=5
PipeMaterial INT STAINLESS STEEL=1, All
MONEL=2, CARBON
STEEL=3, STAINLESS_S_
304=4 and STAINLESS_S_
316=5
FluidType INT Compressible Fluid =1 All
and Non-Compressible
Fluid=2
TapsLocation INT Upstream=1 and All
Downstream=2
OrificeDiameter REAL This parameter is the for orifice All
plate diameter. It should be
either in inches for US unit
system or in millimeter for
Metric unit system.
OrfDiaMsrdTemp REAL This parameter represents the All
temperature at which orifice
plate diameter is measured. It
should be either in Fahrenheit
for US unit system and in
Celcius for Metric unit system.
PipeDiameter REAL This parameter is the for pipe All
diameter. It should be either in
inches for US unit system or in
millimeter for Metric unit
223
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
system.
PipeDiaMsrdTemp REAL This parameter represents the All
temperature at which pipe
diameter is measured. It should
be either in Fahrenheit for US
unit system and in Celcius for
Metric unit system.
AbsViscosity REAL This parameter represents the All
absolute viscosity of the gas in
Centipoise. In either unit
system, it must be in centipoise
only.
(Recommended
default=0.010268 cP - pg 34
part 4)
IsenExponent REAL This parameter isentropic All
exponent is a unit less number.
(Recommended default=1.3 -
pg 34 part 4)
AGA3Version INT Selection for AGA 3 algorithm Orifice_GM_
selection: MeterRun_
V2
1- AGA 3 (1992)
2- AGA 3 (2012)
AtmosphericPressure REAL Atmospheric pressure should All
be in Psia for US unit system
and in Kpa for Metric unit
system.
224
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
UserDefined2 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
UserDefined3 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
UserDefined4 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
Output
Data
Output Parameter Description Apply to
types
Out_Code INT This out parameter returns success All
or fail code.
GasCompAtBaseCond LREAL This parameter is gas All
compressibility factor at base
condition. It is calculated in AGA8
Detailed method. It is unit less.
GasDensityAtBaseCond LREAL This parameter is gas density at All
base condition. It is calculated
through AGA8 Detailed method. It
is in lbm/ft^3 for US unit system and
in kg/m^3 for Metric unit system.
GasRelDenAtBaseCond LREAL This parameter is gas relative All
225
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
density at base condition. It is
calculated through AGA8 Detailed
method. It is unit less.
GasMolecularWeight LREAL This parameter is gas molecular All
weight at base condition. It is
calculated through AGA8 Detailed
method. It is in lbm for US unit
system and in kg for Metric unit
system.
Aga3QV LREAL This parameter is volume flow rate All
at flowing condition. It is calculated
through AGA3 method. It is in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
Aga3QM LREAL This parameter is gas mass flow All
rate. It is calculated through AGA3
method. It is in lbm/hr for US unit
system and in kg/hr for Metric unit
system.
Aga3QB LREAL This parameter is volume flow rate All
at base condition. It is calculated
through AGA3 method. It is in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
Energy LREAL This parameter is gas energy per All
hour. It is calculated through AGA5
method. It is in Btu/hr for US unit
system and in MJ/hr for Metric unit
system.
PrevHrAvgTemp LREAL This parameter is previous hour All
average for temperature.
PreDayAvgTemp LREAL This parameter is previous day All
average for temperature.
PrevHrAvgPressure LREAL This parameter is previous hour All
average for pressure.
PreDayAvgPressure LREAL This parameter is previous day All
average for pressure.
226
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
PrevHrAvgDP LREAL This parameter is previous hour All
average for differential pressure.
PreDayAvgDP LREAL This parameter is previous day All
average for differential pressure.
PrevHrAvgDenAtBase LREAL This parameter is previous hour All
average for density at base
condition.
PreDayAvgDenAtBase LREAL This parameter is previous day All
average for density at base
condition.
PrevHrAvgRelDenAtBase LREAL This parameter is previous hour All
average for relative density at base
condition.
PreDayAvgRelDenAtBase LREAL This parameter is previous day All
average for relative density at base
condition.
PrevHrAvgFlowExt LREAL This parameter is previous hour All
average for flow extension.
PreDayAvgFlowExt LREAL This parameter is previous day All
average for flow extension.
PrevHrAvgUserDefined1 LREAL This parameter is previous hour All
average for user defined
parameter1.
PreDayAvgUserDefined1 LREAL This parameter is previous day All
average for user defined
parameter1.
PrevHrAvgUserDefined2 LREAL This parameter is previous hour All
average for user defined
parameter2.
PreDayAvgUserDefined2 LREAL This parameter is previous day All
average for user defined
parameter2.
PrevHrAvgUserDefined3 LREAL This parameter is previous hour All
average for user defined
227
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
parameter3.
PreDayAvgUserDefined3 LREAL This parameter is previous day All
average for user defined
parameter3.
PrevHrAvgUserDefined4 LREAL This parameter is previous hour All
average for user defined
parameter4.
PreDayAvgUserDefined4 LREAL This parameter is previous day All
average for user defined
parameter4.
QbTH LREAL This parameter is volume flow rate All
at base condition total for this hour.
QbLH LREAL This parameter is volume flow rate All
at base condition total for last hour.
QbTD LREAL This parameter is volume flow rate All
at base condition total for this day.
QbLD LREAL This parameter is volume flow rate All
at base condition total for last day.
MTH LREAL This parameter is mass flow rate All
total for this hour.
MLH LREAL This parameter is mass flow rate All
total for last hour.
MTD LREAL This parameter is mass flow rate All
total for this day.
MLD LREAL This parameter is mass flow rate All
total for last day.
ETH LREAL This parameter is energy total for All
this hour.
ELH LREAL This parameter is energy total for All
last hour.
ETD LREAL This parameter is energy total for All
this day.
ELD LREAL This parameter is energy total for All
228
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
last day.
QbNR LREAL Non-Resettable or Cumulative total Orifice_GM_
for volume at Base. Unit - ft3/hr for MeterRun_
US, m3/hr for Metric. V2
MNR LREAL Non-Resettable or Cumulative total Orifice_GM_
for Mass. Unit - lbm/hr for US, kg/hr MeterRun_
for Metric. V2
ENR LREAL Non-Resettable or Cumulative total Orifice_GM_
for Energy. Unit -Btu/hr for US, MeterRun_
MJ/hr for Metric. V2
QbRollover INT Rollover flag for volume at base Orifice_GM_
condition non-resettable total. The MeterRun_
value {1} indicates Rollover V2
otherwise {0}. The value for roll-
over is 999,999,999. The rollover
flag will be on 5 times interval time.
MRollover INT Rollover flag for Non-Resettable Orifice_GM_
Mass total. The value {1} indicates MeterRun_
Rollover otherwise {0}. The value V2
for roll-over is 999,999,999. The
rollover flag will be on 5 times
interval time.
ERollover INT Rollover flag for Non-Resettable Orifice_GM_
Energy total. The value {1} MeterRun_
indicates Rollover otherwise {0}. V2
The value for roll-over is
999,999,999. The rollover flag will
be on 5 times interval time.
QbMaint LREAL Volume at Base in Maintenance Orifice_GM_
mode. MeterRun_
V2
MMaint LREAL Mass in Maintenance mode. Orifice_GM_
MeterRun_
V2
EMaint LREAL Energy at Base in Maintenance Orifice_GM_
mode. MeterRun_
229
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
V2
Following are the error codes for the above meter run function block.
Out
Description Apply to
Code
0 SUCCESS All
5 ERROR: THE ROOT WAS NOT BOUNDED IN DGROSS All
6 ERROR: NO CONVERGENCE IN DGROSS All
7 ERROR: VIRGS SQURE ROOT NEGATIVE All
8 ERROR: COMBINED VALUES OF GRGR, X[2] AND HV NOT All
CONSISTENT
9 ERROR: INVALID TERM IN VIRGS All
11 ERROR: METHOD WAS NOT 1 OR 2 All
12 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 1740.0 PSIA All
13 ERROR: FLOWING TEMPERATURE (TF) < 14.0 OR > 149.0 DEG F All
14 ERROR: HEATING VALUE (HV) < 477.0 OR > 1211.0 BTU/FT^3 All
15 ERROR: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > 0.870 All
16 ERROR: MOLE FRACTION FOR N2 < 0.0 OR > 0.50 All
OR FOR CO2 < 0.0 OR > 0.30
OR FOR H2 < 0.0 OR > 0.10
OR FOR CO < 0.0 OR > 0.03
17 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 DEG F All
230
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
18 ERROR: REFERENCE PRESSURE < 13.0 OR > 16.0 PSIA All
22 WARNING: FLOWING PRESSURE (PF) <= 0.0 OR > 1200.0 PSIA Orifice_GM_
MeterRun
23 WARNING: FLOWING TEMPERATURE (TF) < 32.0 OR > 130.0 Orifice_GM_
DEG F MeterRun
24 WARNING: HEATING VALUE (HV) < 805.0 OR > 1208.0 BTU/FT^3 Orifice_GM_
MeterRun
25 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > 0.800 Orifice_GM_
MeterRun
26 WARNING: MOLE FRACTION FOR N2 < 0.0 OR > 0.20 Orifice_GM_
OR FOR CO2 < 0.0 OR > 0.20 MeterRun
OR FOR H2 < 0.0 OR > 0.0
OR FOR CO < 0.0 OR >0.0
51 ERROR: NTAPS WAS NOT 0, 1 OR 2 All
54 ERROR: MATORF OR MATPIPE WAS NOT 0, 1, 2 OR 3 All
55 ERROR: ORIFICE DIAMETER WAS <= 0 OR => 100.0 INCHES All
56 ERROR: PIPE DIAMETER WAS <= 0 OR => 100.0 INCHES All
57 ERROR: FLOWING OR STANDARD DENSITY WAS <= 0.0 All
LBM/FT^3
58 ERROR: DIFFERENTIAL PRESSURE WAS <= 0.0 INCHES H2O All
59 ERROR: GAS VISCOSITY WAS <= 0.005 OR > 0.5 CENTIPOISES All
60 ERROR: ISENTROPIC EXPONENT <= 1.0 OR => 2.0 All
61 ERROR: IFLUID WAS NOT 0, 1 OR 2 All
62 ERROR: STANDARD TEMPERATURE WAS NOT = 60.0 DEG F All
63 ERROR: STANDARD PRESSURE WAS NOT = 14.73 PSIA All
64 ERROR: TAP LOCATION WAS NOT 0, 1 OR 2 FOR NTAPS=2 All
(PIPE) OR TAP LOCATION WAS NOT 1 FOR NTAPS=1 (FLANGE)
65 ERROR: SUPERCOMPRESSIBILITY FACTOR WAS <= 0.0 All
66 ERROR: RELATIVE DENSITY AT STANDARD CONDITIONS WAS All
< 0.07 OR > 1.52
231
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
67 ERROR: CALIBRATION FACTOR WAS <= 0.0 All
68 ERROR: COMPRESSIBILITY FACTOR AT STANDARD All
CONDITIONS <= 0.0
69 ERROR: BETA RATIO (DO/DM) <= 0.0 OR => 1.0 All
70 ERROR: IF NTAPS = 1, GOF2015_OPTION NOT = 1 OR = 0 Orifice_GM_
MeterRun_
V2
71 ERROR: IF NTAPS = 2, GOF2015_OPTION NOT = 0 Orifice_GM_
MeterRun_
V2
72 ERROR: DIFFERENTIAL PRESSURE WAS GREATER THAN Orifice_GM_
UPSTREAM STATIC PRESSURE MeterRun_
V2
75 WARNING: ORIFICE DIAMETER WAS <= 0.45 INCHES All
76 WARNING: PIPE DIAMETER WAS <= 2.0 INCHES All
79 WARNING: BETA RATIO (DO/DM) WAS <= 0.1 OR >= 0.75 All
80 WARNING: IF GOF2015_OPTION = 1, (HW)/(27.7072*(PF)) = OR > Orifice_GM_
0.25; MeterRun_
V2
IF GOF2015_OPTION = 0, (HW)/(27.707*(PF)) > 0.2
81 WARNING: FLOWING PRESSURE (PF) > 1500.0 PSIA AGA8 2017 Orifice_GM_
RANGE 1 MeterRun_
V2
82 WARNING: FLOWING TEMPERATURE (TF) < 17.01 OR > 143.0 Orifice_GM_
DEG F AGA8 2017 RANGE 2 OR (TF) < 25.0 OR > 143.0 DEG F MeterRun_
AGA8 2017 RANGE 1 V2
83 WARNING: HEATING VALUE (HV) < 665.0 OR > 1100.0 BTU/FT^3 Orifice_GM_
AGA8 2017 RANGE 2 OR (HV) < 930.0 OR > 1040.0 BTU/FT^3 MeterRun_
AGA8 2017 RANGE 1 V2
84 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.554 OR > 0.801 Orifice_GM_
AGA8 2017 RANGE 2 OR (GRGR) < 0.554 OR > 0.630 AGA8 MeterRun_
RANGE 1 V2
85 WARNING: MOLE FRACTION FOR N2 > 0.20 AGA8 2017 RANGE Orifice_GM_
2 OR N2 > 0.07 AGA8 2017 RANGE 1 MeterRun_
232
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
OR FOR CO2 > 0.25 AGA8 2017 RANGE 2 OR CO2 > 0.03 AGA8 V2
2017 RANGE 1
233
Chapter 9 - Configuring Function Blocks
Description
This Turbine_Dtl_MeterRun function block calculates gas compressibility
factor, density, relative density and molecular weight from AGA8 detailed
method, uncorrected flow, mass flow rate and volume flow rate at base
condition from AGA7 and gas energy per hour from AGA5. It also calculates
hourly and daily averages and totals. It generates hourly & daily QTRs and
sends them to EFM application which logs them on he contoller’s MRAM
and flash memory. It also generates alarms when any of the process value
crosses specified alarm limit.
Turbine_Dtl_MeterRun expects the input parameters to be in US or Metric
unit system.
This description is also applicable to function block Ultrasonic_Dtl_
MeterRun. Both Turbine and Ultrasonic meters are technically same.
Input
Data
Input Parameter Description Apply to
types
Methane REAL It could be in mole fraction or percentage. All
234
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
CO2 REAL It could be in mole fraction or percentage. All
235
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Decane REAL It could be in mole fraction or percentage. All
236
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
value should be {1} for Live or {2) for Dtl_
Keypad value. MeterRun_
V2
FlowTempStsStatus USINT Analog input channel status for meter Turbine_
temperature. The value should be {0} for Dtl_
Good or any positive integer for bad MeterRun_
status. V2
FlowTempKeypadVal REAL Keypad value for meter temperature. The Turbine_
value that should be used when the meter Dtl_
temperature status is bad. MeterRun_
V2
FlowingPressure REAL Flowing pressure should be in Psia for All
US unit system and in Kpa for Metric unit
system.
PressureHiHi REAL This is the HiHi limit for flowing pressure. All
It should be either in Psia or Kpa.
PressureHi REAL This is the Hi limit for flowing pressure. It All
should be either in Psia or Kpa.
PressureLoLo REAL This is the LoLo limit for flowing pressure. All
It should be either in Psia or Kpa.
PressureLo REAL This is the Lo limit for flowing pressure. It All
should be either in Psia or Kpa.
PulseOrAnalogCount REAL For pulse input, it would be a number Turbine_
while for analog input, it should be in Dtl_
ft^3/hr for US unit system and in m^3/hr MeterRun
for Metric unit system.
PulseOrAnalogHiHi REAL This is the HiHi limit for pulse or analog Turbine_
input. For pulse input, it would be a Dtl_
number while for analog input, it should MeterRun
be in ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
PulseOrAnalogHi REAL This is the Hi limit for pulse or analog Turbine_
input. For pulse input, it would be a Dtl_
number while for analog input, it should MeterRun
be in ft^3/hr for US unit system and in
237
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
m^3/hr for Metric unit system.
PulseOrAnalogLoLo REAL This is the LoLo limit for pulse or analog Turbine_
input. For pulse input, it would be a Dtl_
number while for analog input, it should MeterRun
be in ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
PulseOrAnalogLo REAL This is the Lo limit for pulse or analog Turbine_
input. For pulse input, it would be a Dtl_
number while for analog input, it should MeterRun
be in ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
LowPulseCutOff REAL This is the low pulse cut off limit. For Turbine_
pulse input, it is a number. For analog Dtl_
input, it should be in ft^3/hr for US unit MeterRun
system and in m^3/hr for Metric unit
system.
FlowPresIOSelection INT IO selection for meter pressure. The Turbine_
value should be {1} for Live or {2) for Dtl_
Keypad value. MeterRun_
V2
FlowPresStsStatus USINT Analog input channel status for meter Turbine_
pressure. The value should be {0} for Dtl_
Good or any positive integer for Bad MeterRun_
status. V2
FlowPresKeypadVal REAL Analog input channel status for meter Turbine_
pressure. The value should be {0} for Dtl_
Good or any positive integer for Bad MeterRun_
status. V2
Analog REAL Value of analog input if flow type = Turbine_
analog. The value should be in ft3/hr for Dtl_
US unit or m^3/hr for Metric unit. MeterRun_
V2
AnalogHiHi REAL This is the HiHi limit for analog input. The Turbine_
value should be in ft3/hr for US unit or Dtl_
m^3/hr for Metric unit. MeterRun_
V2
238
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
AnalogHi REAL This is the Hi limit for analog input. The Turbine_
value should be in ft3/hr for US unit or Dtl_
m^3/hr for Metric unit. MeterRun_
V2
AnalogLoLo REAL This is the LoLo limit for analog input. The Turbine_
value should be in ft3/hr for US unit or Dtl_
m^3/hr for Metric unit. MeterRun_
V2
AnalogLo REAL This is the Lo limit for analog input. The Turbine_
value should be in ft3/hr for US unit or Dtl_
m^3/hr for Metric unit. MeterRun_
V2
LowFlowCutOff REAL Low flow cutoff value checks the no flow Turbine_
condition in the calculations. If the flow is Dtl_
s less than this number, it will be MeterRun_
considered as no flow condition. Unit is V2
m3/hr for Metric unit, ft3/hr for US unit.
Pulse UDINT Pulse counter value Turbine_
Dtl_
MeterRun_
V2
LowPulseCutOff UINT Low pulse cutoff value checks the no flow Turbine_
condition in the calculations. If the Pulse Dtl_
increment is less than this number, it will MeterRun_
be considered as no flow condition. V2
MeterCalFactor REAL It is same as Meter K Factor which All
converts pulse from flow meter into
volume. The value should be in
pulses/m3 or pulses/ft3. When the flow
type is analog, this is the correction factor
to apply for volume calculation and the
default value should be 1.0.
MeterRunId INT This is an integer number that represents All
a configured meter run identifier.
GasCompFormat INT This parameter is for the gas composition All
format. It should be either mole fraction
239
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
{1} or percentage {2}.
240
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
unit system.
Output
Data
Output Parameter Description Apply to
types
Out_Code INT This out parameter returns success All
or fail code.
GasCompAtBaseCond LREAL This parameter is gas compressibility All
factor at base condition. It is
calculated in AGA8 Detailed method.
It is unit less.
GasDensityAtBaseCond LREAL This parameter is gas density at base All
condition. It is calculated through
AGA8 Detailed method. It is in
241
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
lbm/ft^3 for US unit system and in
kg/m^3 for Metric unit system.
GasRelDenAtBaseCond LREAL This parameter is gas relative density All
at base condition. It is calculated
through AGA8 Detailed method. It is
unit less.
GasMolecularWeight LREAL This parameter is gas molecular All
weight at base condition. It is
calculated through AGA8 Detailed
method. It is in lbm for US unit
system and in kg for Metric unit
system.
UncorrectedFlow LREAL This parameter is uncorrecetd flow All
rate. It is calculated through AGA7
method. It is in ft^3/hr for US unit
system and in m^3/hr for Metric unit
system.
Aga7QM LREAL This parameter is gas mass flow rate. All
It is calculated through AGA7
method. It is in lbm/hr for US unit
system and in kg/hr for Metric unit
system.
Aga7QB LREAL This parameter is volume flow rate at All
base condition. It is calculated
through AGA7 method. It is in ft^3/hr
for US unit system and in m^3/hr for
Metric unit system.
Energy LREAL This parameter is gas energy per All
hour. It is calculated through AGA5
method. It is in Btu/hr for US unit
system and in MJ/hr for Metric unit
system.
PrevHrAvgTemp LREAL This parameter is previous hour All
average for temperature.
PreDayAvgTemp LREAL This parameter is previous day All
average for temperature.
PrevHrAvgPressure LREAL This parameter is previous hour All
242
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
average for pressure.
PreDayAvgPressure LREAL This parameter is previous day All
average for pressure.
PrevHrAvgPulse LREAL This parameter is previous hour All
average for analog input.
PreDayAvgPulse LREAL This parameter is previous day All
average for analog input.
PrevHrAvgDenAtBase LREAL This parameter is previous hour All
average for density at base
condition.
PreDayAvgDenAtBase LREAL This parameter is previous day All
average for density at base
condition.
PrevHrAvgRelDenAtBase LREAL This parameter is previous hour All
average for relative density at base
condition.
PreDayAvgRelDenAtBase LREAL This parameter is previous day All
average for relative density at base
condition.
PrevHrAvgUncorrFlow LREAL This parameter is previous hour All
average for uncorrected flow.
PreDayAvgUncorrFlow LREAL This parameter is previous day All
average for uncorrected flow.
PrevHrAvgUserDefined1 LREAL This parameter is previous hour All
average for user defined parameter1.
PreDayAvgUserDefined1 LREAL This parameter is previous day All
average for user defined parameter1.
PrevHrAvgUserDefined2 LREAL This parameter is previous hour All
average for user defined parameter2.
PreDayAvgUserDefined2 LREAL This parameter is previous day All
average for user defined parameter2.
PrevHrAvgUserDefined3 LREAL This parameter is previous hour All
average for user defined parameter3.
243
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
PreDayAvgUserDefined3 LREAL This parameter is previous day All
average for user defined parameter3.
PrevHrAvgUserDefined4 LREAL This parameter is previous hour All
average for user defined parameter4.
PreDayAvgUserDefined4 LREAL This parameter is previous day All
average for user defined parameter4.
QbTH LREAL This parameter is volume flow rate at All
base condition total for this hour.
QbLH LREAL This parameter is volume flow rate at All
base condition total for last hour.
QbTD LREAL This parameter is volume flow rate at All
base condition total for this day.
QbLD LREAL This parameter is volume flow rate at All
base condition total for last day.
MTH LREAL This parameter is mass flow rate total All
for this hour.
MLH LREAL This parameter is mass flow rate total All
for last hour.
MTD LREAL This parameter is mass flow rate total All
for this day.
MLD LREAL This parameter is mass flow rate total All
for last day.
ETH LREAL This parameter is energy total for this All
hour.
ELH LREAL This parameter is energy total for last All
hour.
ETD LREAL This parameter is energy total for this All
day.
ELD LREAL This parameter is energy total for last All
day.
QbNR LREAL Non-Resettable or Cumulative total Turbine_
for volume at Base. Unit - ft3/hr for Dtl_
US, m3/hr for Metric. MeterRun_
244
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
V2
MNR LREAL Non-Resettable or Cumulative total Turbine_
for Mass. Unit - lbm/hr for US, kg/hr Dtl_
for Metric. MeterRun_
V2
ENR LREAL Non-Resettable or Cumulative total Turbine_
for Energy. Unit -Btu/hr for US, MJ/hr Dtl_
for Metric. MeterRun_
V2
QbRollover INT Rollover flag for volume at base Turbine_
condition non-resettable total. The Dtl_
value {1} indicates Rollover MeterRun_
otherwise {0}. The value for roll-over V2
is 999,999,999. The rollover flag will
be on 5 times interval time.
MRollover INT Rollover flag for Non-Resettable Turbine_
Mass total. The value {1} indicates Dtl_
Rollover otherwise {0}. The value for MeterRun_
roll-over is 999,999,999. The rollover V2
flag will be on 5 times interval time.
ERollover INT Rollover flag for Non-Resettable Turbine_
Energy total. The value {1} indicates Dtl_
Rollover otherwise {0}. The value for MeterRun_
roll-over is 999,999,999. The rollover V2
flag will be on 5 times interval time.
QbMaint LREAL Volume at Base in Maintenance Turbine_
mode. Dtl_
MeterRun_
V2
MMaint LREAL Mass in Maintenance mode. Turbine_
Dtl_
MeterRun_
V2
EMaint LREAL Energy at Base in Maintenance Turbine_
mode. Dtl_
MeterRun_
245
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
V2
GERG2008CV LREAL Heat Capacity at Constant Volume Turbine_
(J/mol K). Dtl_
MeterRun_
V2
GERG2008CP LREAL Heat Capacity at Constant Pressure Turbine_
(J/mol K). Dtl_
MeterRun_
V2
GERG2008W LREAL Speed of sound in gas being Turbine_
measured. Unit - ft/sec for US, Dtl_
meter/sec for Metric. MeterRun_
V2
Following are the error codes for the above meter run function block.
246
Chapter 9 - Configuring Function Blocks
247
Chapter 9 - Configuring Function Blocks
248
Chapter 9 - Configuring Function Blocks
249
Chapter 9 - Configuring Function Blocks
Description
This Turbine_GM_MeterRun function block calculates gas compressibility
factor, density, relative density and molecular weight from AGA8 gross
method, uncorrected flow, mass flow rate and volume flow rate at base
condition from AGA7 and gas energy per hour from AGA5. It also calculates
hourly and daily averages and totals. It generates hourly & daily QTRs and
sends them to EFM application which logs them on the controller’s MRAM
and flash memory. It also generates alarms when any of the process value
crosses specified alarm limit.
Turbine_GM_MeterRun expects the input parameters to be in US or Metric
unit system.
This description is also applicable to function block Ultrasonic_GM_
MeterRun. Both Turbine and Ultrasonic meters are technically same.
Input
Data
Input Parameter Description Apply to
types
GrossMethod INT This parameter represents All
gross method number. It should
be either {1} for gross method 1
and {2} for gross method 2.
GasRelDensity REAL This parameter is gas relative All
density at reference condition.
It is unit less.
CO2 REAL It could be in mole fraction or All
250
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
percentage.
Hydrogen REAL It could be in mole fraction or All
percentage.
CO REAL It could be in mole fraction or All
percentage.
Nitrogen REAL It could be in mole fraction or All
percentage. This parameter is
only required for gross method
2, for gross method 1, it can be
zero.
GasHeatingValue REAL This parameter is gas heating All
value. It is only required for
gross method 1, for gross
method 2, it can be zero. It is in
Btu/ft^3 for US unit system and
in MJ/m^3 for Metric unit
system.
RefTempForCalorimeterDensity REAL This parameter is reference All
temperature for calorimeter
density. It should be in
Fahrenheit for US unit system
and in Celcius for Metric unit
system. The recommended
default is 60 Deg F.
RefPressForCalorimeterDensity REAL This parameter is reference All
pressure for calorimeter
density. It should be in Psia for
US unit system and in Kpa for
Metric unit system. The
recommended default is 14.73
Psia.
RefTempForCombustion REAL This parameter is reference All
temperature for combustion. It
should be in Fahrenheit for US
unit system and in Celcius for
Metric unit system. The
recommended default is 60
251
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Deg F.
BaseTemp REAL Base temperature should be in All
Fahrenheit for US unit system
and in Celcius for Metric unit
system. The recommended
default is 60 Deg F.
BasePressure REAL Base pressure should be in All
Psia for US unit system and in
Kpa for Metric unit system. The
recommended default is 14.73
Psia.
FlowingTemp REAL Flowing temperature should be All
in Fahrenheit for US unit
system and in Celcius for Metric
unit system.
TempHiHi REAL This is the HiHi limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
TempHi REAL This is the Hi limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
TempLoLo REAL This is the LoLo limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
TempLo REAL This is the Lo limit for flowing All
temperature. It should be either
in Fahrenheit or Celcius.
FlowTempIOSelection INT IO selection for meter Turbine_
temperature. The value should GM_
be {1} for Live or {2) for Keypad MeterRun_
value. V2
FlowTempStsStatus USINT Analog input channel status for Turbine_
meter temperature. The value GM_
should be {0} for Good or any MeterRun_
positive integer for bad status. V2
FlowTempKeypadVal REAL Keypad value for meter Turbine_
252
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
temperature. The value that GM_
should be used when the meter MeterRun_
temperature status is bad. V2
FlowingPressure REAL Flowing pressure should be in All
Psia for US unit system and in
Kpa for Metric unit system.
PressureHiHi REAL This is the HiHi limit for flowing All
pressure. It should be either in
Psia or Kpa.
PressureHi REAL This is the Hi limit for flowing All
pressure. It should be either in
Psia or Kpa.
PressureLoLo REAL This is the LoLo limit for flowing All
pressure. It should be either in
Psia or Kpa.
PressureLo REAL This is the Lo limit for flowing All
pressure. It should be either in
Psia or Kpa.
PulseOrAnalogCount REAL For pulse input, it would be a Turbine_
number while for analog input, it GM_
should be in ft^3/hr for US unit MeterRun
system and in m^3/hr for Metric
unit system.
PulseOrAnalogHiHi REAL This is the HiHi limit for pulse or Turbine_
analog input. For pulse input, it GM_
would be a number while for MeterRun
analog input, it should be in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
PulseOrAnalogHi REAL This is the Hi limit for pulse or Turbine_
analog input. For pulse input, it GM_
would be a number while for MeterRun
analog input, it should be in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
PulseOrAnalogLoLo REAL This is the LoLo limit for pulse Turbine_
253
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
or analog input. For pulse input, GM_
it would be a number while for MeterRun
analog input, it should be in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
PulseOrAnalogLo REAL This is the Lo limit for pulse or Turbine_
analog input. For pulse input, it GM_
would be a number while for MeterRun
analog input, it should be in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
LowPulseCutOff REAL This is the low pulse cut off Turbine_
limit. For pulse input, it is a GM_
number. For analog input, it MeterRun
should be in ft^3/hr for US unit
system and in m^3/hr for Metric
unit system.
FlowPresIOSelection INT IO selection for meter pressure. Turbine_
The value should be {1} for Live GM_
or {2) for Keypad value. MeterRun_
V2
FlowPresStsStatus USINT Analog input channel status for Turbine_
meter pressure. The value GM_
should be {0} for Good or any MeterRun_
positive integer for Bad status. V2
FlowPresKeypadVal REAL Analog input channel status for Turbine_
meter pressure. The value GM_
should be {0} for Good or any MeterRun_
positive integer for Bad status. V2
Analog REAL Value of analog input if flow Turbine_
type = analog. The value GM_
should be in ft3/hr for US unit or MeterRun_
m^3/hr for Metric unit. V2
AnalogHiHi REAL This is the HiHi limit for analog Turbine_
input. The value should be in GM_
ft3/hr for US unit or m^3/hr for MeterRun_
Metric unit. V2
254
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
AnalogHi REAL This is the Hi limit for analog Turbine_
input. The value should be in GM_
ft3/hr for US unit or m^3/hr for MeterRun_
Metric unit. V2
AnalogLoLo REAL This is the LoLo limit for analog Turbine_
input. The value should be in GM_
ft3/hr for US unit or m^3/hr for MeterRun_
Metric unit. V2
AnalogLo REAL This is the Lo limit for analog Turbine_
input. The value should be in GM_
ft3/hr for US unit or m^3/hr for MeterRun_
Metric unit. V2
LowFlowCutOff REAL Low flow cutoff value checks Turbine_
the no flow condition in the GM_
calculations. If the flow is s less MeterRun_
than this number, it will be V2
considered as no flow
condition. Unit is m3/hr for
Metric unit, ft3/hr for US unit.
Pulse UDINT Pulse counter value Turbine_
GM_
MeterRun_
V2
LowPulseCutOff UINT Low pulse cutoff value checks Turbine_
the no flow condition in the GM_
calculations. If the Pulse MeterRun_
increment is less than this V2
number, it will be considered as
no flow condition.
MeterCalFactor REAL It is same as Meter K Factor All
which converts pulse from flow
meter into volume. The value
should be in pulses/m3 or
pulses/ft3. When the flow type
is analog, this is the correction
factor to apply for volume
calculation and the default
value should be 1.0.
255
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
MeterRunId INT This is an integer number that All
represents a configured meter
run identifier.
GasCompFormat INT This parameter is for the gas All
composition format. It should
be either mole fraction {1} or
percentage {2}.
NOTE: It is
recommended to use 2
percentage as a default
option.
256
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Maintenance Start. When
Maintenance mode is started,
an independent totalizer will be
started and accumulate all the
flow until the maintenance
mode is stopped. During this
period, non-resettable totals,
hourly/daily/batch totals will be
not incremented.
AGA8Version INT Selection for AGA 8 algorithm Turbine_
selection: GM_
MeterRun_
1- AGA 8 (1994) V2
2 - AGA 8 (2017)
AtmosphericPressure REAL Atmospheric pressure should All
be in Psia for US unit system
and in Kpa for Metric unit
system.
257
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
some parameter then user can
use it, it will be averaged and
logged in the QTR.
UserDefined4 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
Output
Data
Output Parameter Description All
types
Out_Code INT This out parameter returns All
success or fail code.
GasCompAtBaseCond LREAL This parameter is gas All
compressibility factor at base
condition. It is calculated in AGA8
Detailed method. It is unit less.
GasDensityAtBaseCond LREAL This parameter is gas density at All
base condition. It is calculated
through AGA8 Detailed method. It
is in lbm/ft^3 for US unit system
and in kg/m^3 for Metric unit
system.
GasRelDenAtBaseCond LREAL This parameter is gas relative All
density at base condition. It is
calculated through AGA8
Detailed method. It is unit less.
GasMolecularWeight LREAL This parameter is gas molecular All
weight at base condition. It is
calculated through AGA8
Detailed method. It is in lbm for
US unit system and in kg for
Metric unit system.
UncorrectedFlow LREAL This parameter is uncorrecetd All
flow rate. It is calculated through
258
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description All
types
AGA7 method. It is in ft^3/hr for
US unit system and in m^3/hr for
Metric unit system.
Aga7QM LREAL This parameter is gas mass flow All
rate. It is calculated through
AGA7 method. It is in lbm/hr for
US unit system and in kg/hr for
Metric unit system.
Aga7QB LREAL This parameter is volume flow All
rate at base condition. It is
calculated through AGA7
method. It is in ft^3/hr for US unit
system and in m^3/hr for Metric
unit system.
Energy LREAL This parameter is gas energy per All
hour. It is calculated through
AGA5 method. It is in Btu/hr for
US unit system and in MJ/hr for
Metric unit system.
PrevHrAvgTemp LREAL This parameter is previous hour All
average for temperature.
PreDayAvgTemp LREAL This parameter is previous day All
average for temperature.
PrevHrAvgPressure LREAL This parameter is previous hour All
average for pressure.
PreDayAvgPressure LREAL This parameter is previous day All
average for pressure.
PrevHrAvgPulse LREAL This parameter is previous hour All
average for analog input.
PreDayAvgPulse LREAL This parameter is previous day All
average for analog input.
PrevHrAvgDenAtBase LREAL This parameter is previous hour All
average for density at base
condition.
PreDayAvgDenAtBase LREAL This parameter is previous day All
259
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description All
types
average for density at base
condition.
PrevHrAvgRelDenAtBase LREAL This parameter is previous hour All
average for relative density at
base condition.
PreDayAvgRelDenAtBase LREAL This parameter is previous day All
average for relative density at
base condition.
PrevHrAvgUncorrFlow LREAL This parameter is previous hour All
average for uncorrected flow.
PreDayAvgUncorrFlow LREAL This parameter is previous day All
average for uncorrected flow.
PrevHrAvgUserDefined1 LREAL This parameter is previous hour All
average for user defined
parameter1.
PreDayAvgUserDefined1 LREAL This parameter is previous day All
average for user defined
parameter1.
PrevHrAvgUserDefined2 LREAL This parameter is previous hour All
average for user defined
parameter2.
PreDayAvgUserDefined2 LREAL This parameter is previous day All
average for user defined
parameter2.
PrevHrAvgUserDefined3 LREAL This parameter is previous hour All
average for user defined
parameter3.
PreDayAvgUserDefined3 LREAL This parameter is previous day All
average for user defined
parameter3.
PrevHrAvgUserDefined4 LREAL This parameter is previous hour All
average for user defined
parameter4.
PreDayAvgUserDefined4 LREAL This parameter is previous day All
average for user defined
260
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description All
types
parameter4.
QbTH LREAL This parameter is volume flow All
rate at base condition total for this
hour.
QbLH LREAL This parameter is volume flow All
rate at base condition total for last
hour.
QbTD LREAL This parameter is volume flow All
rate at base condition total for this
day.
QbLD LREAL This parameter is volume flow All
rate at base condition total for last
day.
MTH LREAL This parameter is mass flow rate All
total for this hour.
MLH LREAL This parameter is mass flow rate All
total for last hour.
MTD LREAL This parameter is mass flow rate All
total for this day.
MLD LREAL This parameter is mass flow rate All
total for last day.
ETH LREAL This parameter is energy total for All
this hour.
ELH LREAL This parameter is energy total for All
last hour.
ETD LREAL This parameter is energy total for All
this day.
ELD LREAL This parameter is energy total for All
last day.
QbNR LREAL Non-Resettable or Cumulative Turbine_
total for volume at Base. Unit - GM_
ft3/hr for US, m3/hr for Metric. MeterRun_
V2
261
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description All
types
MNR LREAL Non-Resettable or Cumulative Turbine_
total for Mass. Unit - lbm/hr for GM_
US, kg/hr for Metric. MeterRun_
V2
ENR LREAL Non-Resettable or Cumulative Turbine_
total for Energy. Unit -Btu/hr for GM_
US, MJ/hr for Metric. MeterRun_
V2
QbRollover INT Rollover flag for volume at base Turbine_
condition non-resettable total. GM_
The value {1} indicates Rollover MeterRun_
otherwise {0}. The value for roll- V2
over is 999,999,999. The rollover
flag will be on 5 times interval
time.
MRollover INT Rollover flag for Non-Resettable Turbine_
Mass total. The value {1} GM_
indicates Rollover otherwise {0}. MeterRun_
The value for roll-over is V2
999,999,999. The rollover flag will
be on 5 times interval time.
ERollover INT Rollover flag for Non-Resettable Turbine_
Energy total. The value {1} GM_
indicates Rollover otherwise {0}. MeterRun_
The value for roll-over is V2
999,999,999. The rollover flag will
be on 5 times interval time.
QbMaint LREAL Volume at Base in Maintenance Turbine_
mode. GM_
MeterRun_
V2
MMaint LREAL Mass in Maintenance mode. Turbine_
GM_
MeterRun_
V2
EMaint LREAL Energy at Base in Maintenance Turbine_
mode. GM_
MeterRun_
262
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description All
types
V2
Following are the error codes for the above meter run function block.
Out
Description Apply to
Code
0 SUCCESS All
5 ERROR: THE ROOT WAS NOT BOUNDED IN DGROSS All
6 ERROR: NO CONVERGENCE IN DGROSS All
7 ERROR: VIRGS SQURE ROOT NEGATIVE All
8 ERROR: COMBINED VALUES OF GRGR, X[2] AND HV NOT All
CONSISTENT
9 ERROR: INVALID TERM IN VIRGS All
11 ERROR: METHOD WAS NOT 1 OR 2 All
12 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 1740.0 PSIA All
13 ERROR: FLOWING TEMPERATURE (TF) < 14.0 OR > 149.0 DEG F All
14 ERROR: HEATING VALUE (HV) < 477.0 OR > 1211.0 BTU/FT^3 All
15 ERROR: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > 0.870 All
16 ERROR: MOLE FRACTION FOR N2 < 0.0 OR > 0.50 All
OR FOR CO2 < 0.0 OR > 0.30
OR FOR H2 < 0.0 OR > 0.10
OR FOR CO < 0.0 OR > 0.03
17 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 DEG F All
263
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
18 ERROR: REFERENCE PRESSURE < 13.0 OR > 16.0 PSIA All
22 WARNING: FLOWING PRESSURE (PF) <= 0.0 OR > 1200.0 PSIA Turbine_
GM_
MeterRun
23 WARNING: FLOWING TEMPERATURE (TF) < 32.0 OR > 130.0 Turbine_
DEG F GM_
MeterRun
24 WARNING: HEATING VALUE (HV) < 805.0 OR > 1208.0 BTU/FT^3 Turbine_
GM_
MeterRun
25 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > 0.800 Turbine_
GM_
MeterRun
26 WARNING: MOLE FRACTION FOR N2 < 0.0 OR > 0.20 Turbine_
OR FOR CO2 < 0.0 OR > 0.20 GM_
OR FOR H2 < 0.0 OR > 0.0 MeterRun
OR FOR CO < 0.0 OR >0.0
81 WARNING: FLOWING PRESSURE (PF) > 1500.0 PSIA AGA8 2017 Turbine_
RANGE 1 GM_
MeterRun_
V2
82 WARNING: FLOWING TEMPERATURE (TF) < 17.01 OR > 143.0 Turbine_
DEG F AGA8 2017 RANGE 2 OR (TF) < 25.0 OR > 143.0 DEG F GM_
AGA8 2017 RANGE 1 MeterRun_
V2
83 WARNING: HEATING VALUE (HV) < 665.0 OR > 1100.0 BTU/FT^3 Turbine_
AGA8 2017 RANGE 2 OR (HV) < 930.0 OR > 1040.0 BTU/FT^3 GM_
AGA8 2017 RANGE 1 MeterRun_
V2
84 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.554 OR > 0.801 Turbine_
AGA8 2017 RANGE 2 OR (GRGR) < 0.554 OR > 0.630 AGA8 GM_
RANGE 1 MeterRun_
V2
85 WARNING: MOLE FRACTION FOR N2 > 0.20 AGA8 2017 RANGE Turbine_
2 OR N2 > 0.07 AGA8 2017 RANGE 1 GM_
MeterRun_
264
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
OR FOR CO2 > 0.25 AGA8 2017 RANGE 2 OR CO2 > 0.03 AGA8 V2
2017 RANGE 1
265
Chapter 9 - Configuring Function Blocks
266
Chapter 9 - Configuring Function Blocks
Description
This Coriolis_Dtl_MeterRun function block calculates gas compressibility
factor, density, relative density and molecular weight from AGA8 detailed
method, volume flow rate at base condition from AGA11 and gas energy
per hour from AGA5. It also calculates hourly and daily averages and totals.
It generates hourly & daily QTRs and sends them to EFM application which
logs them on he contoller s MRAM and flash memory. It also generates
alarms when any of the process value crosses specified alarm limit.
Coriolis_Dtl_MeterRun expects the input parameters to be in US or Metric
unit system.
Input
Data
Input Parameter Description Apply to
types
Methane REAL It could be in mole fraction or All
percentage.
Nitrogen REAL It could be in mole fraction or All
percentage.
CO2 REAL It could be in mole fraction or All
percentage.
Ethane REAL It could be in mole fraction or All
percentage.
Propane REAL It could be in mole fraction or All
percentage.
Water REAL It could be in mole fraction or All
percentage.
H2S REAL It could be in mole fraction or All
percentage.
Hydrogen REAL It could be in mole fraction or All
percentage.
CO REAL It could be in mole fraction or All
percentage.
Oxygen REAL It could be in mole fraction or All
percentage.
IButane REAL It could be in mole fraction or All
267
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
percentage.
NButane REAL It could be in mole fraction or All
percentage.
IPentane REAL It could be in mole fraction or All
percentage.
NPentane REAL It could be in mole fraction or All
percentage.
Hexane REAL It could be in mole fraction or All
percentage.
Heptane REAL It could be in mole fraction or All
percentage.
Octane REAL It could be in mole fraction or All
percentage.
Nonane REAL It could be in mole fraction or All
percentage.
Decane REAL It could be in mole fraction or All
percentage.
Helium REAL It could be in mole fraction or All
percentage.
Argon REAL It could be in mole fraction or All
percentage.
DetailMethod INT Selection for Detail method: Coriolis_
Dtl_
1- Detail Method MeterRun_
2- GERG Method. GERG Method is only V2
applicable for V2 function block.
BaseTemp REAL Base temperature should be in All
Fahrenheit for US unit system and in
Celcius for Metric unit system. The
recommended default is 60 Deg F.
BasePressure REAL Base pressure should be in Psia for US All
unit system and in Kpa for Metric unit
system. The recommended default is
14.73 Psia.
268
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
FlowingTemp REAL Flowing temperature should be in All
Fahrenheit for US unit system and in
Celcius for Metric unit system.
TempHiHi REAL This is the HiHi limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
TempHi REAL This is the Hi limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
TempLoLo REAL This is the LoLo limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
TempLo REAL This is the Lo limit for flowing All
temperature. It should be either in
Fahrenheit or Celcius.
FlowTempIOSelection INT IO selection for meter temperature. The Coriolis_
value should be {1} for Live or {2) for Dtl_
Keypad value. MeterRun_
V2
FlowTempStsStatus USINT Analog input channel status for meter Coriolis_
temperature. The value should be {0} for Dtl_
Good or any positive integer for bad MeterRun_
status. V2
FlowTempKeypadVal REAL Keypad value for meter temperature. Coriolis_
The value that should be used when the Dtl_
meter temperature status is bad. MeterRun_
V2
FlowingPressure REAL Flowing pressure should be in Psia for All
US unit system and in Kpa for Metric unit
system.
PressureHiHi REAL This is the HiHi limit for flowing pressure. All
It should be either in Psia or Kpa.
PressureHi REAL This is the Hi limit for flowing pressure. It All
should be either in Psia or Kpa.
PressureLoLo REAL This is the LoLo limit for flowing All
269
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
pressure. It should be either in Psia or
Kpa.
PressureLo REAL This is the Lo limit for flowing pressure. It All
should be either in Psia or Kpa.
GasMass REAL This parameter is gas mass that is Coriolis_
directly measured from coriolis meter. It Dtl_
should be in lbm/hr for US unit system MeterRun
and in kg/hr for Metric unit system.
GasMassHiHi REAL This is the HiHi limit for gas mass. It Coriolis_
should be in lbm/hr for US unit system Dtl_
and in kg/hr for Metric unit system. MeterRun
GasMassHi REAL This is the Hi limit for gas mass. It should Coriolis_
be in lbm/hr for US unit system and in Dtl_
kg/hr for Metric unit system. MeterRun
GasMassLoLo REAL This is the LoLo limit for gas mass. It Coriolis_
should be in lbm/hr for US unit system Dtl_
and in kg/hr for Metric unit system. MeterRun
GasMassLo REAL This is the Lo limit for gas mass. It Coriolis_
should be in lbm/hr for US unit system Dtl_
and in kg/hr for Metric unit system. MeterRun
LowGasMassCutOff REAL This is the low gas mass cut off limit. It Coriolis_
should be in lbm/hr for US unit system Dtl_
and in kg/hr for Metric unit system. MeterRun
FlowPresIOSelection INT IO selection for meter pressure. The Coriolis_
value should be {1} for Live or {2) for Dtl_
Keypad value. MeterRun_
V2
FlowPresStsStatus USINT Analog input channel status for meter Coriolis_
pressure. The value should be {0} for Dtl_
Good or any positive integer for Bad MeterRun_
status. V2
FlowPresKeypadVal REAL Analog input channel status for meter Coriolis_
pressure. The value should be {0} for Dtl_
Good or any positive integer for Bad MeterRun_
status. V2
270
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Analog REAL Value of analog input if flow type = Coriolis_
analog. The value should be in lb/hr for Dtl_
US unit or kg/hr for Metric unit. MeterRun_
V2
AnalogHiHi REAL This is the HiHi limit for analog input. The Coriolis_
value should be in lb/hr for US unit or Dtl_
kg/hr for Metric unit. MeterRun_
V2
AnalogHi REAL This is the Hi limit for analog input. The Coriolis_
value should be in lb/hr for US unit or Dtl_
kg/hr for Metric unit. MeterRun_
V2
AnalogLoLo REAL This is the LoLo limit for analog input. Coriolis_
The value should be in lb/hr for US unit Dtl_
or kg/hr for Metric unit. MeterRun_
V2
AnalogLo REAL This is the Lo limit for analog input. The Coriolis_
value should be in lb/hr for US unit or Dtl_
kg/hr for Metric unit. MeterRun_
V2
LowFlowCutOff REAL Low flow cutoff value checks the no flow Coriolis_
condition in the calculations. If the flow is Dtl_
s less than this number, it will be MeterRun_
considered as no flow condition. Unit is V2
kg/hr for Metric unit, lb/hr for US unit.
FlowType INT This parameter represents the flow type, Coriolis_
it should be either {1} Pulse Dtl_
Accumulated or {2} Analog Flow Rate. MeterRun_
V2
Pulse UDINT Pulse counter value Coriolis_
Dtl_
MeterRun_
V2
LowPulseCutOff UINT Low pulse cutoff value checks the no Coriolis_
flow condition in the calculations. If the Dtl_
Pulse increment is less than this MeterRun_
271
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
number, it will be considered as no flow V2
condition.
MeterCalFactor REAL It is same as Meter K factor which Coriolis_
converts pulse from flow meter into Dtl_
mass. The value should be in pulses/kg MeterRun_
(Metric) or pulses/lb (US). When the flow V2
type is analog, this is the correction
factor to apply for mass calculation and
the default value should be 1.0.
MeterRunId INT This is an integer number that All
represents a configured meter run
identifier.
GasCompFormat INT This parameter is for the gas All
composition format. It should be either
mole fraction {1} or percentage {2}.
272
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
will be started and accumulate all the
flow until the maintenance mode is
stopped. During this period, non-
resettable totals, hourly/daily/batch
totals will be not incremented.
AGA8Version INT Selection for AGA 8 algorithm selection: Coriolis_
Dtl_
1- AGA 8 (1994) MeterRun_
2 - AGA 8 (2017) V2
273
Chapter 9 - Configuring Function Blocks
Output
Data
Output Parameter Description Apply to
types
Out_Code INT This out parameter returns success All
or fail code.
GasCompAtBaseCond LREAL This parameter is gas All
compressibility factor at base
condition. It is calculated in AGA8
Detailed method. It is unit less.
GasDensityAtBaseCond LREAL This parameter is gas density at All
base condition. It is calculated
through AGA8 Detailed method. It
is in lbm/ft^3 for US unit system
and in kg/m^3 for Metric unit
system.
GasRelDenAtBaseCond LREAL This parameter is gas relative All
density at base condition. It is
calculated through AGA8 Detailed
method. It is unit less.
GasMolecularWeight LREAL This parameter is gas molecular All
weight at base condition. It is
calculated through AGA8 Detailed
method. It is in lbm for US unit
system and in kg for Metric unit
system.
Aga11QB LREAL This parameter is volume flow rate All
at base condition. It is calculated
through AGA11 method. It is in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
Energy LREAL This parameter is gas energy per All
hour. It is calculated through AGA5
method. It is in Btu/hr for US unit
system and in MJ/hr for Metric unit
system.
PrevHrAvgTemp LREAL This parameter is previous hour All
average for temperature.
PreDayAvgTemp LREAL This parameter is previous day All
average for temperature.
274
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
PrevHrAvgPressure LREAL This parameter is previous hour All
average for pressure.
PreDayAvgPressure LREAL This parameter is previous day All
average for pressure.
PrevHrAvgGasMass LREAL This parameter is previous hour All
average for gas mass.
PreDayAvgGasMass LREAL This parameter is previous day All
average for gas mass.
PrevHrAvgDenAtBase LREAL This parameter is previous hour All
average for density at base
condition.
PreDayAvgDenAtBase LREAL This parameter is previous day All
average for density at base
condition.
PrevHrAvgRelDenAtBase LREAL This parameter is previous hour All
average for relative density at base
condition.
PreDayAvgRelDenAtBase LREAL This parameter is previous day All
average for relative density at base
condition.
PrevHrAvgUserDefined1 LREAL This parameter is previous hour All
average for user defined
parameter1.
PreDayAvgUserDefined1 LREAL This parameter is previous day All
average for user defined
parameter1.
PrevHrAvgUserDefined2 LREAL This parameter is previous hour All
average for user defined
parameter2.
PreDayAvgUserDefined2 LREAL This parameter is previous day All
average for user defined
parameter2.
PrevHrAvgUserDefined3 LREAL This parameter is previous hour All
average for user defined
275
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
parameter3.
PreDayAvgUserDefined3 LREAL This parameter is previous day All
average for user defined
parameter3.
PrevHrAvgUserDefined4 LREAL This parameter is previous hour All
average for user defined
parameter4.
PreDayAvgUserDefined4 LREAL This parameter is previous day All
average for user defined
parameter4.
QbTH LREAL This parameter is volume flow rate All
at base condition total for this hour.
QbLH LREAL This parameter is volume flow rate All
at base condition total for last hour.
QbTD LREAL This parameter is volume flow rate All
at base condition total for this day.
QbLD LREAL This parameter is volume flow rate All
at base condition total for last day.
MTH LREAL This parameter is mass flow rate All
total for this hour.
MLH LREAL This parameter is mass flow rate All
total for last hour.
MTD LREAL This parameter is mass flow rate All
total for this day.
MLD LREAL This parameter is mass flow rate All
total for last day.
ETH LREAL This parameter is energy total for All
this hour.
ELH LREAL This parameter is energy total for All
last hour.
ETD LREAL This parameter is energy total for All
this day.
ELD LREAL This parameter is energy total for All
276
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
last day.
QbNR LREAL Non-Resettable or Cumulative total Coriolis_
for volume at Base. Unit - ft3/hr for Dtl_
US, m3/hr for Metric. MeterRun_
V2
MNR LREAL Non-Resettable or Cumulative total Coriolis_
for Mass. Unit - lbm/hr for US, kg/hr Dtl_
for Metric. MeterRun_
V2
ENR LREAL Non-Resettable or Cumulative total Coriolis_
for Energy. Unit -Btu/hr for US, Dtl_
MJ/hr for Metric. MeterRun_
V2
QbRollover INT Rollover flag for volume at base Coriolis_
condition non-resettable total. The Dtl_
value {1} indicates Rollover MeterRun_
otherwise {0}. The value for roll- V2
over is 999,999,999. The rollover
flag will be on 5 times interval time.
MRollover INT Rollover flag for Non-Resettable Coriolis_
Mass total. The value {1} indicates Dtl_
Rollover otherwise {0}. The value MeterRun_
for roll-over is 999,999,999. The V2
rollover flag will be on 5 times
interval time.
ERollover INT Rollover flag for Non-Resettable Coriolis_
Energy total. The value {1} Dtl_
indicates Rollover otherwise {0}. MeterRun_
The value for roll-over is V2
999,999,999. The rollover flag will
be on 5 times interval time.
QbMaint LREAL Volume at Base in Maintenance Coriolis_
mode. Dtl_
MeterRun_
V2
MMaint LREAL Mass in Maintenance mode. Coriolis_
277
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
Dtl_
MeterRun_
V2
EMaint LREAL Energy at Base in Maintenance Coriolis_
mode. Dtl_
MeterRun_
V2
GERG2008CV LREAL Heat Capacity at Constant Volume Coriolis_
(J/mol K). Dtl_
MeterRun_
V2
GERG2008CP LREAL Heat Capacity at Constant Coriolis_
Pressure (J/mol K). Dtl_
MeterRun_
V2
GERG2008W LREAL Speed of sound in gas being Coriolis_
measured. Unit - ft/sec for US, Dtl_
meter/sec for Metric. MeterRun_
V2
Following are the error codes for the above meter run function block.
Out
Description Apply to
Code
0 SUCCESS All
1¹ ERROR: PRESSURE HAS A NEGATIVE DERIVATIVE DEFAULT All
GAS DENSITY USED
ERROR: A COMPONENT MOLE FRACTION < 0.0 OR > 1.0 Coriolis_
Dtl_
MeterRun _
V2
278
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
2¹ WARNING: DENSITY IN BRAKET EXCEEDS MAXIMUM DEFAULT All
PROCEEDURE USED
WARNING: SUM OF MOLE FRACTIONS < 0.9999 OR > 1.0001 Coriolis_
Dtl_
MeterRun _
V2
3¹ ERROR: MAXIMUM ITERATIONS EXCEEDED IN BRAKET All
DEFAULT DENSITY USED
WARNING: PRESSURE BASE (PB) <= 0.0 OR >= 16 PSIA Coriolis_
Dtl_
MeterRun _
V2
4¹ ERROR: MAXIMUM ITERATIONS IN DDETAIL EXCEEDED LAST All
DENSITY USED
WARNING: TEMPERATURE BASE (TB) <= 32.0 OR >= 77.0 DEG F Coriolis_
Dtl_
MeterRun _
V2
32 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 40,000. PSIA All
33 ERROR: FLOWING TEMPERATURE (TF) < -200 OR > 760 DEG F All
36 ERROR: MOLE FRACTION FOR METHANE < 0.0 OR > 1.0 Coriolis_
FOR NITROGEN < 0.0 OR > 1.0 Dtl_
FOR CARBON DIOXIDE < 0.0 OR > 1.0 MeterRun
FOR ETHANE < 0.0 OR > 1.0
FOR PROPANE < 0.0 OR > 0.12
FOR WATER < 0.0 OR > 0.10
FOR H2S < 0.0 OR > 1.0
FOR HYDROGEN < 0.0 OR > 1.0
FOR CARBON MONOXIDE < 0.0 OR > 0.03
FOR OXYGEN < 0.0 OR > 0.21
FOR BUTANES < 0.0 OR > 0.06
FOR PENTANES < 0.0 OR > 0.04
FOR HEXANES + < 0.0 OR > 0.10
FOR HELIUM < 0.0 OR > 0.03
FOR ARGON < 0.0 OR > 1.0
279
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
37 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 DEG F All
38 ERROR: REFERENCE PRESSURE < 12.9 OR > 16.01 PSIA All
39 ERROR: SUM OF MOLE FRACTIONS < 0.98 OR > 1.020 All
42 WARNING: FLOWING PRESSURE (PF) < 0.0 OR > 1750. PSIA All
43 WARNING: FLOWING TEMPERATURE (TF) < 17 OR > 143 DEG F All
45 WARNING: ANY COMPONENT MOLE FRACTION OUTSIDE OF Coriolis_
AGA REPORT NO. 8 RECOMMENDED RANGE Dtl_
MeterRun _
V2
46 WARNING: MOLE FRACTION FOR METHANE < 0.45 OR > 1.0 Coriolis_
FOR NITROGEN < 0.0 OR > 0.5 Dtl_
FOR CARBON DIOXIDE < 0.0 OR > 0.3 MeterRun
FOR ETHANE < 0.0 OR > 0.1
FOR PROPANE < 0.0 OR > 0.04
FOR WATER < 0.0 OR >= 0.0005
FOR H2S < 0.0 OR > 0.0002
FOR HYDROGEN < 0.0 OR > 0.1
FOR CARBON MONOXIDE < 0.0 OR > 0.03
FOR OXYGEN < 0.0 OR > 0.0
FOR BUTANES < 0.0 OR > 0.01
FOR PENTANES < 0.0 OR >= 0.003
FOR HEXANES + < 0.0 OR >= 0.002
FOR HELIUM < 0.0 OR >= 0.002
FOR ARGON < 0.0 OR > 0.0
49 WARNING: SUM OF MOLE FRACTIONS < 0.9999 OR > 1.0001 All
86 WARNING: Flowing Pressure greater than 2017 AGA8 GERG-2008 Coriolis_
Full Quality Range (10,150 PSIA) Dtl_
MeterRun_
V2
87 WARNING: Flowing Pressure greater than 2017 AGA8 GERG-2008 Coriolis_
Range (5075 PSIA) Dtl_
MeterRun_
V2
88 WARNING: Flowing Temperature outside 2017 AGA8 GERG-2008 Coriolis_
Full Quality Range (-352 F < TF < 800 F) Dtl_
MeterRun_
280
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
V2
89 WARNING: Flowing Temperature outside 2017 AGA8 GERG-2008 Coriolis_
Range (-298 F < TF < 350 F) Dtl_
MeterRun_
V2
90 WARNING: A Component Mole % outside 2017 AGA8 GERG-2008 Coriolis_
Intermediate Quality Range Dtl_
MeterRun_
V2
91 WARNING: A Component Mole % outside 2017 AGA8 GERG-2008 Coriolis_
Pipeline Quality Range Dtl_
MeterRun_
V2
NOTE 1: Error codes 1~4 are common between AGA 8 and AGA 5. You must take caution
and analyze when these specific out codes appear to determine the source.
281
Chapter 9 - Configuring Function Blocks
Description
This Coriolis_GM_MeterRun function block calculates gas compressibility
factor, density, relative density and molecular weight from AGA8 gross
282
Chapter 9 - Configuring Function Blocks
method, volume flow rate at base condition from AGA11 and gas energy
per hour from AGA5. It also calculates hourly and daily averages and totals.
It generates hourly & daily QTRs and sends them to EFM application which
logs them on he contoller’s MRAM and flash memory. It also generates
alarms when any of the process value crosses specified alarm limit.
Coriolis_GM_MeterRun expects the input parameters to be in US or Metric
unit system.
Input
Data
Input Parameter Description Apply to
types
GrossMethod INT This parameter represents All
gross method number. It
should be either {1} for gross
method 1 and {2} for gross
method 2.
GasRelDensity REAL This parameter is gas relative All
density at reference condition.
It is unit less.
CO2 REAL It could be in mole fraction or All
percentage.
Hydrogen REAL It could be in mole fraction or All
percentage.
CO REAL It could be in mole fraction or All
percentage.
Nitrogen REAL It could be in mole fraction or All
percentage. This parameter is
only required for gross method
2, for gross method 1, it can
be zero.
GasHeatingValue REAL This parameter is gas heating All
value. It is only required for
gross method 1, for gross
method 2, it can be zero. It is
in Btu/ft^3 for US unit system
and in MJ/m^3 for Metric unit
system.
283
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
RefTempForCalorimeterDensity REAL This parameter is reference All
temperature for calorimeter
density. It should be in
Fahrenheit for US unit system
and in Celcius for Metric unit
system. The recommended
default is 60 Deg F.
RefPressForCalorimeterDensity REAL This parameter is reference All
pressure for calorimeter
density. It should be in Psia for
US unit system and in Kpa for
Metric unit system. The
recommended default is 14.73
Psia.
RefTempForCombustion REAL This parameter is reference All
temperature for combustion. It
should be in Fahrenheit for US
unit system and in Celcius for
Metric unit system. The
recommended default is 60
Deg F.
BaseTemp REAL Base temperature should be in All
Fahrenheit for US unit system
and in Celcius for Metric unit
system. The recommended
default is 60 Deg F.
BasePressure REAL Base pressure should be in All
Psia for US unit system and in
Kpa for Metric unit system.
The recommended default is
14.73 Psia.
FlowingTemp REAL Flowing temperature should All
be in Fahrenheit for US unit
system and in Celcius for
Metric unit system.
TempHiHi REAL This is the HiHi limit for flowing All
temperature. It should be
either in Fahrenheit or
284
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Celcius.
TempHi REAL This is the Hi limit for flowing All
temperature. It should be
either in Fahrenheit or
Celcius.
TempLoLo REAL This is the LoLo limit for All
flowing temperature. It should
be either in Fahrenheit or
Celcius.
TempLo REAL This is the Lo limit for flowing All
temperature. It should be
either in Fahrenheit or
Celcius.
FlowTempIOSelection INT IO selection for meter Coriolis_
temperature. The value should GM_
be {1} for Live or {2) for MeterRun_
Keypad value. V2
FlowTempStsStatus USINT Analog input channel status Coriolis_
for meter temperature. The GM_
value should be {0} for Good MeterRun_
or any positive integer for bad V2
status.
FlowTempKeypadVal REAL Keypad value for meter Coriolis_
temperature. The value that GM_
should be used when the MeterRun_
meter temperature status is V2
bad.
FlowingPressure REAL Flowing pressure should be in All
Psia for US unit system and in
Kpa for Metric unit system.
PressureHiHi REAL This is the HiHi limit for flowing All
pressure. It should be either in
Psia or Kpa.
PressureHi REAL This is the Hi limit for flowing All
pressure. It should be either in
Psia or Kpa.
285
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
PressureLoLo REAL This is the LoLo limit for All
flowing pressure. It should be
either in Psia or Kpa.
PressureLo REAL This is the Lo limit for flowing All
pressure. It should be either in
Psia or Kpa.
GasMass REAL This parameter is gas mass Coriolis_
that is directly measured from GM_
coriolis meter. It should be in MeterRun
lbm/hr for US unit system and
in kg/hr for Metric unit system.
GasMassHiHi REAL This is the HiHi limit for gas Coriolis_
mass. It should be in lbm/hr for GM_
US unit system and in kg/hr for MeterRun
Metric unit system.
GasMassHi REAL This is the Hi limit for gas Coriolis_
mass. It should be in lbm/hr for GM_
US unit system and in kg/hr for MeterRun
Metric unit system.
GasMassLoLo REAL This is the LoLo limit for gas Coriolis_
mass. It should be in lbm/hr for GM_
US unit system and in kg/hr for MeterRun
Metric unit system.
GasMassLo REAL This is the Lo limit for gas Coriolis_
mass. It should be in lbm/hr for GM_
US unit system and in kg/hr for MeterRun
Metric unit system.
LowGasMassCutOff REAL This is the low gas mass cut Coriolis_
off limit. It should be in lbm/hr GM_
for US unit system and in kg/hr MeterRun
for Metric unit system.
FlowPresIOSelection INT IO selection for meter Coriolis_
pressure. The value should be GM_
{1} for Live or {2) for Keypad MeterRun_
value. V2
FlowPresStsStatus USINT Analog input channel status Coriolis_
286
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
for meter pressure. The value GM_
should be {0} for Good or any MeterRun_
positive integer for Bad status. V2
FlowPresKeypadVal REAL Analog input channel status Coriolis_
for meter pressure. The value GM_
should be {0} for Good or any MeterRun_
positive integer for Bad status. V2
Analog REAL Value of analog input if flow Coriolis_
type = analog. The value GM_
should be in lb/hr for US unit MeterRun_
or kg/hr for Metric unit. V2
AnalogHiHi REAL This is the HiHi limit for analog Coriolis_
input. The value should be in GM_
lb/hr for US unit or kg/hr for MeterRun_
Metric unit. V2
AnalogHi REAL This is the Hi limit for analog Coriolis_
input. The value should be in GM_
lb/hr for US unit or kg/hr for MeterRun_
Metric unit. V2
AnalogLoLo REAL This is the LoLo limit for Coriolis_
analog input. The value GM_
should be in lb/hr for US unit MeterRun_
or kg/hr for Metric unit. V2
AnalogLo REAL This is the Lo limit for analog Coriolis_
input. The value should be in GM_
lb/hr for US unit or kg/hr for MeterRun_
Metric unit. V2
LowFlowCutOff REAL Low flow cutoff value checks Coriolis_
the no flow condition in the GM_
calculations. If the flow is s MeterRun_
less than this number, it will be V2
considered as no flow
condition. Unit is kg/hr for
Metric unit, lb/hr for US unit.
FlowType INT This parameter represents the Coriolis_
flow type, it should be either GM_
287
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
{1} Pulse Accumulated or {2} MeterRun_
Analog Flow Rate. V2
Pulse UDINT Pulse counter value Coriolis_
GM_
MeterRun_
V2
LowPulseCutOff UINT Low pulse cutoff value checks Coriolis_
the no flow condition in the GM_
calculations. If the Pulse MeterRun_
increment is less than this V2
number, it will be considered
as no flow condition.
MeterCalFactor REAL It is same as Meter K factor Coriolis_
which converts pulse from flow GM_
meter into mass. The value MeterRun_
should be in pulses/kg (Metric) V2
or pulses/lb (US). When the
flow type is analog, this is the
correction factor to apply for
mass calculation and the
default value should be 1.0.
MeterRunId INT This is an integer number that All
represents a configured meter
run identifier.
GasCompFormat INT This parameter is for the gas All
composition format. It should
be either mole fraction {1} or
percentage {2}.
NOTE: It is
recommended to use 2
percentage as a default
option.
288
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
ContractUnit INT This parameter is for all the All
outputs of meter run function
block. It should be either US
{1} or Metric {2}.
ContractStartday INT This parameter represents the All
start of gas QTR day. Its value
should be from 0 to 23.
AvgMethod INT This parameter is for All
averaging method to be used
for averaging. As of now, it
only supports value {1} that is
for time weighted linear
average.
MaintMode INT Parameter to Start or Stop the Coriolis_
Maintenance Mode. The value GM_
should be either {0} MeterRun_
Maintenance End or {1} for V2
Maintenance Start. When
Maintenance mode is started,
an independent totalizer will
be started and accumulate all
the flow until the maintenance
mode is stopped. During this
period, non-resettable totals,
hourly/daily/batch totals will be
not incremented.
AGA8Version INT Selection for AGA 8 algorithm Coriolis_
selection: GM_
MeterRun_
1- AGA 8 (1994) V2
2 - AGA 8 (2017)
AtmosphericPressure REAL Atmospheric pressure should All
be in Psia for US unit system
and in Kpa for Metric unit
system.
289
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
absolute when flowing
pressure is measured by a
pressure gauge. If flowing
pressure is already absolute
then it can be left zero.
UserDefined1 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
UserDefined2 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
UserDefined3 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
UserDefined4 REAL This parameter is an optional All
one, if user wants to average
some parameter then user can
use it, it will be averaged and
logged in the QTR.
Output
Data
Output Parameter Description Apply to
types
Out_Code INT This out parameter returns success All
or fail code.
GasCompAtBaseCond LREAL This parameter is gas All
compressibility factor at base
condition. It is calculated in AGA8
Detailed method. It is unit less.
GasDensityAtBaseCond LREAL This parameter is gas density at All
290
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
base condition. It is calculated
through AGA8 Detailed method. It
is in lbm/ft^3 for US unit system
and in kg/m^3 for Metric unit
system.
GasRelDenAtBaseCond LREAL This parameter is gas relative All
density at base condition. It is
calculated through AGA8 Detailed
method. It is unit less.
GasMolecularWeight LREAL This parameter is gas molecular All
weight at base condition. It is
calculated through AGA8 Detailed
method. It is in lbm for US unit
system and in kg for Metric unit
system.
Aga11QB LREAL This parameter is volume flow rate All
at base condition. It is calculated
through AGA11 method. It is in
ft^3/hr for US unit system and in
m^3/hr for Metric unit system.
Energy LREAL This parameter is gas energy per All
hour. It is calculated through AGA5
method. It is in Btu/hr for US unit
system and in MJ/hr for Metric unit
system.
PrevHrAvgTemp LREAL This parameter is previous hour All
average for temperature.
PreDayAvgTemp LREAL This parameter is previous day All
average for temperature.
PrevHrAvgPressure LREAL This parameter is previous hour All
average for pressure.
PreDayAvgPressure LREAL This parameter is previous day All
average for pressure.
PrevHrAvgGasMass LREAL This parameter is previous hour All
average for gas mass.
291
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
PreDayAvgGasMass LREAL This parameter is previous day All
average for gas mass.
PrevHrAvgDenAtBase LREAL This parameter is previous hour All
average for density at base
condition.
PreDayAvgDenAtBase LREAL This parameter is previous day All
average for density at base
condition.
PrevHrAvgRelDenAtBase LREAL This parameter is previous hour All
average for relative density at base
condition.
PreDayAvgRelDenAtBase LREAL This parameter is previous day All
average for relative density at base
condition.
PrevHrAvgUserDefined1 LREAL This parameter is previous hour All
average for user defined
parameter1.
PreDayAvgUserDefined1 LREAL This parameter is previous day All
average for user defined
parameter1.
PrevHrAvgUserDefined2 LREAL This parameter is previous hour All
average for user defined
parameter2.
PreDayAvgUserDefined2 LREAL This parameter is previous day All
average for user defined
parameter2.
PrevHrAvgUserDefined3 LREAL This parameter is previous hour All
average for user defined
parameter3.
PreDayAvgUserDefined3 LREAL This parameter is previous day All
average for user defined
parameter3.
PrevHrAvgUserDefined4 LREAL This parameter is previous hour All
average for user defined
parameter4.
292
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
PreDayAvgUserDefined4 LREAL This parameter is previous day All
average for user defined
parameter4.
QbTH LREAL This parameter is volume flow rate All
at base condition total for this hour.
QbLH LREAL This parameter is volume flow rate All
at base condition total for last hour.
QbTD LREAL This parameter is volume flow rate All
at base condition total for this day.
QbLD LREAL This parameter is volume flow rate All
at base condition total for last day.
MTH LREAL This parameter is mass flow rate All
total for this hour.
MLH LREAL This parameter is mass flow rate All
total for last hour.
MTD LREAL This parameter is mass flow rate All
total for this day.
MLD LREAL This parameter is mass flow rate All
total for last day.
ETH LREAL This parameter is energy total for All
this hour.
ELH LREAL This parameter is energy total for All
last hour.
ETD LREAL This parameter is energy total for All
this day.
ELD LREAL This parameter is energy total for All
last day.
QbNR LREAL Non-Resettable or Cumulative total Coriolis_
for volume at Base. Unit - ft3/hr for GM_
US, m3/hr for Metric. MeterRun_
V2
MNR LREAL Non-Resettable or Cumulative total Coriolis_
for Mass. Unit - lbm/hr for US, kg/hr GM_
293
Chapter 9 - Configuring Function Blocks
Data
Output Parameter Description Apply to
types
for Metric. MeterRun_
V2
ENR LREAL Non-Resettable or Cumulative total Coriolis_
for Energy. Unit -Btu/hr for US, GM_
MJ/hr for Metric. MeterRun_
V2
QbRollover INT Rollover flag for volume at base Coriolis_
condition non-resettable total. The GM_
value {1} indicates Rollover MeterRun_
otherwise {0}. The value for roll- V2
over is 999,999,999. The rollover
flag will be on 5 times interval time.
MRollover INT Rollover flag for Non-Resettable Coriolis_
Mass total. The value {1} indicates GM_
Rollover otherwise {0}. The value MeterRun_
for roll-over is 999,999,999. The V2
rollover flag will be on 5 times
interval time.
ERollover INT Rollover flag for Non-Resettable Coriolis_
Energy total. The value {1} GM_
indicates Rollover otherwise {0}. MeterRun_
The value for roll-over is V2
999,999,999. The rollover flag will
be on 5 times interval time.
QbMaint LREAL Volume at Base in Maintenance Coriolis_
mode. GM_
MeterRun_
V2
MMaint LREAL Mass in Maintenance mode. Coriolis_
GM_
MeterRun_
V2
EMaint LREAL Energy at Base in Maintenance Coriolis_
mode. GM_
MeterRun_
V2
294
Chapter 9 - Configuring Function Blocks
295
Chapter 9 - Configuring Function Blocks
Following are the error codes for the above meter run function block.
Out
Description Apply to
Code
0 SUCCESS All
5 ERROR: THE ROOT WAS NOT BOUNDED IN DGROSS All
6 ERROR: NO CONVERGENCE IN DGROSS All
7 ERROR: VIRGS SQURE ROOT NEGATIVE All
8 ERROR: COMBINED VALUES OF GRGR, X[2] AND HV NOT All
CONSISTENT
9 ERROR: INVALID TERM IN VIRGS All
11 ERROR: METHOD WAS NOT 1 OR 2 All
12 ERROR: FLOWING PRESSURE (PF) <= 0.0 OR > 1740.0 PSIA All
13 ERROR: FLOWING TEMPERATURE (TF) < 14.0 OR > 149.0 DEG F All
14 ERROR: HEATING VALUE (HV) < 477.0 OR > 1211.0 BTU/FT^3 All
15 ERROR: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > 0.870 All
16 ERROR: MOLE FRACTION FOR N2 < 0.0 OR > 0.50 All
OR FOR CO2 < 0.0 OR > 0.30
OR FOR H2 < 0.0 OR > 0.10
OR FOR CO < 0.0 OR > 0.03
17 ERROR: REFERENCE TEMPERATURE < 32.0 OR > 77.0 DEG F All
18 ERROR: REFERENCE PRESSURE < 13.0 OR > 16.0 PSIA All
22 WARNING: FLOWING PRESSURE (PF) <= 0.0 OR > 1200.0 PSIA Coriolis_
GM_
MeterRun
23 WARNING: FLOWING TEMPERATURE (TF) < 32.0 OR > 130.0 Coriolis_
DEG F GM_
MeterRun
24 WARNING: HEATING VALUE (HV) < 805.0 OR > 1208.0 BTU/FT^3 Coriolis_
GM_
MeterRun
25 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.55 OR > 0.800 Coriolis_
GM_
MeterRun
296
Chapter 9 - Configuring Function Blocks
Out
Description Apply to
Code
26 WARNING: MOLE FRACTION FOR N2 < 0.0 OR > 0.20 Coriolis_
OR FOR CO2 < 0.0 OR > 0.20 GM_
OR FOR H2 < 0.0 OR > 0.0 MeterRun
OR FOR CO < 0.0 OR >0.0
81 WARNING: FLOWING PRESSURE (PF) > 1500.0 PSIA AGA8 2017 Coriolis_
RANGE 1 GM_
MeterRun_
V2
82 WARNING: FLOWING TEMPERATURE (TF) < 17.01 OR > 143.0 Coriolis_
DEG F AGA8 2017 RANGE 2 OR (TF) < 25.0 OR > 143.0 DEG F GM_
AGA8 2017 RANGE 1 MeterRun_
V2
83 WARNING: HEATING VALUE (HV) < 665.0 OR > 1100.0 BTU/FT^3 Coriolis_
AGA8 2017 RANGE 2 OR (HV) < 930.0 OR > 1040.0 BTU/FT^3 GM_
AGA8 2017 RANGE 1 MeterRun_
V2
84 WARNING: GAS RELATIVE DENSITY (GRGR) < 0.554 OR > 0.801 Coriolis_
AGA8 2017 RANGE 2 OR (GRGR) < 0.554 OR > 0.630 AGA8 GM_
RANGE 1 MeterRun_
V2
85 WARNING: MOLE FRACTION FOR N2 > 0.20 AGA8 2017 RANGE Coriolis_
2 OR N2 > 0.07 AGA8 2017 RANGE 1 GM_
MeterRun_
OR FOR CO2 > 0.25 AGA8 2017 RANGE 2 OR CO2 > 0.03 AGA8 V2
2017 RANGE 1
API 21.2
The following libraries of API21.2 Function Blocks are supported:
Library Description
API21_2 The function block library provides support for creating flow measurement
calculations for various liquids based on API 21.2 standard for Turbine,
Corolis, positive displacement and ultrasonic meters.
297
Chapter 9 - Configuring Function Blocks
Library Description
API21_2_V2 It is supported from R161.2 release.
The function block library provides support for creating flow measurement
calculations for Liquid based on API 21.2 standard for Turbine, Corolis,
positive displacement and ultrasonic meters with upgraded support for
low flow cutoff.
The following API 21.2 meter run function blocks are available:
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintenance mode totalizer
when the meter run is under maintenance mode.
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_LubricatingOil This function block calculates volume correction factors for refined
products like gasoline/diesel or lubricating oil according to API 11.1. It
takes input from flow meter in terms of Pulse/flow rate and calculate
Gross Standard Volume, and Mass. The function block supports base
density from a offline densitometer and live measured density from
single/dual densitometer (fast loop). The block can take inputs either in
US or Metric systems. The base temperature and pressure is 60 Deg F
and 0 psig in US units. The base temperature is 15/20 Deg C and base
pressure is 0 KPag in METRIC units.
298
Chapter 9 - Configuring Function Blocks
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_NaturalGas This function block calculates volume correction factors for Natural gas
liquids (LNG/LPG ) according to API 11.2.4, API 11.2.2/11.2.2M and API
11.2.5. It takes input from the flow meter in terms of Pulse/flow rate and
calculate Gross Standard Volume, and Mass. The function block
supports base density from a offline densitometer and live measured
density from single/dual densitometer (fast loop). The block can take
inputs either in US or Metric systems. The base temperature and
pressure is 60 Deg F and 0 psig in US units. The base temperature is
15/20 Deg C and base pressure is 0 KPag in METRIC units.
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintainence mode totalizer
when meter run is under maintenance. In order to get accuracy as
stated in API 11.2.4, the RoundingMethod needs to be set as enabled (1
as part of the configuration).
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_ This function block calculates volume correction factors for refined
RefinedProducts products like gasoline or lubricating oil according to API 11.1. It takes
input from flow meter in terms of Pulse/flow rate and calculate Gross
Standard Volume, and Mass. The function block supports base density
from a offline densitometer and live measured density from single/dual
densitometer (fast loop). The block can take inputs either in US or Metric
systems. The base temperature and pressure is 60 Deg F and 0 psig in
US units. The base temperature is 15/20 Deg C and base pressure is 0
KPag in METRIC units.
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintenance mode totalizer
299
Chapter 9 - Configuring Function Blocks
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_ This function block calculates volume correction factors for special
SpecialProducts products according to API 11.1. It takes input from flow meter in terms of
Pulse/flow rate and calculate Gross Standard Volume, and Mass. The
value of thermal expansion factor at 60 deg F needs to be provided. The
function block supports base density from a offline densitometer and live
measured density from single/dual densitometer (fast loop). The block
can take inputs either in US or Metric systems. The base temperature
and pressure is 60F and 0 psig in US units. The base temperature is
15/20 Deg C and base pressure is 0 KPag.
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintenance mode totalizer
when the meter run is under maintenance.
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liquid_ The LiquidStationTotalizer function block calculates the meter station
StationTotalizer totals for the multiple streams connected to the Station. The Station
totals are calculated by adding relevant individual totals from each
stream and totalizing them to create Station totals. Station totalizer by
default totalizes gross standard volume, net standard volume, mass and
water and sediments volume. The station totalizer by default generates
hourly and daily QTR similar to any other meter runs.
ST103A_Process Function block to check the connection status of the ST103A device
before the data is used with other API21.2 function blocks.
Volume_ Function block to compute the corrected Volume for the given CTL and
Correction_FB CPL.
300
Chapter 9 - Configuring Function Blocks
Description
Function Block Description
Liq_CrudeOil This function block calculates volume correction factors for crude oil
according to API 11.1. It takes input from flow meter in terms of
Pulse/flow rate and calculate Gross Standard Volume, Net Standard
Volume and Sediments and Water Volume and Mass. The function
block supports base density from a offline densitometer, and live
measured density from single/dual densitometer (fast loop). The block
can take inputs either in US or Metric systems. The base temperature
and pressure is 60 Deg F and 0 psig in US units. The base temperature
is 15/20 Deg C and base pressure is 0 KPag in METRIC Unit.
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintenance mode totalizer
when the meter run is under maintenance mode.
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_ This function block calculates volume correction factors for refined
RefinedProducts products like gasoline or lubricating oil according to API 11.1. It takes
input from flow meter in terms of Pulse/flow rate and calculate Gross
Standard Volume, and Mass. The function block supports base density
from a offline densitometer and live measured density from single/dual
densitometer (fast loop). The block can take inputs either in US or Metric
systems. The base temperature and pressure is 60 Deg F and 0 psig in
US units. The base temperature is 15/20 Deg C and base pressure is 0
KPag in METRIC units.
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintenance mode totalizer
when the meter run is under maintenance.
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_LubricatingOil This function block calculates volume correction factors for refined
301
Chapter 9 - Configuring Function Blocks
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintenance mode totalizer
when the meter run is under maintenance.
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_ This function block calculates volume correction factors for special
SpecialProducts products according to API 11.1. It takes input from flow meter in terms of
Pulse/flow rate and calculate Gross Standard Volume, and Mass. The
value of thermal expansion factor at 60 deg F needs to be provided. The
function block supports base density from a offline densitometer and live
measured density from single/dual densitometer (fast loop). The block
can take inputs either in US or Metric systems. The base temperature
and pressure is 60F and 0 psig in US units. The base temperature is
15/20 Deg C and base pressure is 0 KPag.
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintenance mode totalizer
when the meter run is under maintenance.
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Liq_NaturalGas This function block calculates volume correction factors for Natural gas
liquids (LNG/LPG ) according to API 11.2.4, API 11.2.2/11.2.2M and API
11.2.5. It takes input from the flow meter in terms of Pulse/flow rate and
calculate Gross Standard Volume, and Mass. The function block
supports base density from a offline densitometer and live measured
density from single/dual densitometer (fast loop). The block can take
inputs either in US or Metric systems. The base temperature and
pressure is 60 Deg F and 0 psig in US units. The base temperature is
302
Chapter 9 - Configuring Function Blocks
The function block has the capability to use keypad values when the live
values from field devices are out of range or communication with
devices is lost. The function block supports continuous operations and
reporting. The function block also supports maintainence mode totalizer
when meter run is under maintenance. In order to get accuracy as
stated in API 11.2.4, the RoundingMethod needs to be set as enabled (1
as part of the configuration).
The function block can be configured to use with external ST103A or the
native I/O of the ControlEdge RTU.
Input
Data
Input Parameter Description Apply to
types
MeterRunID Integer Identifier for the configured All
Meter Run.
Possible values 1 to 12
(Redundant), 1 to 4 (Non-
Redundant)
MeterType Integer Type of the flow meter: All
303
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
CorMtrAsDensiMtr Integer Option to set whether the All
Coriolis meter acts as
Densitometer. The values
should be either 1 for Yes or 0
for No. This parameter is
applicable only for Corolis meter
type.
ThermalExpansionFactor REAL Thermal expansion factor at Liq_
60°F. This input parameter is SpecialProducts
only applicable for Special
Products. For other commodity
types this parameter is not
present.
DensiMtrAvailable Integer Option to set whether the All
measured desity from live
Denstiometer is available or
offline base desity will be used .
The value should be either 1 for
Yes or 0 for No.
DensiMtrCount Integer The number of Densitometers All
available. The value should be
either 1 for Single or 2 for Dual
densitometer.
DensiTemp REAL Parameter to set the All
Densitometer temperature. The
value should be in Fahrenheit
for US unit and in Celcius for
Metric unit.
DensiTempLoLo REAL This is the LoLo limit for All
Densitometer temperature. The
value should be in Fahrenheit
for US unit and in Celcius for
Metric unit.
DensiTempLo REAL This is the Lo limit for All
Densitometer temperature. The
value should be in Fahrenheit
for US unit and in Celcius for
Metric unit.
304
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
DensiTempHi REAL This is the Hi limit for All
Densitometer temperature. The
value should be in Fahrenheit
for US unit and in Celcius for
Metric unit.
DensiTempHiHi REAL This is the HiHi limit for All
Densitometer temperature. The
value should be in Fahrenheit
for US unit and in Celcius for
Metric unit.
DensiTempIOSelection Integer I/O selection for Densitometer All
Temperature. The value should
be 1 for Live or 2 for Keypad
value.
DensiTempStsStatus USINT Analog input channel status for All
Densitometer Temperature.
305
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
DensiPressureHi REAL This is the Hi limit for All
Densitometer pressure. The
value should be in Psig for US
unit and in Kpag for Metric unit.
DensiPressureHiHi REAL This is the HiHi limit for All
Densitometer pressure.The
value should be in Psig for US
unit and in Kpag for Metric unit.
DensiTempIOSelection Integer I/O selection for Densitometer All
pressure. The value should be 1
for Live or 2 for Keypad value.
DensiPressStsStatus USINT Analog input channel status for All
Densitometer Pressure.
306
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
bad status.
Densi2Status USINT Status of Densitometer 2. The All
value should be 0 for good
status or any positive integer for
bad status.
PreferredDensiMtr Interger Parameter to select the All
preferred Densitometer. The
value should be 1 for
Densitometer 1 and 2 for
Densitometer 2.
DensiKeypadValue REAL Keypad value for Densitometer All
measured density. The value
should be in lb/ft^3 for US unit
and kg/m^3 for Metric unit. This
value should be a base density
value. When on-line live
densitometer status is bad, base
density will be used a keypad
value.
BaseDensity REAL Density at Base conditions. The All
value should be in lb/ft^3 for US
unit and kg/m^3 for Metric unit.
BaseTemperature REAL Temperature at Base All
conditions. The value should be
in Fahrenheit for US unit and in
Celcius for Metric unit. The
recommended default is 60 Deg
F for US and 15/20 Deg C for
Metric.
MeterFactor REAL Meter K factor to convert pulse All
form flow meter into volume.
The value should be in
pulse/ft^3 for US unit in
pulse/m^3 for Metric unit. When
the flow type is equal to analog,
this is the correction factor to
apply for volume calculation and
default value should be 1.0.
307
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
RoundingMethod Integer Option to enable or disable the All
rounding of output parameter
values. The value should be 0
for Disabled and 1 for Enabled.
Temp REAL Parameter to set the meter All
temperature. The value should
be in Fahrenheit for US unit and
in Celcius for Metric unit.
TempLoLo REAL This is the LoLo limit for meter All
temperature. The value should
be in Fahrenheit for US unit and
in Celcius for Metric unit.
TempLo REAL This is the Lo limit for meter All
temperature. The value should
be in Fahrenheit for US unit and
in Celcius for Metric unit.
TempHi REAL This is the Hi limit for meter All
temperature. The value should
be in Fahrenheit for US unit and
in Celcius for Metric unit.
TempHiHi REAL This is the HiHi limit for meter All
temperature. The value should
be in Fahrenheit for US unit and
in Celcius for Metric unit.
TempIOSelection Integer I/O selection for meter All
temperature. The value should
ne 1 for Live or 2 for Keypad
value.
TempStsStatus USINT Analog input channel status for All
meter temperature. The value
should be 0 for good or any
positive integer for bad status.
TempKeypadVal REAL Keypad value for meter All
temperature. The value that
should be used when the meter
temperature status is bad.
308
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Pressure REAL Parameter to set the meter All
pressure. The value should be
in Psig for US unit and in Kpag
for Metric unit.
PressureLoLo REAL This is the LoLo limit for meter All
pressure. The value should be
in Psig for US unit and in Kpag
for Metric unit.
PressureLo REAL This is the LoLo limit for meter All
pressure. The value should be
in Psig for US unit and in Kpag
for Metric unit.
PressureHi REAL This is the Hi limit for meter All
pressure.The value should be in
Psig for US unit and in Kpag for
Metric unit.
PressureHiHi REAL This is the HiHi limit for meter All
pressure. The value should be
in Psig for US unit and in Kpag
for Metric unit.
PressureIOSelection Integer I/O selection for meter pressure. All
The value should ne 1 for Live or
2 for Keypad value.
PressureStsStatus USINT Analog input channel status for All
meter pressure. The value
should be 0 for good status or
any positive integer for bad
status.
PressureKeypadVal REAL Keypad value for meter All
pressure. The value that should
be used when the meter
pressure status is bad.
PulseOrAnalogInput Integer Parameter to set the flow type. All
The value should be 0 for Pulse
and 1 for Analog.
IOType Interger Parameter to set the I/O type for All
309
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Pulse input. The value should
be 1 for ST103A (3rd party
hardware) and 2 for Native I/O.
LowPulseCutoff UINT Low pulse cutoff value checks All
the no flow condition in the
calculations. If the Pulse
increment is less than this
number, it will be considered as
no flow condition.
Pulse UDINT The pulse counter value. All
STMsgId UDINT Message ID from the ST103A All
device. This will be used as
heartbeat to know whether
ST103A is live and
communicating with
ControlEdge RTU. MessageID
will increment 2 in 1 seconds.
STWDWaitTime UINT Maximum wait time in seconds All
for the ST103A to restore the
connection after connection
failure with ControlEdge RTU.
Beyond this limit, pulse
increments will not be utliized in
volume calculations. The status
for hourly/daily/Batch totals will
be set to 1, i.e. the totals are
suspicious.
MaxPulseIncrement UDINT Maximum pulse increment limit. All
If the pulse increment is beyond
this limit, an alarm will be
generated.
Analog REAL Value of analog input if flow type All
is qual to Analog. The value
should be in lb^3/hr for US unit
or m^3/hr for Metric unit.
AnalogLoLo REAL This is the LoLo limit for analog All
input. The value should be in
lb^3/hr for US unit or m^3/hr for
310
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
Metric unit.
AnalogLo REAL This is the Lo limit for analog All
input. The value should be in
lb^3/hr for US unit or m^3/hr for
Metric unit
AnalogHi REAL This is the Hi limit for analog All
input. The value should be in
lb^3/hr for US unit or m^3/hr for
Metric unit.
AnalogHiHi REAL This is the HiHi limit for analog All
input. The value should be in
lb^3/hr for US unit or m^3/hr for
Metric unit.
AveragingVariable Integer Parameter to set the variable All
used for flow weighted
averaging. The value should be
0 for Gross Volume or 1 for
Mass. For Liquid EFM, the
averaging is based on flow
weighted.
ContractHour Integer Parameter represents the time All
of daily QTR generation, as the
day roll over to next day. Its
value should be from 0 to 23.
This has to be set according to
the contract.
OperationType Integer Parameter to set the type of All
Operation. The value should be
1 for Continuous or 2 for Batch.
When the operation type is
equal to Batch, by default batch
reporting and hourly reporting
within batch will be configured
automatically. When the mode
is continuous, hourly and daily
reports will be configured by
default.
311
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
MaintMode Integer Parameter to Start or Stop the All
Maintenance Mode. The value
should be either 0 for
Maintenance end or 1 for
Maintenance Start. When
Maintenance mode is started,
an independent totalizer will be
started and accumulate all the
flow until the maintenance mode
is stopped. During this period,
non-resettable totals,
hourly/daily/batch totals will be
not incremented.
BatchIdentifier Integer Identifier for a Batch operation. All
This number will be incremented
for every batch.
RetroKfactor Integer Parameter to set for All
recalculation of totals if proving
happens during a batch process
and totals are adjusted with new
Meter K factor. By default this
parameter is set enabled.
WaterAndSedMeasAvbl Integer Parameter to set whether the Liq_CrudeOil
Water and Sediments is
available for the Crude Oil. The
value should be 1 if available
otherwise 0.
WaterAndSediments REAL Parameter to set the percentage Liq_CrudeOil
of Water and Sediments present
in the Crude Oil.
WaterAndSedIOSel Integer I/O selection for Water and Liq_CrudeOil
Sediments value. The value
should be 1 for Live or 2 for
Keypad value.
WaterAndSedStatus USINT Analog input channel status for Liq_CrudeOil
Water and Sediments.The value
should be 0 for good status or
any positive integer for bad
312
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description Apply to
types
status.
WaterAndSedKeypad REAL Keypad value in percentage for Liq_CrudeOil
Water and Sediments. The
value that should be used when
the Water and Sediments status
is bad.
CPLCalcType Integer CPL Calculation Type. The Liq_NaturalGas
value should be 1 for None or 2
for API21.2 or 3 for API21.2M.
ConverCriteria REAL IP2 Convergence limit. Default Liq_NaturalGas
value is 0.001.
MaxIterations Integer IP2 Max loop limit. Default value Liq_NaturalGas
is 50.
IterationMethod Integer Main calculation method. The Liq_NaturalGas
value should be either 1 for
ASTM or 2 for IP2
VapourPrInput REAL Parameter to set the user Liq_NaturalGas
observed Vapour Pressure
Input.
VapourPrCalcMethod Integer Vapour Pressure calculation Liq_NaturalGas
options. The value should be 1
for None, 2 for User Observed
or 3 for API 11.2.5.
Lowflowcutoff REAL Low flow cutoff value checks the All liquid types
no flow condition in the function blocks in
calculations. If the flow is s less API21.2_V2
than this number, it will be library.
considered as no flow condition.
Unit is m3/hr for Metric unit,
ft3/hr for US unit.
313
Chapter 9 - Configuring Function Blocks
Output
Data Apply
Input Parameter Description
types to
Out_Code Integer This out parameter returns success or fail All
code. The value will be 0 for success or -1
for Exception or +ve value for Error codes.
BaseDensityComputed LREAL Density at Base conditions. The value will be All
in lb/ft^3 for US unit and in kg/m^3 for Metric
unit.
MeterDensity LREAL Density at measurement or metering All
conditions. The value will be in lb/ft^3 for US
unit and in kg/m^3 for Metric unit.
ObservedDensity LREAL Observed Density or measured density. The All
value will be in lb/ft^3 for US unit and in
kg/m^3 for Metric unit.
NetStdVolume LREAL This parameter is Net Standard volume All
increment. It is in ft^3/sec for US unit system
and in m^3/sec for Metric unit system.
GrossStdVolume LREAL This parameter is Gross Standard volume All
increment. It is in ft^3/sec for US unit system
and in m^3/sec for Metric unit system.
SedAndWaterVolume LREAL This parameter is Sediment And Water All
volume increment. It is in ft^3/sec for US unit
system and in m^3/sec for Metric unit
system.
CTL LREAL Correction factor for effects of temperature All
on the liquid.
CPL LREAL Correction factor for effects of pressure on All
the liquid.
Mass LREAL This parameter is mass increment. It is in All
lb/sec for US unit system and in kg/sec for
Metric unit system.
AvgCTLLH LREAL Average CTL for the previous hour. All
AvgCTLLDOrBat LREAL Average CTL for the previous day or Batch. All
AvgCPLLH LREAL Average CPL for the previous hour. All
314
Chapter 9 - Configuring Function Blocks
Data Apply
Input Parameter Description
types to
AvgCPLLDOrBat LREAL Average CTL for the previous day or Batch. All
AvgObsDenLH LREAL Average Observed Density for the previous All
hour.
AvgObsDenLDOrBat LREAL Average Observed Density for the previous All
day or Batch.
AvgTempLH LREAL Average Temperature for the previous hour. All
AvgTempLDOrBat LREAL Average Temperature for the previous day All
or Batch.
AvgPressLH LREAL Average Pressure for the previous hour. All
AvgPressLDOrBat LREAL Average Pressure for the previous day or All
Batch.
AvgBaseDenLH LREAL Average Base Density for the previous hour. All
AvgBaseDenLDOrBat LREAL Average Base Density for the previous day All
or Batch.
SwVTH LREAL Sediments And Water volume total for this All
hour.
SwVLH LREAL Sediment And Water volume total for last All
hour.
SwVTDOrBat LREAL Sediment And Water volume total for this All
day or Batch.
SwVLDOrBat LREAL Sediment And Water volume total for last All
day or Batch.
NSVTH LREAL Net Standard volume total for this hour. All
NSVLH LREAL Net Standard volume total for last hour. All
NSVTDOrBat LREAL Net Standard volume total for this day or All
Batch
NSVLDOrBat LREAL Net Standard volume total for last day or All
Batch
MassTH LREAL Mass total for this hour. All
MassLH LREAL Mass total for last hour. All
315
Chapter 9 - Configuring Function Blocks
Data Apply
Input Parameter Description
types to
MassTDOrBat LREAL Mass total for this day or batch. All
MassLDOrBat LREAL Mass total for last day or batch. All
GSVTH LREAL Gross Standard volume total for this hour. All
GSVLH LREAL Gross Standard volume total for last hour. All
GSVTDOrBat LREAL Gross Standard volume total for this day or All
Batch.
GSVLDOrBat LREAL Gross Standard volume total for last day or All
Batch.
SwVMaint LREAL Sediments And Water volume total for this All
hour in Maintenance mode.
NSVMaint LREAL Net Standard volume total in Maintenance All
mode.
MassMaint LREAL Mass total in Maintenance mode. All
GSVMaint LREAL Gross Standard volume total in Maintenance All
mode.
SwVNR LREAL Non-Resettable Sediment And Water All
volume total.
NSVNR LREAL Non-Resettable Net Standard volume total. All
MassNR LREAL Non-Resettable Mass total. All
GSVNR LREAL Non-Resettable Gross Standard volume All
total.
SwVNRRollover Integer Rollover flag for Non-Resettable Sediments All
And Water volume total. The value 1
indicates Rollover otherwise 0. The value for
roll-over is 999,999,999. The rollover flag
will be on 5 times interval time.
NSVNRRollover Integer Rollover flag for Non-Resettable Net All
Standard volume total. The value 1 indicates
Rollover otherwise 0. The value for roll-over
is 999,999,999. The rollover flag will be on 5
times interval time.
MassNRRollover Integer Rollover flag for Non-ResettableMass total. All
The value 1 indicates Rollover otherwise 0.
316
Chapter 9 - Configuring Function Blocks
Data Apply
Input Parameter Description
types to
The value for roll-over is 999,999,999. The
rollover flag will be on 5 times interval time.
GSVNRRollover Integer Rollover flag for Non-ResettableGross All
Standard volume total. The value 1 indicates
Rollover otherwise 0. The value for roll-over
is 999,999,999. The rollover flag will be on 5
times interval time.
StatusTH Integer Status of the period total for the this hour. All
The value will be 0 for good status or 1 for
bad status.
StatusTD Integer Status of the period total for the this day. The All
value will be 0 for good status or 1 for bad
status.
STIOReset Integer This parameter indicates whether the All
ST103A is restarted or not. The value will be
0 for false or 1 for true. The reset flag will be
on for 5 times of interval time.
NOTE: If the flow type Input is Analog, operation type Batch is not
supported.
Data type
See the following data types for detailed information:
317
Chapter 9 - Configuring Function Blocks
PULSE_INPUT_TYPE_DUAL :
STRUCT
GOOD_PULSE : UDINT; (* Good
Pulse*)
END_STRUCT;
END_TYPE
FREQUENCY_INPUT_TYPE TYPE
FREQUENCY_INPUT_TYPE :
STRUCT
STS : USINT; (*Status*)
PV : REAL; (* Frequency *)
318
Chapter 9 - Configuring Function Blocks
ANALOG_INPUT_TYPE _TP :
STRUCT
STS : USINT; (*Status*)
PV : REAL; (* Value *)
EUHI:REAL(* Range Hi *)
EULO: REAL (*Range Low *)
EUHIEX:REAL (*Range Hi Extended *)
EULOEX:REAL (*Range Low Extended
*)
END_STRUCT;
END_TYPE
BATCH_TOTALISE_STRUCT TYPE
BATCH_TOTALISE_STRUCT :
STRUCT
BATCHMODE :INT;
END_STRUCT;
END_TYPE
Error Codes
See the following table for error codes for the function blocks Liq_CrudeOil ,
Liq_RefinedProducts,Liq_LubricatingOil and Liq_SpecialProducts :
319
Chapter 9 - Configuring Function Blocks
See the following table for error codes for the function block LIQ_
Naturalgas:
320
Chapter 9 - Configuring Function Blocks
321
Chapter 9 - Configuring Function Blocks
LiquidStationTotalizer
Description
The LiquidStationTotalizer function block calculates the meter station totals
for the multiple streams connected to the Station. The Station totals are
calculated by adding relevant individual totals from each stream and
totalizing them to create Station totals. Station totalizer by default totalizes
gross standard volume, net standard volume, mass and water and
sediments volume. The station totalizer by default generates hourly and
daily QTR similar to any other meter runs.
Input
Data
Input Parameter Description
Type
MeterRunID INT Identifier for the configured Meter Run.
MeterType INT Type of the meter. The value should be {5} for Station
Totalizer.
ContractHour INT This value represents the hour on which a day roll over for
reporting. Its value should be from 0 to 23.
SwVTH1 LREAL Sediments And Water volume total for this hour for the first
meter run.
SwVTDOrBat1 LREAL Sediment And Water volume total for this day or Batch for the
first meter run.
SwVNR1 LREAL Non-Resettable Sediment And Water volume total for the first
meter run.
NSVTH1 LREAL Net Standard volume total for this hour for the first meter run.
NSVTDOrBat1 LREAL Net Standard volume total for this day or Batch for the first
meter run.
322
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
Type
NSVNR1 LREAL Non-Resettable Net Standard volume total for the first meter
run.
MassTH1 LREAL Mass total for this hour for the first meter run.
MassTDOrBat1 LREAL Mass total for this day or batch for the first meter run.
MassNR1 LREAL Non-Resettable Mass total for the first meter run.
GSVTH1 LREAL Gross Standard volume total for this hour for the first meter
run.
GSVTDOrBat1 LREAL Gross Standard volume total for this day or Batch for the first
meter run.
GSVNR1 LREAL Non-Resettable Gross Standard volume total for the first meter
run.
StatusTH1 INT Status of the calculation for this hour for the first meter run. The
value will be {0} for Status good or {1} for bad status.
StatusTD1 INT Status of the calculation for the this day for the first meter run.
The value will be {0} for Status good or {1} for bad status.
SwVTH2 LREAL Sediments And Water volume total for this hour for the second
meter run.
SwVTDOrBat2 LREAL Sediment And Water volume total for this day or Batch for the
second meter run.
SwVNR2 LREAL Non-Resettable Sediment And Water volume total for the
second meter run.
NSVTH2 LREAL Net Standard volume total for this hour for the second meter
run.
NSVTDOrBat2 LREAL Net Standard volume total for this day or Batch for the second
meter run.
NSVNR2 LREAL Non-Resettable Net Standard volume total for the second
meter run.
MassTH2 LREAL Mass total for this hour for the second meter run.
MassTDOrBat2 LREAL Mass total for this day or batch for the second meter run.
MassNR2 LREAL Non-Resettable Mass total for the second meter run.
GSVTH2 LREAL Gross Standard volume total for this hour for the second meter
323
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
Type
run.
GSVTDOrBat2 LREAL Gross Standard volume total for this day or Batch for the
second meter run.
GSVNR2 LREAL Non-Resettable Gross Standard volume total for the second
meter run.
StatusTH2 INT Status of the calculation for this hour for the second meter run.
The value will be {0} for Status good or {1} for bad status.
StatusTD2 INT Status of the calculation for the this day for the second meter
run. The value will be {0} for Status good or {1} for bad status.
SwVTH3 LREAL Sediments And Water volume total for this hour for the third
meter run.
SwVTDOrBat3 LREAL Sediment And Water volume total for this day or Batch for the
third meter run.
SwVNR3 LREAL Non-Resettable Sediment And Water volume total for the third
meter run.
NSVTH3 LREAL Net Standard volume total for this hour for the third meter run.
NSVTDOrBat3 LREAL Net Standard volume total for this day or Batch for the third
meter run.
NSVNR3 LREAL Non-Resettable Net Standard volume total for the third meter
run.
MassTH3 LREAL Mass total for this hour for the third meter run.
MassTDOrBat3 LREAL Mass total for this day or batch for the third meter run.
MassNR3 LREAL Non-Resettable Mass total for the third meter run.
GSVTH3 LREAL Gross Standard volume total for this hour for the third meter
run.
GSVTDOrBat3 LREAL Gross Standard volume total for this day or Batch for the third
meter run.
GSVNR3 LREAL Non-Resettable Gross Standard volume total for the third
meter run.
StatusTH3 INT Status of the calculation for this hour for the third meter run.
The value will be {0} for Status good or {1} for bad status.
StatusTD3 INT Status of the calculation for the this day for the third meter run.
324
Chapter 9 - Configuring Function Blocks
Data
Input Parameter Description
Type
The value will be {0} for Status good or {1} for bad status.
SwVTH4 LREAL Sediments And Water volume total for this hour for the fourth
meter run.
SwVTDOrBat4 LREAL Sediment And Water volume total for this day or Batch for the
fourth meter run.
SwVNR4 LREAL Non-Resettable Sediment And Water volume total for the
fourth meter run.
NSVTH4 LREAL Net Standard volume total for this hour for the fourth meter run.
NSVTDOrBat4 LREAL Net Standard volume total for this day or Batch for the fourth
meter run.
NSVNR4 LREAL Non-Resettable Net Standard volume total for the fourth meter
run.
MassTH4 LREAL Mass total for this hour for the fourth meter run.
MassTDOrBat4 LREAL Mass total for this day or batch for the fourth meter run.
MassNR4 LREAL Non-Resettable Mass total for the fourth meter run.
GSVTH4 LREAL Gross Standard volume total for this hour for the fourth meter
run.
GSVTDOrBat4 LREAL Gross Standard volume total for this day or Batch for the fourth
meter run.
GSVNR4 LREAL Non-Resettable Gross Standard volume total for the fourth
meter run.
StatusTH4 INT Status of the calculation for this hour for the fourth meter run.
The value will be {0} for Status good or {1} for bad status.
StatusTD4 INT Status of the calculation for the this day for the fourth meter
run. The value will be {0} for Status good or {1} for bad status.
Output
Output
Description Description
Parameter
Out_Code INT This out parameter returns success or fail code. The value
wll be {0} for success or {1} for Exception or {+ve value} for
325
Chapter 9 - Configuring Function Blocks
Output
Description Description
Parameter
Error codes.
SwVTH LREAL Sum of Sediments And Water volume total for this hour for
meter runs configured for station total.
SwVTDOrBat LREAL Sum of Sediment And Water volume total for this day or
Batch for station total.
SwVNR LREAL Sum of Non-Resettable Sediment And Water volume total
for station total.
NSVTH LREAL Sum of Net Standard volume total for this hour for station
total.
NSVTDOrBat LREAL Sum of Net Standard volume total for this day or Batch for
station total.
NSVNR LREAL Sum of Non-Resettable Net Standard volume total for
station total.
MassTH LREAL Sum of Mass total for this hour for station total.
MassTDOrBat LREAL Sum of Mass total for this day or batch for station total.
MassNR LREAL Sum of Non-Resettable Mass total for station total.
GSVTH LREAL Sum of Gross Standard volume total for this hour for station
total.
GSVTDOrBat LREAL Sum of Gross Standard volume total for this day or Batch
for station total.
GSVNR LREAL Sum of Non-Resettable Gross Standard volume total for
station total.
StatusTH INT Overall status of the calculation for this hour for station total.
The value will be {0} for Status good or {1} for bad status.
StatusTD INT Overall status of the calculation for the this day for station
total. The value will be {0} for Status good or {1} for bad
status.
326
Chapter 9 - Configuring Function Blocks
Analog_AI_Process
Description
Function block to preprocess the data from the analog input channel of the
ST103A device before the data is used with API21.2 function blocks. The
general preprocessing includes scaling and analog input status
determination.
Input
Input Data
Description
Parameter Type
AI REAL Value read from analog input channel of ST103A device.
EUHi REAL This is the Hi limit for analog input in Engineering units.
EULo REAL This is the Lo limit for analog input in Engineering units.
EUHiHi REAL This is the HiHi limit for analog input in Engineering units.
EULoLo REAL This is the LoLo limit for analog input in Engineering units.
ST103Status INT Status of ST103A device. The value will be {0} for status good or
{1} for communication with ST103A is lost.
Output
Output Data
Description
Parameter Type
PV REAL Process value of the specific analog input channel in scaled to
engineering units.
Status USINT Status of the analog input channel.
Possible values:
0-Channel is good.
12- The value is higher than the high range value but lower than the
extended high range value.
327
Chapter 9 - Configuring Function Blocks
Output Data
Description
Parameter Type
13- The value is lower than the low range value but higher than the
extended low range value.
14- The value is lower than than the extended low range value.
ST103A_Process
Description
Function block to check the connection status of the ST103A device before
the data is used with API21.2 function blocks.
Input
Input Parameter Data Type Description
STMsgld UDINT Message ID from ST103A device
Output
Output Parameter Data Type Description
Status USINT Status of the ST103A device
Possible values:
0-Good status
328
Chapter 9 - Configuring Function Blocks
Volume_Correction_FB
Description
This function block computes the corrected Volume for the given CTL and
CPL.
Input
Parameter Data type Description
CTL LREAL Correction factor for effects of temperature on the liquid.
CPL LREAL Correction factor for effects of pressure on the liquid.
MeteredVol LREAL Recorded metered volume by the master meter.
Output
Parameter Data type Description
CorrVol_AtCtlCpl LREAL The corrected volume at this CTL and CPL.
Flowrate_Calc
Description
Function block to compute the flow rate.
Input
Data
Parameter Description
Type
IncCalcVal LREAL The incremental calculated volume or mass to compute the flow
rate.
ExecTime INT Execution time in seconds.
329
Chapter 9 - Configuring Function Blocks
Output
Parameter Data Type Description
Flowrate LREAL Flow rate computed in m^3/hr.
330
CHAPTER
This chapter provides details for meter run register range, offset and
register description.
In this section:
331
Chapter 10 - EFM meter run registers
Hourly Hourly/
(Interval)/ Daily Alarm AE Boolean Integer Long
Purpose Float
Daily Archive Archive Pointer Range Range Integer
Archive pointers
Run 1 701 - 702 7001- 32 7041 1100 to 3100 to 5100 to 7100
7002 1199 3199 5199 to
7349
Run 2 703 to 7003- 32 7041 1200 to 3200 to 5200 to 7350
704 7004 1299 3299 5299 to
7599
Run 3 705 to 7005- 32 7041 1300 to 3300 to 5300 to 7600
706 7006 1399 3399 5399 to
7849
Run 4 707 to 7007- 32 7041 1400 to 3400 to 5400 to 7850
708 7008 1499 3499 5499 to
8099
Run 5 709 to 7009- 32 7041 1500 to 3500 to 5500 to 8100
710 7010 1599 3599 5599 to
8349
Run 6 711 to 7011- 32 7041 1600 to 3600 to 5600 to 8350
712 7012 1699 3699 5699 to
8599
Run 7 713 to 7013- 32 7041 1700 to 3700 to 5700 to 8600
714 7014 1799 3799 5799 to
8849
Run 8 715 to 7015- 32 7041 1800 to 3800 to 5800 to 8850
332
Chapter 10 - EFM meter run registers
Hourly Hourly/
(Interval)/ Daily Alarm AE Boolean Integer Long
Purpose Float
Daily Archive Archive Pointer Range Range Integer
Archive pointers
716 7016 1899 3899 5899 to
9099
Run 9 717 to 7017- 32 7041 1900 to 3900 to 5900 to 9100
718 7018 1999 3999 5999 to
9349
Run 10 719 to 7019- 32 7041 2000 to 4000 to 6000 to 9350
720 7020 2099 4099 6099 to
9599
Run 11 721 to 7021- 32 7041 2100 to 4100 to 6100 to 9600
722 7022 2199 4199 6199 to
9849
Run 12 723 to 7023- 32 7041 2200 to 4200 to 6200 to 9850
724 7024 2299 4299 6299 to
10099
Purpose Boolean Offset Integer Offset Long Integer Offset Float Offset
Run 1 0 0 0 0
Run 2 100 100 100 250
Run 3 200 200 200 500
Run 4 300 300 300 750
Run 5 400 400 400 1000
Run 6 500 500 500 1250
Run 7 600 600 600 1500
Run 8 700 700 700 1750
Run 9 800 800 800 2000
333
Chapter 10 - EFM meter run registers
Purpose Boolean Offset Integer Offset Long Integer Offset Float Offset
Run 10 900 900 900 2250
Run 11 1000 1000 1000 2500
Run 12 1100 1100 1100 2750
System events
The system events registers are for event reference and cannot be read.
System events table is as follows.
334
Chapter 10 - EFM meter run registers
335
Chapter 10 - EFM meter run registers
336
Chapter 10 - EFM meter run registers
337
Chapter 10 - EFM meter run registers
338
Chapter 10 - EFM meter run registers
339
Chapter 10 - EFM meter run registers
340
Chapter 10 - EFM meter run registers
341
Chapter 10 - EFM meter run registers
342
Chapter 10 - EFM meter run registers
343
Chapter 10 - EFM meter run registers
344
Chapter 10 - EFM meter run registers
345
Chapter 10 - EFM meter run registers
346
Chapter 10 - EFM meter run registers
Bit Description
0 Fixed value changed bit
1 NoFlow=1 Flow=0
2 KeyPad SET=1 RST=0
3 Operator entry work value
4 Error Alarm SET=1 RST=0
5 Fixed or variable flag
6 Maintainance Alarm SET=1 RST=0
7 System command change bit
8 Maxpulse Increment/Retrospective K Factor Alarm SET=1 RST=2
9 Operator change identified bit , 1 for events
10 LoLo bit
11 Lo bit
12 Hi bit
13 HiHi bit
14 Rate of change limit
15 l 1 = Alarm Set
l 0 = Alarm Reset
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
347
Chapter 10 - EFM meter run registers
From the table we see that bit 15 (alarm) and bit 12 (HI) are set. Thus it is a
HI Alarm.
See the following table for the alarm or event type and its alarm state as
well as event state:
348
Chapter 10 - EFM meter run registers
349
Notices
NOTICES
Trademarks
Experion® is a registered trademark of Honeywell International, Inc.
ControlEdge™ is a trademark of Honeywell International, Inc.
OneWireless™ is a trademark of Honeywell International, Inc.
Other trademarks
Microsoft and SQL Server are either registered trademarks or trademarks
of Microsoft Corporation in the United States and/or other countries.
Trademarks that appear in this document are used only to the benefit of the
trademark owner, with no intention of trademark infringement.
Third-party licenses
This product may contain or be derived from materials, including software,
of third parties. The third party materials may be subject to licenses,
notices, restrictions and obligations imposed by the licensor. The licenses,
notices, restrictions and obligations, if any, may be found in the materials
accompanying the product, in the documents or files accompanying such
third party materials, in a file named third_party_licenses on the media
containing the product, or at http://www.honeywell.com/en-us/privacy-
statement.
Documentation feedback
You can find the most up-to-date documents in the Support section of the
Honeywell Process Solutions website at:
https://process.honeywell.com/us/en/support/product-documents-
downloads
If you have comments about Honeywell Process Solutions documentation,
send your feedback to: [email protected]
Use this email address to provide feedback, or to report errors and
omissions in the documentation. For immediate help with a technical
problem, contact HPS Technical Support through your local Customer
Contact Center, or by raising a support request on the Honeywell Process
Solutions Support website.
350
Notices
Support
For support, contact your local Honeywell Process Solutions Customer
Contact Center (CCC). To find your local CCC visit the website,
https://process.honeywell.com/us/en/contact-us.
Training classes
Honeywell holds technical training classes that are taught by process
control systems experts. For more information about these classes, contact
your Honeywell representative, or see http://www.automationcollege.com.
351
Notices
352