LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Count Boolean Transitions in large arrays, i.e. waveforms?

How can I quickly count all the boolean transitions in a large array, i.e. something like 2,500 elements.  The array is the result of a boolean "greater than?" comparison, and I am trying to find out how many times the signal exceeded the upper limit.  Thanks!
0 Kudos
Message 1 of 11
(3,659 Views)
Hi Jeffrey,

How about something like this?

Kimdino
0 Kudos
Message 2 of 11
(3,639 Views)
Is there a way to do this without the for loop?
0 Kudos
Message 3 of 11
(3,643 Views)
Hi Jeffrey,

yupp, there's a way 🙂
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 11
(3,624 Views)
wire the booelan array to the boolean to 0,1 function and add the array elements
0 Kudos
Message 5 of 11
(3,623 Views)
Hi Jeffrey,

> Is there a way to do this without the for loop?
I cannot see one.   Why no 'for loop'?

Kimdino
0 Kudos
Message 6 of 11
(3,612 Views)
Hi Jeffrey,

> Is there a way to do this without the for loop?
I cannot see one.   Why no 'for loop'?

Kimdino
0 Kudos
Message 7 of 11
(3,612 Views)
Hey unclebump,

Yep, much neater. It shows why you are a PAV and not me. <G>

Kimdino
0 Kudos
Message 8 of 11
(3,609 Views)
Hi Kimdino,

thanks anyway 😉

You don't have to be a PAV to use simple boolean math instead of converting every single bit to number...

Message Edited by GerdW on 12-12-2006 05:29 PM

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 11
(3,601 Views)
I need to do this on 32 channels, of 2,500 samples, five times per second.  I'm worried about performance issues if I need to explicitly execute a for loop this many times in quick sucession.
 
Any other ideas?
0 Kudos
Message 10 of 11
(3,594 Views)