Jump to content

Ben Johnson

Seeq Team
  • Posts

    29
  • Joined

  • Last visited

  • Days Won

    12

Community Answers

  1. Ben Johnson's post in Compare Signals in Formula was marked as the answer   
    When creating a value based condition, the usual default is the Identify -> Value Search tool, but it is also possible using Formula with common math operators like <, <=, >, >=, == (is equal to), != (is not equal to), and && (logical and) for use as signal against scalar, or signal against signal comparisons! 
    Whenever the mathematical condition is met, a condition will be created just like a typical Value Search. For more information, search for "Comparisons" in your formula documentation.
    Here are a few examples of these operators in use:
    Signal and scalar comparison:

    Signal and scalar comparison with logical and:

    Signal against Signal:

    In addition to the common math symbols, there are also some new concise ways to search for other signal states:
    $signal.isValid() - make a condition that enumerates when the signal has data $signal.isNotValid() - make a condition that enumerates the gaps in the signal $signal.isBetween(10, 20) - make a condition whenever the signal is between 10 and 20 $signal.isNotBetween(10, 20) - make a condition whenever the signal is outside the boundary of 10-20 Also for string signals, you can search for regular expressions or glob-like syntax:
    $signal ~= "*STAG*" - find whenever the state signal contains "STAG". $signal !~ "*STAG*" - find whenever the state signal does not contain "STAG". All of these things can be combined and given precedence with parenthesis. For example, to find "when is temp < 90 and either of humidity > 60 or compressor is off "
    $temp < 90 && ( $humidity > 60 || $compressor == 'OFF') Content Verified DEC2023
×
×
  • Create New...