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.
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.
12-04-2017 08:52 PM
I have a case structure within a while loops that subtracts .5 from a given value until that value is negative, then it gets passed along. Is there a way I can count the amount of time the case structure goes around?
12-04-2017 09:11 PM
A shift register or a feedback node.
12-04-2017 10:39 PM
A case structure does not "go around" or subtracts anything. Where is "along"?
Show us your code so we can recommend a suitable solution.
12-05-2017 01:43 AM
Would a simple loop not serve this purpose better? A simple less than comparison with zero using the less than comparison function, connected with the loop's stop button would be much simpler. The loop iteration index could then be passed on once the loop ends.
12-05-2017 05:51 AM
The 'i' box in the loop is the loop counter, just send that one out (+1 since it starts at 0).
/Y
12-05-2017 06:30 AM
During testing, you can place a breakpoint. The VI will pause if a breakpoint is encountered. Then just count the pauses...
Or, during testing, turn on execution highlighting and watch how many times it's executed.
During testing a indicator and a local with a increment also works. It's a hack but during testing it works very well.
I'm emphasizing during testing since these solutions should not end up in a decent program. But it seems your trying to figure out what's going on. For testing they work very well.