Jump to content
Sign in to follow this  
wannabecontroller

Criteria for a while loop to advance its index

Recommended Posts

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"

 

 

 

Share this post


Link to post
Share on other sites

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. 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.