2 Replies Latest reply on Oct 31, 2013 12:33 PM by Marcos Vainer Loeff

    PI ACE and SQL Reference data based on the MDB-AF context

    j.rao

      I am trying to accomplish an ACE calculation which works on few PI Tags and some reference data in a SQL table. When I scale this calculation to hundreds of equipment, I want to query the right set of reference data based on the equipment. 

       

      AF has all the equipment (based on a template). One of the attributes is the Equipment ID.  

       

      I want to query the context in MDB (MDB-AF sync) so I can use the right SQL data for the Equipment ID. 

       

      Do I use AF SDK in the PI ACE calculation to query the context? If yes, how do I query the context?

       

      Another way of achieving this is storing the reference data (back-filling) from SQL in PI Tags using PI RDBMS. I want to avoid this since it can be more maintenance in the future. 

       

      I think AF Analytics should help with the way some calcs work. Eagerly awaiting its arrival!

       

      Any thoughts are much appreciated.

        • Re: PI ACE and SQL Reference data based on the MDB-AF context
          xwang

          Hi,

           

          Firstly, yes, AF SDK could be used in PI ACE.  However, if the data stored in SQL server is updated, PI AF might not know the updating.  PI AF will just store the link to PI server and relational database server, but it could just show the updating data in PI, cannot show it in the SQL actually.  This should be reason why needs to use PI RDBMS interface to transfer some data from SQL server to PI.

           

          To achive your goal, I think you could link Equipment ID to AF server using "Table Lookup" data reference, I believe this should be stored in SQL server.  After this, it is necessary to use some .net function to link the SQL server.  Then, for example, Equipment ID in AF server and SQL server could be data matching bridge in you code, and you could this as the search condition to do your function.

           

          Wish this could help you.

           

          Xi Wang

           

          v-Campus team