Compare To Value Block

Compare To Value Block

The Compare To Value block emits True when the comparison between the input signal and a specified Value is true. It has six different modes of operation: Equal, NotEqual, GreaterThan, GreaterThanOrEqual, LessThan, and LessThanOrEqual.

Note - Equal and NotEqual options look for exact floating point agreement. This can lead to confusion, particularly when the app time step results in close but not exactly the expected value, like zero-crossings.

Parameters

  • Value (default = 0): A numeric value to perform comparisons against.
  • Method [Equal | NotEqual | GreaterThan | GreaterThanOrEqual | LessThan | LessThanOrEqual]
    • Equal: Emits True when the input signal exactly equals the Value parameter, otherwise False
    • NotEqual: Emits True when the input signal does not exactly equal the Value parameter, otherwise False.
    • GreaterThan Emits True when the input signal is greater than the Value parameter, otherwise False.
    • GreaterThanOrEqual Emits True when the input signal is greater than or exactly equal to the Value parameter, otherwise False.
    • LessThan Emits True when the input signal is less than the Value parameter, otherwise False.
    • LessThanOrEqual Emits True when the input signal is less than or exactly equal to the Value parameter, otherwise False.

Examples

Compare To Value Example