From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Keep count of a case occurrence in a statemachine

Hello,

 

I am having trouble keeping track of the number of time that I enter a case in a statemachine. Each time I change cases the count is reset. 

 

Happy Fourth of July!

Best,

HF

0 Kudos
Message 1 of 3
(2,262 Views)

Your tunnel is set to Use Default if Unwired. Check to see what happens to the count in the default case, and make sure it's wired through without incrementing for all other cases.

---
CLA
0 Kudos
Message 2 of 3
(2,256 Views)

You need to pass the count through all of the cases.  If you don't wire a value to the output tunnel, it is set to output the default (0) and your count was just reset.  If you are using LabVIEW 8.6 or newer, you can right-click on the output tunnel and select Linked Input Tunnel->Create &Wire Unwired Cases and it will be automatically done for you.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 3 of 3
(2,255 Views)