LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Counting Boolean Transition

Solved!
Go to solution

Personally, I would implement a slightly more "in-place" solution, especially if the input array can be very big in future versions. There is no reason in the world to allocate a huge I16 array, just to sum it later. I16 also has the problem that if the number of transitions exceeds the I16 range (32767), you will get incorrect results. You should count in I32 and you can keep the sum in a shift register. Similarly, if you keep the last 6 elements in a shift register, you can compare that pattern.

 

Here's what I would do (note that the comparison is set to "compare aggregates").

 

altenbach_1-1671318649945.png

 

 

0 Kudos
Message 11 of 11
(390 Views)