LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

COUNT TIMES A CASE STRUCTURE IS ACCESSED

Hello
I have a case structure inside a while loop. I would like to count how many times the TRUE case is executed and to be able to reset this "counter".
I think its something trivial but i'm stuck for some hours now! If anyone can help i will appreciate it very much.
Thanx in advance guys.
I am using LV7.1.

0 Kudos
Message 1 of 3
(3,346 Views)

Hi I_Pant,

create a shift register on your while loop. connect a constant with value 0 to it. Now connect the wire to the case structure, add a "+1" function and do to the other side of the case structure. connect both tunnels in the false case without a function in it. Now you can count the "true" cases. Add another case structure after your first one and connect a boolean button to it. Connect a "0" constant in the true case to the output, and the input value in the false case.

[Edit] here is a picture Smiley Happy [/Edit]

Mike



Message Edited by MikeS81 on 05-28-2008 12:51 PM
0 Kudos
Message 2 of 3
(3,345 Views)

thank you Mike....

0 Kudos
Message 3 of 3
(3,341 Views)