Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2024 R2)

BadVal

  • Last UpdatedJan 11, 2023
  • 1 minute read

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 (No Data or Calc Failed, 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]

In This Topic
TitleResults for “How to create a CRG?”Also Available in