LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to execute part of diagram only once

Please see attached VI. I want part of diagram outside while loop to execute only once, when button goes from OFF to ON.
0 Kudos
Message 1 of 3
(2,388 Views)
Hello!

I have edited your VI to behave the desired way.
Find the same attached.

Hope this helps!

- Gurdas
Gurdas Sandhu, Ph.D.
ORISE Research Fellow at US EPA
0 Kudos
Message 2 of 3
(2,364 Views)
I think you'll find some bigger problems in your code. If you only want it to execute once, you need to let your while loop run. The problem now is that you're wiring the stop condition from outside the loop, so the while loop stops after the first time it runs. Here's another way. It's not ideal either, but it should work.

___________________
Try to take over the world!
0 Kudos
Message 3 of 3
(2,359 Views)