DynaCard Retrieval via the CygNet OPC HDA Server

The CygNet OPC HDA Server supports the retrieval of historical RRL DynaCards, including both current surface cards and calculated downhole cards, which have been stored in the CygNet VHS. Using this capability, a third-party OPC HDA client, such as an OSI PI System, could be configured to retrieve historical DynaCard data from CygNet.

The OPC HDA Server can retrieve historical data (load or position variant arrays) for a particular cycle of an RRL pump on a well from the VHS-based ForeSite DynaCard Library. Both surface cards and calculated cards are available in the ForeSite DynaCard Library, which uses the CygNet VHS as its data repository.

Sample Point History and DynaCard History Retrieval Configuration
Sample Point History and DynaCard History Retrieval Configuration

System Configuration

Setup for this feature is very configuration specific. At a minimum the following components are required:

Additional knowledge of the specific OPC tags is required, which requires knowledge of the CygNet configuration. The specific OPC tag format is described in the next section.

OPC Item Name String Format

A unique tag string format is defined to distinguish DynaCard requests from CygNet point history requests. The DynaCard tag identification includes the site and service, the specific well, the card type, the location, and the measurement to be returned (load or position), all of which is encoded within the OPC Item Name String.

Note that the card consists of two discrete request tags, which must be combined to return a two-dimensional array: a load request tag (LOAD), and a position request tag (POS). These requests are tied together, since one request is useless without the other.

When requesting either load or position values, the CygNet OPC HDA Server returns a variant array of R4 values (VT_ARRAY | VT_R4).

The OPC Item Name String format is as follows:

SITE.CVS::CARD:FACILITY:CARDTYPE:LOCATION:LOAD

SITE.CVS::CARD:FACILITY:CARDTYPE:LOCATION:POS

where:

Tag Element Description

SITE

Specifies the name of the CygNet site.

CVS

Specifies the name of the CygNet CVS that contains the DynaCard Library, e.g. HSS, OPCIS, SVCMON, UIS.

The CygNet OPC HDA Server needs to consult the CVS to figure out which VHS to contact.

CARD

Specifies that this is a DynaCard request.

FACILITY

Specifies the CygNet facility representing the well.

CARDTYPE

Specifies the type of card. The card type values include:

  • CURRENT — represents the most recent pump stroke
  • FULL — generated when the pump fully starts again after having been shut down
  • PUMPOFF — generated when the pump is turned off, usually to wait for the reservoir to fill
  • ALARM — generated when the pump off controller logs an alarmable event. Such a condition is typically less severe than a failure event.
  • FAILURE — generated when the pump off controller logs a catastrophic failure event
  • IDEAL — represents an ideal pump stroke that is calculated based on a set of configuration items
  • START — stored by some controllers and represents the first stroke when the pump starts again after having been shutdown
  • REFERENCE — a card of any type that is stored for reference in the library, and sometimes on the controller itself
  • PATTERN — a card that is used to match against to determine abnormal conditions ForeSite could import a pattern card and use it to do analysis

LOCATION

Specifies the location of the card. The location values include:

  • SURFACE — indicates the card represents the pump stroke conditions as measured at the surface of the well
  • DOWNHOLE — indicates the card represents the pump stroke conditions as calculated at the downhole pump location
  • GIBBS— downhole card calculated by software using the Gibbs method
  • EVERITTJENNINGS — downhole card calculated by software using the Everitt-Jennings method

LOAD | POS

Specifies the type of measurement request, load (LOAD) or position (POS):

  • LOAD — The load measured at the top of the polished rod for this particular position of the pump stroke
  • POS — The position of the polished rod as the pumping unit moves through a stroke cycle

Example Tags

CYGDEMO.UIS::CARD:WELL_0001:FULL:SURFACE:LOAD

CYGDEMO.UIS::CARD:WELL_0002:CURRENT:DOWNHOLE:POS

Historian

The OPC HDA server can communicate with one or more VHS services, depending on the data requirements of your setup. As in the example above, the OPC HDA server could be connected to one VHS for its point data requirements, and to a different VHS connected to the ForeSite DynaCard Library for all of its DynaCard data requirements.

A Note about CygNet Messaging

We use CygNet Messaging to retrieve the cards from the VHS. The ForeSite DynaCard Library exposes a lot of its own API functionality that ForeSite uses, which we’ve chosen not to consume, instead relying on the power of CygNet Messaging and its own raw APIs. It is more efficient for the OPC HDA server to communicate directly with the VHS and retrieve the required DynaCard data via CygNet Messaging. Note also, that ForeSite will be writing in data using the same DynaCard Library, and CygNet is utilizing the VHS that has that data, but we’re not utilizing the DynaCard Library for communication between the OPC HDA server and the VHS.

Back to top