Logic filter (BLogicFilter)

This block evaluates the In1 and In2 slot values using the configured Boolean expression. It only supports analytic trend requests.

The Mode property configures which Boolean condition (true or false) causes the trend input value to be filtered out. When this property is set to Retain True and the Boolean expression evaluates to false, the block filters the trend value out of the result. Trend In is not required to be one of the inputs used for the Boolean expression. The status of the In1 and In2 slots are merged with the status of the trend input record and applied to the resulting value.

Figure 99.   Logic Filter properties
Image

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

Property Value Description
Out read-only value slot Outputs a filtered value from the Trend In.
Trend In optional value slot Links from the output of other logic blocks or data sources to supply trend data to the current logic block.

This property is not required to be one of the inputs used for the Boolean expression. The framework merges the status of the In1 and In2 slots with the status of the Trend In record and applies all three to the resulting value.

In 1 operand Defines the first operand used in the expression. Links from the output of other logic blocks or data sources to supply one or more input values to another logic block.
Operator operator Defines the function to perform.
In 2 operand Defines the second operand used in the expression. Links from the output of other logic blocks or data sources to supply one or more input values to a logic block.
Mode Retain False (default) or Retain True Configures which Boolean condition (true or false) filters the trend input value.

Retain True filters the trend value out of the result when the Boolean expression evaluates to false.

Retain False does the opposite. It filters the trend value out of the result when the Boolean expression evaluates to true.

Example

Consider a ZoneTemp with hs:zoneAirTempSensor and a:a marker tags and with history logged at 15–minute intervals.

Figure 100.   History table with logged values
Image

An algorithm with a Logic Filter Block evaluates whether the ZoneTemp trend value is greater than a Setpoint (hs:sp) value, and filters records from the result when the Boolean condition is false.

Figure 101.   Algorithm with a Logic Filter
Image

The resulting table shows the valid record values.

Figure 102.   Record values after the Logic Filter removed records
Image