StateNo (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Translate a digital state into its corresponding state number.
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('digitaltag')
StateNo(TagVal('digitaltag', '*-1h'))