How to do these PI-SDK/PI-API things in AF-SDK

Discussion created by seneschal on Sep 24, 2013
Latest reply on Oct 1, 2013 by cmanhard

Trying to update an old VB6 PI-SDK application to AF.  Can someone outline equivalent procedures for doing the following in AF?

  • Create PI tags using a specific naming scheme, and create AF Attributes (like old aliases) that have data references to these tags.
    • This is made more difficult, since a single AF Server can point to any number of PI Servers… in the past my user would be confined to a single PI Server so I would always know where I am.
    • Usually the tag and attribute are created at the same time, and have close to the same name
    • Creating PI Tags involved creating a set of NamedValues for attributes of that tag, things like ptsource, ptowner, compressing, etc etc …
    • Also I used to have a transaction around the entire PI Tag creation process using IPITransaction object.
  • Insert values into PI tags (or attributes…?).  Used to do this by creating arrays and inserting multiple tags’ values at once, using pisn_putsnapshotsx.  I thought “UpdateValues” would be similar, but I am not so sure now, looking at the documentation.  This bulk method would still be useful as I have a lot of data points to insert.
  • Back then I used to have to create a custom Digital State Set – “0” and “1” but it appears that State Sets are no longer available at the AF level.

 Its hard to figure out if all of this direct PI Server work is still necessary… ie do I have to access PI Server objects directly.  Or can this all be accomplished at AF level?