Api 2540-2004 PDF
Api 2540-2004 PDF
Api 2540-2004 PDF
User Manual
(QER 03Q008)
Form A6138
May 2004
API2540 Liquid Volume Correction User Program
May 2004
This manual may be revised from time to time to incorporate new or updated information. The
revision level of each page is indicated at the bottom of the page opposite of the page number. A
change in revision level to any page also changes the date of the manual that appears on the front
cover. Listed below is the revision level of each page.
Page Revision
FloBoss and ROCLINK are marks of one of the Emerson Process Management companies. The Emerson logo is a trademark and service
mark of Emerson Electric Co. All other marks are the property of their respective owners.
While this information is presented in good faith and believed to be accurate, Fisher Controls does not guarantee satisfactory results from
reliance upon such information. Nothing contained herein is to be construed as a warranty or guarantee, express or implied, regarding the
performance, merchantability, fitness or any other matter with respect to the products, nor as a recommendation to use any product or
process in conflict with any patent. Fisher Controls reserves the right, without notice, to alter or improve the designs or specifications of the
products described herein.
ii Rev
Rev05/03
05/04
API2540 Liquid Volume Correction User Program
Table of Contents
Page
1 Getting Started..................................................................................................................................... 1-1
1.1 Scope of this Manual ......................................................................................................... 1-1
1.2 Organization of this Manual.............................................................................................. 1-1
1.3 API2540 Liquid Volume Correction User Program Overview......................................... 1-1
1.4 Domain Limitations Handling........................................................................................... 1-2
1.5 Program Names and Versions ........................................................................................... 1-3
2 Installing the User Program................................................................................................................. 2-1
2.1 Customizing ROCLINK.................................................................................................... 2-1
2.2 Downloading the User Program ........................................................................................ 2-2
2.3 Update Firmware ............................................................................................................... 2-5
2.3.1 Altering Your .LST File ..................................................................................... 2-7
3 Configuring the User Program ............................................................................................................ 3-1
3.1 API2540 Setup................................................................................................................... 3-1
3.1.1 Calculations ........................................................................................................ 3-3
3.1.2 Volume-Time Snapshot...................................................................................... 3-4
3.1.3 Alarms ................................................................................................................ 3-5
3.1.4 Inputs .................................................................................................................. 3-6
3.1.5 Slippage Factors ................................................................................................. 3-7
3.2 Data Transfer ..................................................................................................................... 3-8
Appendix A Standards........................................................................................................................... A-1
Appendix B Domain Violations .............................................................................................................B-1
Appendix C Engineering Units ..............................................................................................................C-1
Index ........................................................................................................................................................ I-1
iv Rev 05/03
API2540 Liquid Volume Correction User Program
1 GETTING STARTED
This manual assumes that the user is familiar with the ROC300-series and FloBoss 407 units and their
configuration. For additional information, refer to the:
♦ Type ROC306/ROC312 Remote Operations Controller Instruction Manual (Form A4630).
♦ Type ROC364 Remote Operations Controller Instruction Manual (Form A4193).
♦ FloBoss 407 Flow Manager Instruction Manual (Form A6013).
♦ RL101 ROCLINK Configuration Software User Manual (Form A6051).
NOTE: “ROC” is used in this manual to stand for all ROC and FloBoss devices.
Rev 05/04
1-1 Rev 05/03
API2540 Liquid Volume Correction User Program
The Liquid Correction Program accumulates the volume of the flowing fluid and can be configured to
perform calculations for up to three different flows in the ROC306 and ROC312, five flows in the
ROC364, or four flows in the FloBoss 407.
The Liquid Correction Program tracks two accumulated volumes for each flow. One accumulation is
the volume since contract hour or last manual reset and the second accumulation is a running total that
rolls over at 9,999,999. At contract hour or manual reset, flow and minutes today are transferred to
flow and minutes yesterday.
Whenever a domain violation occurs, an error message displays and stored in the Event Log, with the
ERR tag, the Domain Limit as “old value”, and the Current Value of the parameter. When the violation
clears, “No Error” displays and a clear event is logged with the CLR tag. A real-time stamp is
appended to each event. In error mode, calculations use the closest domain formulas.
NOTE: Further interpretation of the volumes calculated and accumulated during domain violation
periods is the user’s sole responsibility.
Because domain limits for flowing pressure corrections and flowing temperature corrections overlap,
the Liquid Correction Program assumes temperature-driven domain below 500 kPa (75 PSIA) and
pressure-driven domain above 500 kPa. The associated error is less than 50 PPM.
User User
Program Name Code Blocks Data Blocks ROC or FloBoss Version
Task Point
api_3a.h00 3 28-29 C0000-CFFFF A0000-ABFFF ROC306/312/364
FlashPAC versions 2.12
and 2.20
apitbl3a.h00 3 28-29 C0000-CFFFF A0000-ABFFF ROC306/312/364
FlashPAC versions 2.12
and 2.20
api_3b.h00 3 28-29 D0000-DFFFF B4000-BFFFF ROC306/312/364
FlashPAC versions 2.12
and 2.20
apitbl3b.h00 3 28-29 D0000-DFFFF B4000-BFFFF ROC306/312/364
FlashPAC versions 2.12
and 2.20
api3a_ic.h00 3 28-29 A0000-AFFFF B0000-BBFFF ROC306/312 FlashPAC
versions 2.12 and 2.20 for
Industry Canada
ap3tblic.h00 3 28-29 A0000-AFFFF B0000-BBFFF ROC306/312 FlashPAC
versions 2.12 and 2.20 for
Industry Canada
api4a_ic.h00 3 28-29 60000-6FFFF 70000-7BFFF FloBoss 407 version 1.08
for Industry Canada
ap4tblic.h00 3 28-29 60000-6FFFF 70000-7BFFF FloBoss 407 version 1.08
for Industry Canada
api_4a.h00 3 28-29 C0000-CFFFF 74000-7FFF FloBoss 407, version 1.08
apitbl4a.h00 3 28-29 C0000-CFFFF 74000-7FFF FloBoss 407, version 1.08
api_4b.h00 3 28-29 B0000-BFFFF 60000-6BFFF FloBoss 407, version 1.08
apitbl4b.h00 3 28-29 B0000-BFFFF 60000-6BFFF FloBoss 407, version 1.08
This section describes how to download and install the user program into the ROC306/312/364 with a
FlashPAC (version 2.12 or greater) and FloBoss 407 Flow Manager (version 1.08 or greater), using
ROCLINK for DOS Configuration Software (version 2.23). For additional information on
downloading the program, checking memory allocation, and enabling the program, refer to the RL101
ROCLINK Configuration Software User Manual (Form A6051).
ROCLINK for DOS requires several files to use the API2540 Liquid Volume Correction User
Program:
1. Navigate to the CD-ROM directory where the gas flow calculation installation files are
located. Program files are typically located in the Program Files/ROCLINK Files folder on
the CD-ROM.
2. Select and Copy the following files:
♦ menu3.txt
♦ menu4.txt
♦ scl_api1.tpl
♦ scl_reg1.tpl
♦ tlplist.txt
6. De-select the Read-only Attribute for each program file that has the Read-only Attribute set.
If the files remain Read-only, ROCLINK will not connect to the ROC or FloBoss.
7. Click OK.
NOTE: Customize ROCLINK before downloading the user program.
4. Determine the Unused Memory Blocks. The memory location must be available for the
specific user program that you are loading.
5. Determine whether program A or B is required. The A and B programs are identical other than
the location in which they load into ROC memory. Refer to Table 1-1.
6. Click DownLoad and select the user program file to download from the CD-ROM. Program
files are typically located in the Program Files/ROCLINK Files folder. The Open File dialog
displays the names of all the files that have the .H00 extension.
NOTE: You must download two user programs. Refer to Table 1-1, Versions and
Program Names.
7. Select the User Program file you desire to load and click OK.
Device User Program Names
ROC306/312/364 api_3a.h00 and apitbl3a.h00
ROC306/312/364 api_3b.h00 and apitbl3b.h00
ROC306/312 api3a_ic.h00 and ap3tblic.h00
(Industry Canada)
FloBoss 407 api_4a.h00 and apitbl4a.h00
FloBoss 407 api_4b.h00 and apitbl4b.h00
FloBoss 407 api4a_ic.h00 and ap4tblic.h00
(Industry Canada)
9. Select the User Program file you desire to load and click OK.
10. Click DownLoad to download the selected user programs.
After the user program is loaded, the user program is automatically turned on. This
automatically enables the program run Flags and performs a Warm Start. The Status field
displays ON or OFF indicating the Status of the user program.
NOTE: Only one user program displays even though you installed two programs.
10. Select Active under the Calc User Program option. Refer to Figure 2-7.
11. Ensure that the Write to EEPROM button displays Yes. Refer to Figure 2-7.
12. Click Save. This ensures that the program automatically restarts after a Cold Start.
NOTE: Remember to de-select the Read-only Property of all user program files. Refer to
Figure 2-2.
If the firmware version does not match the recommended version displayed in Table 1-1: Versions and
Program Names, proceed with the following firmware update procedure. The firmware is available
from your sales representative or from technical support.
Update Firmware updates the internal firmware Flash memory of the FloBoss 407 or the ROC300-
series FlashPAC by loading it from a file.
NOTE: The Update Firmware procedure clears the configuration of the ROC or FloBoss and
reloads configuration from EEPROM after the update procedure is completed. The Event Log,
Alarm Log, Audit Log, and History logs are cleared. To preserve the contents of the logs, be sure
to save them to a file (Collect ROC Data) before starting. The Event, Alarm, and History Logs
cannot be reloaded.
1. Create a backup of the log data using File > Collect ROC Data > All.
2. Save all FSTs to a disk file.
3. Select System > Flags. Refer to Figure 2-7.
4. Click Write to EEPROM and click Save and wait for the save process to complete. This may
take several minutes for ROC300-series units.
5. Read the README text file included with the firmware update.
6. Select File > Update Firmware.
Rev 05/03 2-5
API2540 Liquid Volume Correction User Program
7. Navigate to the location of the firmware File Name in the Open File dialog box.
You can change the path to the directory containing the file using the Directory / Drive field
using the <Enter> key or by double-clicking on a different drive or directory. Select “..” to
move up a directory. The Open File dialog displays the names of all files with the .LST
extension located in the current directory.
8. Select the desired file in the Files list and click OK to start the Update Firmware process.
NOTE: If you receive an error such as “File gas85.fsr is missing or bad,” refer to Section
2.3.1, Altering Your .LST File, on page 2-7.
The file begins loading, with the Status Line displaying the progress in four categories:
Segment, Address, Block Size, and Total Sent. While Flash memory is being modified, the
I/O is not read, but is held at the last values.
The loading process typically takes several minutes; do not disturb it during this time. If
you are running ROCLINK under Windows 95/98, you can adjust the miscellaneous
properties of the ROCLINK window to allow you to leave the window without interrupting
the download (Allow Screen Saver and Always Suspend should not be selected, and Idle
Sensitivity should be set to Low).
13. Click Save to reload the configuration from EEPROM. Refer to Figure 2-7.
14. Check the configuration and the FSTs. If the configurations are incorrect, reload the
configuration and the FSTs from the files previously created.
2. Change the path to reflect the same directory where you copied the upgrade files. Be careful
not to alter the file names.
3. Save your changes and exit Notepad.
Point Tag – Enter a ten-character name used to label the meter run upon which the flow computation
is performed.
Domain Status – Current Domain Status, such as violations, inactive, or everything within limits.
Statuses are archived in Event Log. Refer to Appendix B, Domain Violations, for error messages.
Units – Click to select US (English / Imperial) units or Metric units for calculations. If Metric units are
selected, then the calculation expects all inputs to be in terms of the indicated units (such as KPa
for the Static Pressure input).
Metric US
Liquid Type
Low Density High Density Low Density High Density
Crude Oil below 610.5 kg/m3 above 1075 kg/m3 above 100 deg API below 0 deg API
Gasoline * below 653 kg/m3 above 770.5 kg/m3 above 85 deg API below 52 deg API
Jet Fuel* below 787.5 kg/m3 above 829 kg/m3 above 48 deg API below 37 deg API
Diesel* below 829 kg/m3 above 1075 kg/m3 above 40 deg API below 0 deg API
LPG below 495 kg/m3 above 610.5 kg/m3 above 155 deg API below 100 deg API
Transition* below 771 kg/m3 above 787 kg/m3 above 52 deg API below 48 deg API
Low
NOTE: *Domain violations are triggered at contract conditions. The program automatically
switches to the proper operating range, using the corrected density value, when one of the indicated
ranges is selected.
Calc Vapor Prs – Click to unlock (Yes) or lock (No) the calculated vapor pressure feature. When the
Liquid Type is Gasoline, Condensate, or LPG, the Calc Vapor Prs option is unlocked (Yes), for all
other liquids it is locked (No).
Scan Period – 50-millisecond interval the flow is set to run. When it is set to less than 10ms, the flow
does not run, and the “Not Active !!!” message displays. You must reset this parameter with the
number of flows, particular configuration of the liquid flow, and general configuration of the ROC.
Scan Time – Value calculated and displayed by the ROC for each scan, in seconds. If an unrealistic
setting is in place for the Scan Period, the ROC cannot keep the calculation speed in place with the
desired value, so significant differences will occur between the Scan Period and Scan Time, with a
correspondent increase in Central Processor Unit (CPU) loading.
Meter Input – Select the Meter Input: Volume or Mass. When the Meter Type is Orifice Plate, the
Meter Input is always Volume.
Static Press Tap – Select if the Static Pressure is Downstream or Upstream of the orifice plate.
Pipe Diam – Internal diameter of the pipe entered in millimeters or inches. Meter Type Orifice Plate
only.
Orifice Diameter – Diameter of the orifice entered in millimeters or inches. Meter Type Orifice Plate
only.
Viscosity – Viscosity of the flowing fluid at base conditions (cP or Lbm/Ft-s). Meter Type Orifice
Plate only.
3.1.1 Calculations
Select API2540 > API 2540 Setup and click Calculations to define the Accum Reset Mode, and also
clear the accumulated values. The calculated values of Density and Correction Factors also display.
Densities
Input Value – Displays actual input read (or set) density in kg/m3, lbm/cft, or Deg API.
Flow Conditions – Displays actual flow density used in calculations in kg/m3, lbm/cft, or Deg
API.
At Contract – Displays actual base density used in calculations in kg/m3, lbm/cft, or Deg API.
Correction Factors
With Temperature – Temperature Correction factor currently used in flow calculation.
Meter Slippage – Actual Meter Slippage factor used in calculations. The value is read-only and
values are calculated and transferred from the Meter Slippage screen. Refer to Section 3.1.5,
Slippage Factors, on page 3-7.
Rates-Volumes
Inst Flow Raw – Displays daily flow uncorrected in m3/day or bbl/day.
Inst Flow Corrected – Displays daily flow corrected to contract conditions in m3/day or bbl/day.
Acc Volume Today – Accumulated corrected volume since contract hour or last manual reset,
flow units. At contract hour or manual reset, values transfer to Flow Minutes Yesterday.
Acc Volume Forever – Accumulated corrected volume since last rollover, flow units. Rollovers at
9,999,999 (ten million less 1).
Flow Minutes
Today – Flow Minutes Today.
3.1.3 Alarms
Select API2540 > API 2540 Setup and select Alarms Enabled. Click Alarms to define low, high, low
flow alarms and Spontaneous Report-by-Exception (RBX) Alarming. Refer to Figure 3-4.
Low Flow Cutoff – When the Meter Input value of the metering device is less than the Low Flow
Cutoff value, the calculated flow is equal to zero, (m3/Day or BBL/Day).
Low Alarm – Limit value, in engineering units, to which the calculated flow must fall to generate a
Low Alarm, (m3/Day or BBL/Day).
High Alarm – Limit value, in engineering units, to which the calculated flow must rise to generate a
High Alarm, (m3/Day or BBL/Day).
RBX Alarming – Currently, there are no communication programs available to handle API 2540
notifications. However, the alarms and Spontaneous Report-by-Exception (RBX) tags are logged
into the Alarm Log.
On Alarm Set – When the point enters an alarm condition, the ROC generates a Report-By-
Exception message.
On Alarm Clear – When the point leaves an alarm condition, the ROC generates a Report-By-
Exception message.
On Alarm Set & Clear – In either condition, an RBX message generates. Note that RBX
Alarming also requires the communications port to be properly configured.
3.1.4 Inputs
Select API2540 > API 2540 Setup and click Inputs to define the Meter Input, Temperature Input, Static
Prs. Input, Vapor Prs. Input, Density Input, and Sediment & Water inputs.
Meter Input – Source of the uncorrected measured flow. Typically, this links to a Pulse Input
engineering units Value, or the Analog Input Filter engineering unit value. Softpoint parameters,
FST Registers, or manual (Undefined) mode are also accepted. The value transferred or set
displays as the (Meter) Value field.
When using a Pulse Input, this is typically configured as “rate,” but the user program calculates
pulse values starting from the Accumulated Pulses (Accum’d Pulses) in the Pulse Input (m3 or kg
for metric and bbl or lbm for US). If the Meter Type is configured as Pulse Input, and the actual
value is manual (Undefined), or from a different register in the ROC (such as a Softpoint), the user
program interprets the number as a daily rate (kg, m3, lbm or bbl per day).
When using an Analog Input, such as from a Vortex transmitter, the rate must be m3/hour or
kg/hour in metric, and bbl/hour or lbm/h in US units.
When using a differential Analog Input for orifice metering, the scaling must be kPa in Metric and
in. H2O in US units.
Temperature Input – Location where the process temperature of the fluid is originated. Typically,
this floating-point parameter is assigned to the “Filter” engineering units (EU) value of an Analog
Input. Softpoint parameters, FST registers, or manual (Undefined) mode are also accepted. The
value transferred or set displays as the (Temperature) Value in Deg C or Deg F.
Static Prs. Input – Location where pressure of the fluid is originated. The pressure is assumed to be
consistent with the Vapor Pressure. Typically, this floating-point parameter is assigned to the
“Filter” EU value of an Analog Input or MVS. Softpoint parameters, FST registers, or manual
(Undefined) mode are also valid. The value transferred or set displays as the (Pressure) Value in
kPa or PSI.
Vapor Prs. Input – Location where the vapor pressure of the fluid is originated. The vapor pressure is
assumed to be absolute pressure and consistent with the Process Pressure (see above). Typically,
this floating-point parameter is assigned to the “Filter” EU value of an Analog Input, Softpoint,
FST Register, or manual (Undefined) mode. The value transferred or set displays as the Value in
kPa or PSI.
Up to five different Meter Slippage Factors may be entered for various flow rates.
1. If the first flow rate is set to 0.0, the rest of the table is ignored and a Meter Slippage Factor of
1.0 is used.
2. If only one flow rate / meter factor pair is entered, the program uses that Meter Slippage Factor
for all flow rates. Enter a unique Meter Slippage Factor.
3. If more than one flow rate / meter factor pair is entered, the program uses linear interpolation to
arrive at the Meter Slippage Factor for the current raw flow rate. Each meter flow rate entered
must be higher than the previous flow rate entered, such as:
Meter Value 1 < Meter Value 2 < Meter Value 3, and so forth.
4. If an error occurs due to improper configuration, such as negative numbers, the program sets
the Meter Slippage Factor to 1.0.
Meter Value 1 – First flow rate for 1st Meter Slippage Factor. Typically 20% of maximum flow.
Meter Value 2 – Second flow rate for 2nd Meter Slippage Factor. Typically 40% of maximum flow.
Meter Value 3 – Third flow rate for 3rd Meter Slippage Factor. Typically 60% of maximum flow.
Meter Value 4 – Fourth flow rate for 4th Meter Slippage Factor. Typically 80% of maximum flow.
Meter Value 5 – Fifth flow rate for 5th Meter Slippage Factor. Typically 100% of maximum flow.
Calculated Factor – Displays the actual calculated meter factor to be used in calculations. The value
is transferred to the API Calculations (Figure 3-2) as Meter Slippage Factor.
The Register Transfer screen is set to run by setting the Scan Period to a value greater than zero. The
actual Scan Time is typically 2 seconds.
APPENDIX A STANDARDS
The following API and ASTM standards were used to develop the API2540 Liquid Volume Correction
User Program:
ASTM D 1250-80
Tables 34, 53, 53A, 53B, 54, 54A, and 54B
Metric Units
Inputs Pulse Meter kg if mass, m3 if volume
Analog Meter kg/hour if mass, m3 if volume
Differential Meter kPa
Static Pressure kPa
Temperature Deg C
Density kg/m3
Viscosity cP
Outputs Flow E3 kg/day if mass, m3/day if volume
Density kg/m3
US Units
Inputs Pulse Meter lbm if mass, US bbl if volume
Analog Meter lbm/hour if mass, bbl/hour if volume
Differential Meter inches Water
Static Pressure PSI
Temperature Deg F
Density Deg API if Oil Products, lbm/cuft if water
Viscosity lbm / ft*sec
Outputs Flow E3 lbm/day if mass, US bbl/day if volume
Density Deg API if Oil Products, lbm/cuft if water
INDEX
If you have comments or questions regarding this manual, please direct them to your local sales representative
or contact: