LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Notifiers: have it run more than once.

Solved!
Go to solution

Hi, 

I just started learning about notifiers and occurrences by reading through the forums and looking at the labview examples. I need to use the functionality of notifiers/occurrences in my VI and I choose to use notifiers.  I will give a slight description of the functionality that I implemented and the issue I am facing. ( The VI is attached to this post)

 

On the front panel of my VI I have a button labelled Run which when clicked is recognized by the event structure. This event structure is within a while loop so that I can read the Run event value change all the time. On clicking the Run button i want a  specific block diagram to execute and to do this i used a Notifier so that once the Run button is clicked the notifier is sent to the specific block diagram where wait on notification is used to receive it and execute that block diagram. Now when this specific block diagram is being executed the value of the Run button is changed to true and after everything in the block diagram is executed the value is changed back to false so the next time the run button is clicked it should send a notification and run the desired block diagram again.

 

Well, the problem I have is that I am able to send the notification only once, when after the desired block diagram finishes executing and I click the Run button again my notification is not sent and I dont know why this happens. Any help on this issue is greatly appreciated.

 

In the attached VI I have described the bare bones of the application that i am building.

 

Thanks.

0 Kudos
Message 1 of 3
(2,865 Views)
Solution
Accepted by topic author tarunA

The code you want to be repeated in a frame sequence structure, it will execute only once. Also, you should add a way to stop your event loop without having to hit the abort button. You also created 2 notifiers called RUN, I'm not sure but this is probably something you should not do. You should also look at some examples of how to use parallel loops. Another thing, you should always release the notifier before stopping the VI.

 

I attached a quick example (that probably need some amelioration).

 

Ben

Message 2 of 3
(2,847 Views)
It is okay having the two notifiers called Run.  What is does is create two references to the same notifier.  What you should not do is Obtain notifiers repetitively in a loop.  The obtain notifier should be outside the loop and the reference wire passed in through tunnels.  Don't forget to Release your notifier when the loops are done.
Message 3 of 3
(2,830 Views)