AnsweredAssumed Answered

[PI RDBMS] Need help to configure the PI RDBMS interface

Question asked by Nicolas.Isambourg on Mar 11, 2019

Dear PI Users,

 

2 AF Analysis calculate a set of 100 values. Each output attribute references a PI Point.

So the 200 values are archived in the PI Server.

 

 

When the dataset values are updated, I need to query a result in a table in a SQL Server database for each pair of values:

DataSet1.ValueX / DataSet2.ValueX => Result.ValueX ,X from 1 to 100

The results have to be archived in the PI Server.

 

Recently, I created the following discussion

https://pisquare.osisoft.com/thread/39415-pi-af-how-to-archive-in-a-pi-point-the-value-get-by-a-table-lookup

Lal Babu Shaik and Sebastien Raposo suggested to use PI RDBMS to query data in the SQL Server database.

 

So I am configuring the PI RDBMS interface and I need your help for some points.

For the moment I configured this query:

 

select result from table where x = ? and y = ?; P1='DS1_ValueX'/VL P2='DS2_ValueX'/VL

 

Do you think I should configure a single query for each PI Point or can I configure a single query for the whole points ? How can I do this ?

When no resuld is found, I want the "NO DATA" value to be written to the PI Point. How can I do this ?

 

Thanks,

Best regards,

Nicolas

Outcomes