Gas Flow
Introduction
The PLC Shift Gas Flow application allows you to calculate temperature and pressure corrected flow using orifice or turbine sensors. The application can be run in batch mode for well testing, loading and other applications where discontinuous measurement is required, or in continuous mode, where daily records are generated at the configured contract hour.
The Gas Flow application is API (American Petroleum Institute) compliant and will generate event, alarm, configuration and flow history records. Records can retrieved and viewed locally, or exported directly to other systems.
View the 'Gas Flow' section under the PLC Shift Manager topic for application specific features in Manager, including setting all units at once and working with gas flow history.
Algorithms
The Gas Flow application supports the following algorithms:
-
AGA-3 1992
-
AGA-3 2013
-
AGA-7
-
AGA-8 1994
-
AGA-8 2017 Part 1
-
AGA-8 2017 Part 2 (GERG)
Use settings in the 'Flow Calculation' group to select the algorithms used.
Setting the Clock
Accurate measurement depends on accurate timing. Linux computers support the Network Time Protocol (NTP). This protocol has been in use for many years and is provably robust. It keeps the clock on the local machine to within a few milliseconds of UTC and also avoids making large adjustments. Large clock adjustments of many seconds at a time will cause accumulated volumes to be incorrect. NTP must be configured correctly for accurate measurement.
NTP must be configured correctly for accurate measurement.
|
Direct Sensor Polling
The PLC Shift Gas Flow application can get input values from a PLC that is connected to IO, or it can poll supported sensors directly. Configure direct sensor polling using settings in the 'Inputs' group. Supported sensors include:
-
Rosemount 3095
-
Rosemount 4088A (Modbus)
-
Schneider Electric 4102
Supported protocols include:
-
Modbus RTU
-
Modbus TCP
-
Modbus RTU in TCP
When multiple Gas Flow applications exist on a single device, and applications are configured to use the 'Modbus RTU' or 'Modbus RTU in TCP' protocols, applications that are configured to use the same serial port or IP address will be polled sequentially. Depending on the baud rate, the sensor response time, and the number of registers that are polled, having too many sensors on a single port will prevent all applications from getting sensor updates once per second.
Care must be taken when polling many sensors sequentially so that all Gas Flow applications will get sensor data once per second.
|
Alarms
Use settings in the 'Input Alarms' group to configure input alarms. Enabled alarms will be logged when they are set and cleared.
When polling a sensor directly, depending on the type of sensor, alarms can be read from the sensor. Use the 'Enable MVS Alarms' parameter in the 'Input Alarms' to read alarms directly from the sensor. Reading alarms from the sensor will disable local alarming. This prevents duplicate alarms from being logged.
Alarms can only be generated in the application or the sensor, but not both.
|
Freeze Inputs
Use the 'Freeze Inputs' control parameter in the 'Control' group to fix the inputs at their current value. When using a turbine input, the counts will internally continue to be incremented at their current rate so that the flow rate remains unchanged. When 'Freeze Inputs' is active, any sensor direct polling will be suspended. Polling will resume once 'Freeze Input's is deselected.
Batch
Configure a Gas Flow application for batch measurement using the 'Operation Mode' parameter in the 'Flow Calculation' group. When in batch mode, the application will will continue to generate and log flow history, alarms, events and configurations, but it will also generate batch records. A single batch record contains flow history and other information from the time that a batch was started until the batch is stopped.
Use the 'Batch Control' to start and stop a batch or to enter the 'Purge' state. Purge time is not recorded and is excluded from batch records.
Flow History
The Gas Flow application generates the following types of records:
-
Minute Data. Each record has accumulated volume, average input values, alarm count, event count and other values for every minute. 2048 minute records are stored by the application.
-
Hour Data. Each record has accumulated volume, average input values, alarm count, event count and other values for every hour. The last 24 hours of hourly history is available as tags in the 'Hourly History' group. 14 days of hourly history is stored by the application.
-
Day Data. Each record has accumulated volume, average input values, alarm count, event count and other values for every contract day. The last 32 days of daily history is available as tags in the 'Daily History' group. 64 days of daily history is stored by the application.
-
Event Record. Event records are generated when the application configuration is updated or when certain control actions happen, like 'Freeze Inputs' becoming active or inactive. Each event record contains information for a single action. 64 days of event records are stored by the application.
-
Alarm Record. Alarm records are generated when an alarm occurs. Alarms can be configured in the application or read directly from the sensor. 64 days of alarm records are stored by the application.
-
Configuration Record. A configuration record is generated when a contract day ends, when batch is started or stopped, or when a complete configuration download occurs. A configuration record contains the entire configuration of the application, not just the values that changed. Only values that are relevant to the flow calculation are in the configuration record, however.
-
Configuration Change Records. Starting in version 1.7, configuration change records are generated. A record is created when the configuration of a parameter that affects measurement is changed. For example a record will not be generated if export is enabled, but a record will be generated if the measurement algorithm changes.
Version 1.6 and earlier
Version 1.7 and later
Data Export
See the 'Gas Flow' section for local data retrieval, visualization and export using PLC Shift Manager.
Set the 'Data Export' section for tabular data export to Azure Table Storage or using MQTT.
Troubleshooting
View the application's diagnostic for detailed troubleshooting information. See the 'Log Files' section for more details.