CovSwitch (BCoVSwitchBlock)

This block determines if the value of Test In has changed from its prior value by comparing both value and status. It supports both value and trend requests.

For value requests, the block requests a trend from Test In using the Value Search Limit property as the time range prior to the current station time, and compares the last record from the trend to the Test In value. The block outputs either the True In or False In value depending on whether the value or status has changed. If the True In slot is not linked a default true value, the block uses (1). If the False In slot is not linked, the block uses the default false value, (0).

Figure 198.   CovSwitch 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 True In or False 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.
True In optional value slot (defaults to True if unlinked) Links from the output of other logic blocks or data sources to supply one or more valid values to the logic block.
False In optional value slot (defaults to False if unlinked) Links from the output of other logic blocks or data sources to supply one or more invalid values to a logic block.
Value Search Limit hours minutes seconds (defaults to 1 hour) Defines how far back in time to request a trend from the Test In (input) for value requests. The system compares the last record of this trend to the result of a value request on the Test In to determine if there was a change of value or status.

Example

Consider a Boolean Point with either a COV or interval history for enabling a system with hs:enableCmd and a:a marker tags. An algorithm with a Cov Switch Block can determine when the system enable command changes state.

Figure 199.   Algorithm with a CovSwitch block
Image

A numeric point with an Analytic Proxy Ext is configured with Data = alg:SystemEnableCOS, Time Range = yesterday, Rollup = Sum and Interval = Fifteen Minutes.

Figure 200.   Algorithm result
Image

The algorithm result is the sum of the true (1) and false (0) values during the time range, which indicates how many times the system enable command changed state from false to true or from true to false.

The Transition Switch Block is similar to the Cov Switch Block with the added functionality to determine when the Test In value changes to a specific state. You could use it to count only the false to true changes, if needed.