Introduction to ModBus SnapIn

ModBus is a standard protocol used to communicate with a multitude of electronic measurement device, such as pressure and temperature sensors. Fekete has implemented the ModBus protocol into a module called the "ModBus SnapIn". Since 1999 F.A.S.T. FieldNotes has been able to monitor production tests in Real Time. The enhancements that the ModBus SnapIn provides F.A.S.T. FieldNotes include:

Modbus SnapIn Real time Extensions

ModBus SnapIn Menu and Toolbar

Modbus Status Pannel

The ModBus Status Pannel allows you to view the current state of connectivity to the attached hardware.

Introduction to MBConfig

Fekete has provide a simple tool that allow the user to quick describe the five components need to bring real time data into a F.A.S.T. Application. They are:

  1. Set up the serial communication parameters for the computer to talk to the RTU.
  2. Select the appropriate logical group that describes the meter configuration you are using.
  3. Fill in the channel properties, which describe the type of data we are monitoring and the physical properties as it relates to the RTU.
  4. Test your configuration against your hardware.
  5. Save as an .MBC file

When you open MBConfig you will see the following screen:

From top down you have:

Defining a Simple ModBus Configuration

The following series of figures illustrates a step by step procedure for defining a simple modbus configuration.

1. Set Global Properties

At his time there is only one global parameter, Sample Rate. The Sample Rate specifies how often reading are sent to FieldNotes. Key properties include:

2. Set ModBus Properties

Under the Modbus properties, we configure how the computer will communicate with the attached hardware. Key properties include:

3. Set RTU Properties

The Remote Terminal Unit is a single purpose computer which is responsible for communicating with each measuring device attached, logging data from those devices, performing calculations, and finally passing the data, to the computer. Since the ModBus SnapIn is deemed the “Master” in our communication with the RTU we control how often we poll the RTU for data, using the key property:

4. Add Logical Devices to a RTU

To add a logical group to an RTU simply right click on the RTU in the system view and select the group type you want from menu.

Add Wellhead

When “Add WellHead” is selected MBConfig will automatically add four predefined hardware channels to the RTU. These channels are specifically used to measure the pressure and temperature of the tubing and casing at the wellhead.

Add Aux Channels

When “Add Aux Channel” is selected MBConfig will automatically add a new logical group to the RTU called “Aux Channel”. Then right click on the “AuxChannel” group and highlight  “Add Aux Channel” again, a menu will display all the available channel types, left click on the channel type to add it to the “Aux Channel” group.

Add Gas Meter

When you highlight “Add Gas Meter” a menu containing a list of available Gas meters will be displayed. Left click on the specific meter type you wish to use. This will create a new logical meter group for the RTU. Within that logical meter group the appropriate channel types will be added. For example if we selected “Gas Orifice Meter” MBConfig will create the group called OrificeMeter and add channels for Static Pressure, Differential Pressure and Meter Temperature.

Add Oil, Water and Condensate Meters

When you highlight “Add Oil Meter” a menu containing a list of available Oil meters will be displayed. Left click on the specific meter type you wish to use. This will create a new logical meter group for the RTU. Within that logical meter group the appropriate channel types will be added. For example if we selected “Measured Level Meter” MBConfig will create the group called OilMeassuredLiquidLevelMeter and add channels for Oil Density, Meter Pressure, Meter Temperature, Liquid Level and Level Constant

Add/Delete RTU

When select the delete the RTU and all logical groups and channels attached to the RTU will be deleted as well. You can always add new RTU by right-clicking on Modbus group and selecting “Add RTU”.

5. Configure a Gas Orfice Meter

Once we’ve added a Gas Orifice Meter to the system we will have 3 channels that need to be configure. For this example I have selected the Static Pressure channel which is called “MeterStatic2”. The key properties include:

6. Configure an Oil Measured Level Meter

Once you’ve added the Oil Measured Level Meter to the system, you will need to configure the Meters properties. The key properties include:

Finally we need to configure the individual channels. The key properties include:

Note: Channels that are not required can be removed by simply right clicking on the channel name and selecting “Delete” from the menu.

Channel Properties

Alarms

Since the current ModBus Snap-In can sample the RTU (aka Rtu.Poll) at a different a rate then what it supplies to FieldNotes (aka Recorder.UpdateRate) we can provide alarm detection on each channel within the ModBus Snap-In. Therefore, Alarms will require a properly working Modbus stream and RTU (for polling), and an actively running Recorder with a SampleRate channel (for update rates).

Features include:

Process Flow Diagram

This is a Process flow diagram of a configuration with two Modbus serial communication streams. Stream 1 contains two multi-drop RTUs and stream 2 contains a single RTU.

Each Modbus Port (and associated RTUs) operate in a separate process thread. RTUs are polled in a round robin fashion according to each RTUs poll rate. An RTU poll reads the modbus registers and updates the channel array. If the RTU poll fails the corresponding channel values are set to null in the channel array.

Channels in the Input display (Status Window) are updated at the poll rate of the channels RTU or whenever a channel value changes (in the case of a global channel).

Recorder interfaces also operate within a separate process thread. Data is time stamped and transferred from the channel array to F.A.S.T. applications according to the Recorders Sample Rate (and is independent of the RTU polls). If the pause button is pressed (from FieldNotes) the samples are queued until pause is released.

Glossary of Terms

Channel: A Channel represent a single raw data stream entering an RTU. It describes the type of data we are monitoring and the physical properties of the attached equipment as it relates to the RTU. A RTU channel can have addition processing attached to it forming a virtual channel. Currently there are 2 virtual channel types the F Channel which reduces noise in the raw data by applying a moving average calculation, and the A Channel only displays data when an alarm condition has occurred.

RTU: Remote Terminal Unit, simply is the device responsible for: communication with the individual measurement devices, the logging of the readings from the measurement devices and finally communicating with computer using the ModBus protocol.

F.A.S.T. Application: F.A.S.T.FieldNotes F.A.S.T. Welltest F.A.S.T ValiData