BadVal
- Last UpdatedJan 11, 2023
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Test a value to see if it is bad. For an attribute associated with a PI point, any system digital state value is considered bad ( or , for example).
Syntax
Badval(x)
Arguments
-
x
any expression evaluating to a value
Returns
True if the value is bad
False if the value is not bad
Exceptions
Returns True for blob PI points. Returns False for string PI points
Example
-
BadVal(1/0)
[Returns True]
-
BadVal(10)
[Returns False]
-
BadVal('att1')
[Returns True if the value of 'att1' is bad]
-
BadVal(FindEq('att1', 't', '*', 10))
[Returns True if the embedded function (FindEq in this example) has no result or has error for any reason]