wannabecontroller Posted May 12, 2019 Report Share Posted May 12, 2019 I am having a difficult time with while loops For example I have a task in a while loop and the condition for the while loop to stop is just a button. The while loop will never loop at my stop button because the SUB VI inside of the while loop has not completed. So for example, say i want to do something simple like a continuous task inside of my while loop Like Run a sine wave generator. The while loop will never iterate because it is waiting for the sine wave generator sub VI to "complete" or return so to speak So what signifies a function has returned to iterate the while loop if its a continuous task. I need the while loop to iterate because it will not look at my stop condition until it does. When i probe my stop condition all it does is says not executed and i assume its because its waiting for the "continuous task" to complete" Quote Link to comment
Gribo Posted May 12, 2019 Report Share Posted May 12, 2019 In one word, QMH. You will have to design your application with an event handler and a queue. You will also have to think what sort of events to handle and how to stop your acquisition loop. There are few templates for such design built into LabView. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.