Jump to content

Notifiers and Parallel While Loops


Recommended Posts

Hi avid LV users!

I want to verify if it's possible to run a top level vi

with notifiers and 16 parallel while loops? and the control to stop the

while loop is a global bool var...

however the while loop can only be activated by a notifier.

After the notifier is fired, it can run the loop, til it the Global Stop Var is

clicked

thanks!

Link to comment

Hi;

In a nut shell, the answer is yes !

However, you cannot enable/disable while loops dynamically...

You can however have them idle till they receive some notifier to execute.

You'll also need to have a state to stop the loop if you don't

want to put a time out on the wait for notifier function.

Without a timeout, this loop will wait forever and won't loop till...

This type of structure is essentially a state machine.

So look up labview help on state machines...

good luck

Walters

Hi avid LV users!

I want to verify if it's possible to run a top level vi

with notifiers and 16 parallel while loops? and the control to stop the

while loop is a global bool var...

however the while loop can only be activated by a notifier.

After the notifier is fired, it can run the loop, til it the Global Stop Var is

clicked

thanks!

Link to comment
Hi;

In a nut shell, the answer is yes !

However, you cannot enable/disable while loops dynamically...

You can however have them idle till they receive some notifier to execute.

You'll also need to have a state to stop the loop if you don't

want to put a time out on the wait for notifier function.

Without a timeout, this loop will wait forever and won't loop till...

This type of structure is essentially a state machine.

So look up labview help on state machines...

good luck

Walters

You can do it without timeout. The "wait on notification" returns if the notification is fired or when destroyed. On last the primitive "wait on notification" returns with an error. Use it for your advantage and surround your work in the loop with an if state. When no error is returned by the notifier, then do the work and loop back, when an error is returned do nothing and stop the loop. Repeat this for every loop. Now have a 17th loop with the event structure that waits for user interaction to either fire a notification or when stop button is pressed. In this state release all notifiers.

Download File:post-253-1148388229.vi

Link to comment

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.

×
×
  • Create New...

Important Information

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