LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do you count number of changes?

I know lots of threads out there address counters.  I am trying to count number of changes for example.

 

T,T,T,F,F,T,T,T,F,F,F.

 

This would give give me count of 3.  I have done several renditions, but it would give me number of T or number F.  I am not sure what would be the best option.

 

Henry 

0 Kudos
Message 1 of 6
(3,035 Views)

Here's one way that should work.

 

 

 

 

Message Edited by Matt W on 09-23-2008 07:46 PM
Message 2 of 6
(3,026 Views)

Thanks for the quick reply.  Unfortunately, I simply get a stream of Boolens and it is not an array.  I did something simliar to that.  Hm... I wonder if I am missing something.  I will give this a try again.

 

Thanks,

Henry

0 Kudos
Message 3 of 6
(3,021 Views)
What is a "stream of booleans"?  Where are these boolean values coming from?  If it's not an array, how is the "stream" defined?  Please post the code you have so far.
Message 4 of 6
(2,997 Views)

Here's a faster routine:

 

Ton

Message Edited by TonP on 09-25-2008 07:03 PM
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 5 of 6
(2,905 Views)
Mensaje editado por Luis_AM3C
Luis A. Mata C.
Ing. Electrónico
Whatsapp: +58-414-1985579
BBM Pin: 2B83E99A
Thanks: Kudos
Message 6 of 6
(2,886 Views)