DigitalState Object




The DigitalState object is used to represent conditions of a PIPoint. There are two varieties of DigitalState objects, condition states and error states. Condition states are members of user defined StateSet collections and may only be assigned to PIPoints whose point type is digital and which have their DigitalSet attribute set to the particular StateSet. Error states are members of the “System” StateSet and can be assigned to any PIPoint.

A DigitalState object consists of a Name property and a Code property. The Name is a unique identifier that typically describes the condition or error being represented. The Name is the preferred means of accessing a DigitalState. The Code is a numeric offset of the state within the set. The code is used to provide a quicker, and less memory intensive representation of a DigitalState and is typically used by an interface program to send data to PI. The Code may be used as an index to a StateSet collection’s Item (StateSet.Item) property.

DigitalState objects are typically retrieved from a StateSet to send to PI, or they may be returned as part of a PIValue.



On PI on OpenVMS servers there is only a single StateSet, the “System” set. On those systems, condition states are also represented by DigitalStates from the System set. Digital points are assigned a starting offset and a range in the System StateSet to define valid condition states.


This object supports the IPIPersist interface.


Enabling Operational Intelligence