Custom Interface to connect a Backend Database

Hello everyone,

 

I'm currently facing a challenge that I'm not getting anywhere with.

 

We would like to use the PI Data Archive for long-term storage of low-resolution process data. At the same time, high-resolution data from a ring buffer (InfluxDB) should also be made available to users via the PI Server.

 

In concrete terms, this means that high-resolution data is stored in the backend system (InfluxDB) for 30 days. Low-resolution data is stored in the PI Data Archive. Both types of data should be accessible via PI products such as ProcessBook, PI Vision, etc.

 

Our current PI system is very old and maps this architecture using a COM connector. We currently use an “ECHO-DB”, which we would now like to replace with InfluxDB.

 

The desired infrastructure essentially looks as shown in the attached picture. The old infrastructure is almost identical, but uses the ECHO DB and the COM connector.

 

It is important to mention that we do not want to integrate the high-resolution data directly into the PI system, as this would take up too much storage space in long-term archiving. In addition, there is no ring buffer functionality in the PI system without adapting the license model.

 

Now to my question:

 

What possibilities are there to forward data requests to the PI server to a backend system, similar to what our old COM connector did? Is it possible to develop software using the PI SDK that integrates new PI classes and functions for data retrieval?

I look forward to your ideas and suggestions!

 


image.png

Parents
  • Hi

    I don't know how old your PI System is, but in addition to the PI Data Archive, it consists of PI AF Server (Asset Framework). Think of AF as the data model and integration layer on top of your tags. All PI clients are able to access AF attributes, so you could think about the options available in AF for the connection to the backend database system.

    AF has data references for misc. operations, and PI Point data reference is the most commonly used one. In addition you have a Table Lookup data reference, which you can set up to look up values from a linked AFTable. This is set up using a SQL query into the external system.

     

    There's also the option of creating your own custom data reference, and this is a potential entry point for obtaining data from other systems, f.ex. InfluxDB.

     

    PS! The COM-based PI SDK is deprecated, and you need to have a look at the AF SDK now. It has most of the functionality the older SDK had.

  • Thank you for your response.

    The PI system on which I intend to implement the mentioned data interface is up to date and consists of two PI Data Archive servers and an AF server. The old system that uses the COM Connector is significantly outdated.

    The approach with the custom data reference sounds very intriguing. However, I would like to understand how users can access the InfluxDB time series through this method.

    For instance, when I retrieve a time series in Processbook, I can only select tags, and the system automatically retrieves the time series from the PI system’s Data Archive.

    Is it possible to replace the "normal" data query with our own custom Data Reference? Or does the user then have to retrieve the data in another way?

     

  • I see your concern! PI ProcessBook was an old(er) application even back when the more modern AF (2.0) was released, and the main data source for ProcessBook remains PI tags.

     

    The AF support is implemented as a data set in ProcessBook, similar to how we could develop custom data set ourselves. In the Define Trend dialog, you can click the small arrow next to Tag Search to access it, and then it opens a dialog allowing you to access your AF database/elements/attributes. You can map your AF Attributes to a display the same was you add PI tags.


    image.png
    PS! There's also the Element Relative data set option, this allows you to pick template defined attributes and just swap element context so you don't have to have 10 separate displays to show information about 10 pieces of equipment. (In PI Vision, this feature is called asset swapping)

     

    So if you have an AF Attribute configured as your own, custom data reference, it's up to you to implement it using C# and AF SDK, and you can override the necessary methods (f.ex. GetValue and GetValues) to provide your own logic, which'll connect to the InfluxDB and obtain the data you're requesting.

     

    In Amitec, we have created lots of custom data references over the years, so we can most certainly help you out with this kind of work. We also have a product that might fit the bill directly, with our Amitec Data Reference for RestAPI's. (I expect InfluxDB exposes a RestAPI to query data). If you're interested, reach out through a PM or email me at asle.frantzen@amitec.no

Reply
  • I see your concern! PI ProcessBook was an old(er) application even back when the more modern AF (2.0) was released, and the main data source for ProcessBook remains PI tags.

     

    The AF support is implemented as a data set in ProcessBook, similar to how we could develop custom data set ourselves. In the Define Trend dialog, you can click the small arrow next to Tag Search to access it, and then it opens a dialog allowing you to access your AF database/elements/attributes. You can map your AF Attributes to a display the same was you add PI tags.


    image.png
    PS! There's also the Element Relative data set option, this allows you to pick template defined attributes and just swap element context so you don't have to have 10 separate displays to show information about 10 pieces of equipment. (In PI Vision, this feature is called asset swapping)

     

    So if you have an AF Attribute configured as your own, custom data reference, it's up to you to implement it using C# and AF SDK, and you can override the necessary methods (f.ex. GetValue and GetValues) to provide your own logic, which'll connect to the InfluxDB and obtain the data you're requesting.

     

    In Amitec, we have created lots of custom data references over the years, so we can most certainly help you out with this kind of work. We also have a product that might fit the bill directly, with our Amitec Data Reference for RestAPI's. (I expect InfluxDB exposes a RestAPI to query data). If you're interested, reach out through a PM or email me at asle.frantzen@amitec.no

Children
No Data