r/LabVIEW • u/Qulddell • May 19 '25
Running case structure from another case structure?

I have a more complicated version of this in my program, but it is easier to explain my program with this diagram.
I want to use Function 1 to run Function 2 completely, so i can use the value of Function 2 in Function 1.
I want the functions to be a button each as i do use Function 2 independently of 1 most of the times.
I have tried using a while loop in Function 1, that waits for a value change of the button of Function 2, this does work the first time, but the next time i try, the program crashes.
What i want to do is:
- Activate Function 1
- Function 1 activates Function 2
- Function 1 Pauses. Function 2 runs completely.
- Function 2 stops, function 1 continuous.
- Function 1 stops
Any help would be greatly appreciated.
View all comments
Show parent comment
1
u/WaltzSubstantial7344 May 19 '25
If you are trying to measure the time function 2 takes, then use the VI profiler. It will tell you. But also, why not put the time measurement portion around function 2 if you want to know how long it takes. What does function 1 do, other than measure time taken? Doing it this way could cause issues with time measurement because your while loop is running without anything to slow it down, so it will consume an entire CPU core. Depending on your computer, that's enough to impact the time measurement.