Invalid Value Switch (BInvalidValueSwitchBlock)

This block evaluates a numeric value of Test In to determine whether its value is valid. A value is considered to be invalid if it is NaN (not a number), infinity, or if it is a BStatusValue with any of the following statuses: disabled, down, fault, stale or null. This block supports both value and trend requests.

If the value of Test In is valid, the block outputs the Test In value as the Valid In value, otherwise it outputs an invalid Test In value as the Invalid In value. If the Valid In slot is not linked, the block outputs a numeric value of one (1) for Valid In. If the Invalid In slot is not linked, the block outputs a numeric value of zero (0) Valid In.

A value is considered invalid if it is not a number (NaN) or infinity, or it is a BStatusValue with any of the following statuses: disabled, down, fault, stale or null.

Figure 203.   Invalid Value Switch properties
Image

To view these properties, double-click the block on the Wire Sheet or the block name in the Nav tree.

Property Value Description
Out read-only value slot Outputs either the Valid In or Invalid In value based on evaluating the Boolean condition.
Test In value slot Links from the output of other logic blocks or data sources to supply one or more input values to be tested for validity in the logic block.
Valid In optional value slot (defaults to True if not linked) Links from the output of other logic blocks or data sources to supply one or more valid values to a logic block.
Invalid In optional value slot (defaults to False if not linked) Links from the output of other logic blocks or data sources to supply one or more invalid values to a logic block.

Example

An algorithm with an Invalid Value Switch Block can detect invalid values and either substitute another value using the Invalid In slot, or it could be used in conjunction with a Logic Filter Block to only return the valid values.

Figure 204.   Invalid Value Switch algorithm
Image

In this example the 9:00 AM and 9:15 AM records are not displayed because the algorithm filtered out those invalid values.

Figure 205.   Example data
Image