pipt_digcodefortag

This function retrieves the digital state associated with the passed string. Only those digital states within the range of the passed point are checked.

C format

int32 pipt_digcodefortag (

int32 pt,

int32 PIPTR * digcode,

char PIPTR * digstring);

Returns

0

Success

-1

Point does not exist

-13

Digital state string not found within range of tag

-25

Point is not a digital tag

Arguments

pt (passed)

Point number

digcode (returned)

Positive digital state code

Dig String (passed)

Digital state string; search is not case-sensitive.

Usage Notes

PI2 digital state strings are 12 characters long. Thus, only the first 12 characters of digstring will be used. PI3 uses all characters passed in digstring, which is limited to 79 characters plus a null terminator in the API.

PI3 systems will only search the state set specified in the point definition for the tag.

Enabling Operational Intelligence