Adding Values to PI

The functions piar_putarcvaluex and pisn_putsnapshotx put a single event into the PI System. The functions support arguments for each of the possible PI System data types. The function reference identifies the arguments as:

· drval, a double precision floating-point value,

· ival, a 32-bit integer value,

· bval and bsize, a pointer to a buffer and buffer length, respectively,

· istat, a digital state code,

· flags, a data quality mask See Digital Flags.

The arguments are passed by reference, rather than by value, even though the values are not changed by the call. This allows you to pass NULL pointers for arguments that are not needed. The function uses the following steps to determine the value to send to PI:

· if istat indicates a bad value, digital state only. See Digital States.

· if bval is non-null, string/PIblob value.

· if the drval pointer is non-null, floating point value.

Enabling Operational Intelligence