I have an enumeration signal, how can I count statuses occurrences?

It's possible to count statuses occurrences of an Enumeration signal by using virtual signals.

As an example, consider a random signal with values 0 and 1, we want to count the occurrences of both statuses. We need to create a virtual signal for each status to check.

Virtual signals have to be set as differential counters, their formula has to be a condition that verifies the main signal status and returns 1 in positive case, otherwise.

In case of random signal with 0/1 values, formulas are: 

  • x0 == 0 ? 1 : 0 to count value 0 occurrences
  • x0 == 1 ? 1 : 0 to count value 1 occurrences

where x0 is the main random signal.

Once the virutal signals have been created, you'll need to wait until the next signal transmission to have counts availability.

It is then possible to add virtual signals in widgets and display aggregated data as hourly totals, daily totals, ....

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.