TagBad (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Test if a point has an abnormal state at a given time. If the point's type is R or I, any digital state is abnormal. If the point is type D, the states that are defined for that point are normal; all others are abnormal.
Syntax
Tagbad(tagname [, time])
Arguments
tagname
A tagname.
time
Optional. A time expression. If omitted, the current time () is used.
Returns
if the point's state at time is normal, if it is abnormal.
Exceptions
If point does not exist, or has no archived value at time, returns an error value.
Notes
Badval can test any value or expression; TagBad can only test a point.
Example
TagBad('tag1', '*')
TagBad('digitaltag', '14-Dec-97')
TagBad('tag1', 'y')