2 Replies Latest reply on Jun 25, 2018 12:53 PM by gregor

    Change interface from PI API to PI SDK or AF SDK, equivalent for pisn_sendexceptionqx(...)


      We think about to change a Interface from PI API calls to PI SDK or  AF SDK calls. Currently the Interfae is able to send up to 10000 events per seond via API call pisn_sendexeptionqx(). The PI SDK call PIPoint.Data.Updatevalue() do not support exeption test.

      If there is any way to write data usin the PI SDK and have exeption test?

      Which funtionality do OSIsoft interfaes use to write such amount of data to the pi archive?

      It is possible to send the same amount of data via PI SDK like there is possible by API?

      Any differenes between PI SDK and AF SDK?



      Best regards


        • Re: Change interface from PI API to PI SDK or AF SDK, equivalent for pisn_sendexceptionqx(...)

          Exception reporting filters out noise, and thereby reduces the communication (I/O) burden between PI Data Archive and the interface node. As networks have improved and I/O capacity has become less of an issue, some PI System Managers have essentially turned off exception reporting, by setting the exception deviation to 0.

          PI SDK and AF SDK do not support Exception Reporting automatically and you put them in your application.


          As far as PI SDK vs AF SDK is concerned, the former is deprecated (see Deprecating the PI SDK)

          OSIsoft recommends using AF SDK for all new software development projects. (AF SDK vs PI SDK)

          AF SDK is generally the more performant of developer APIs (PI API and PI SDK) KB01216 - AF SDK Performance: Serial vs. Parallel vs. Bulk


          OSIsoft interfaces (UNIINT based) mostly employ PI API for data access, though some use PI SDK. PI Connectors are OSIsoft’s newest technology, similar to PI Interfaces, that collect data from sensors and control systems. They are designed to require minimal configuration and simplify the collection of data by intuitively scanning for a specific device protocol, collecting PI Points, and automatically creating a PI Asset Framework (AF) model for your asset. Most connectors use PI AF SDK for data access.

          PIPoint.UpdateValues Method can be used to update multiple values for the PIPoint.


          Could you provide more details on what you are trying to accomplish? Are you re-writing a custom interface application?

          1 of 1 people found this helpful
          • Re: Change interface from PI API to PI SDK or AF SDK, equivalent for pisn_sendexceptionqx(...)

            Hello Torsten,


            When developing an interface, you will likely be more interested in Updating multiple PI Points at once rather than sending multiple updates for a single PI Point. So with regards to your purpose, you will likely be looking for one of the PIServer.UpdateValues Method overloads rather than PIPoint.UpdateValues. Because interfaces should always operate buffered, PIServer.UpdateValues Method (IList<AFValue>, AFUpdateOption, AFBufferOption) overload will likely be your best choice. VB.Net and C# sample code is offered including a basic implementation for error handling. When you send many values in a bulk, you don't want the whole operation to break in case a single update cannot be processed. For this reason, it is important to inspect the error collection unless it returns empty which should be the usual case.

            3 of 3 people found this helpful