Hi, I need to send the value of a AF attribute to a PI tag every 30 seconds. I guess I will need to write some code using PI AF SDK to do this. Is there a sample code for similar task?
Where does the value of the AF Attribute come from in the first place?
It's from a table lookup (elevation-storage lookup table). The elevation is a regular PI tag and the storage is the result of the table lookup and it's saved in a AF attribute. I need to send the storage value to a PI tag every 30 seconds.
Usually an AF Attribute gets its value from a PI Point, rather than being the source of a new value for a PI Point. Instead of using the Table Lookup Data Reference, could you instead use the RDBMS interface to write the value to a PI Point, and then use the PI Point Data Reference to direct the AF Attribute to that PI Point?
I would recommend to use ACE of you want the persistence to run every 30 seconds. This post from Asle is a good starting point: vcampus.osisoft.com/.../storing-af-calculations-to-a-pi-tag.aspx
You could use the RDBMS interface to read the data through the OLEDB interface to AF, but i'm unsure if this would scale sufficiently if you would need to write 1000s of tags (if that is the case).
Thank you guys and I will try both.
Retrieving data ...