The functions piar_putarcvaluesx and pisn_putsnapshotsx are available to put an array of data values into the PI System. The function will accept an array of floating point values, integers, digital state codes and string pointers.
If more than one valid array is passed, only one will be used along with the associated array of digital state code values (that is, istats).
An array of istat values can be passed without an associated data array.
The logic for selecting which array to interpret is the same as for the pisn_putsnapshotx call. All data values in the array will be sent as the same data type. The caller is responsible for making sure that the values can be correctly archived by each point. The rules for doing so vary slightly between PI System implementations as outlined below:
PI for OpenVMS
Passing a real value (that is, drval) using pisn_putsnapshotx or pisn_putsnapshotsx causes a real value to be sent to PI. Passing an integer value (that is, ival) causes an integer value to be sent to PI. Programmers are responsible for making sure that the data type is compatible with the PI point type.
If a string containing a number is passed, the functions will attempt to interpret the string as a real value first, and an integer value second. If a string contains neither an integer nor a real value, the PI-API will attempt to translate the string into a digital code using pipt_digcodefortag or if that fails, pipt_digcode.
PI for Windows NT and UNIX
For adding numeric data to PI, programmers may pass either real (drval) or integer values (ival) to pisn_putsnapshotx or pisn_putsnapshotsx. PI will convert the passed data to the appropriate type.
If a string containing a number is passed, the functions will attempt to interpret the string as a number corresponding to the defined point type. This means that PI will attempt to read a real number from the string for real points and integer values from the string for integer points.