StateNo
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Translate a digital state into its corresponding enumeration value.
Syntax
StateNo(digstate)
Arguments
-
digstate
An enumeration value
Returns
The offset into the Digital State Set corresponding to digstate
Exceptions
If a point is passed as digstate that is not a digital point, returns an error value
Notes
A digital state may appear more than once in the digital state table. In this case, the value that StateNo returns may vary. If digstate is the value of a digital point, StateNo returns a code number appropriate for that point.
Example
-
StateNo(DigState("No Data"))
[Returns 248]
-
StateNo(TagVal('enum_att1', '*-1h'))
[Return the digital state number corresponding to the value of 'enum_att1' an hour ago]