From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Keeping count of how many times a case structure has been entered.

Solved!
Go to solution

I have a "Case" structure (when a button is pressed, it is "case True").

I want to keep track of how many times this "case True" has been entered.

How can I do this?

0 Kudos
Message 1 of 5
(3,296 Views)
Solution
Accepted by topic author splee

For that you need to have a shift register or a feedback node and keep counting whenever the case structure case is executed the count will be increased by one see the attached snippet.

 

CaseStructure count.png

 

Good Luck

-----

The best solution is the one you find it by yourself
Message 2 of 5
(3,294 Views)

Hi,

What happens if I want to have a button to reset the output of the feedback node to zero?

Can I reset the value of the "wire"?

0 Kudos
Message 3 of 5
(3,257 Views)

Use a select statement to feed a zero into the feedback node instead of the value coming from the +1.

Message 4 of 5
(3,254 Views)

Yes you can do by this way.

 

CaseStructureCount_Reset.png

 

Instead You can use the case structure also as said.

-----

The best solution is the one you find it by yourself
Message 5 of 5
(3,251 Views)