Jump to content

Condition based on multiple signals


Recommended Posts

  • Seeq Team

Hi Prachi,

A couple different options for you:

Option 1

You're probably familiar that you can use Formula (or Value Search) with the following to create a capsule for when one signal is equal to 1:

$signal==1

Therefore, one option is to combine this search together for each signal using the combinewith function:

combinewith($signal1==1, $signal2==1, ... , $signal50==1)

This will create a capsule for each signal equal to 1, which would result in multiple overlapped capsules if more than one signal was equal to 1. If you'd like to reduce that to create a capsule if "any" signal was 1, you could merge those together:

combinewith($signal1==1, $signal2==1, ... , $signal50==1).merge()

Alternately, if you want to know how many signals are equal to 1 at any point in time, you can use countoverlaps:

combinewith($signal1==1, $signal2==1, ... , $signal50==1).countoverlaps()

Option 2

Typically when counting 1 values, the signals are a 0/1 signal where it is 0 when inactive and 1 when active. If this is the case in your use case, an alternate approach could be to sum the signals and find when it is greater than or equal to 1:

sum($signal1, $signal2, ... , $signal50) >= 1

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...