LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
Siamak

Many-To-One Notification

Status: Declined
Functionality already exists in LabVIEW.

None of the existing synchronization VIs work for "instantaneous" many-to-one notification, (or do they?)

  • Notifier is one-to-one or one-to-many,
  • Rendezvous is many-to-many
  • Occurances is one-to-many
  • Semaphore handles a different sync issue!

 

In many cases, one VI may need to wait for several other VIs before performing a task, simple example is on closing,

Even more specifically, other VIs could do the "notification" and continue, but the one VI must wait until those VIs have met (and passed) the "notification" point.

 

Although the mechanism can be built easily, it could be defined by NI as a standard VI.

 

Sia

10 Comments
RavensFan
Knight of NI

What do you mean?

 

A notifer can be many to one also.  You just have multiple Send Notifications functions scattered wherever you need them.

AristosQueue (NI)
NI Employee (retired)

In the shipping examples, take a look at Wait For All Notifiers.vi located at

C:\Program Files\National Instruments\LabVIEW 2009\examples\general\notifier.llb

 

Intaris
Proven Zealot

User Events are capable of one to one, one to many , many to one and many to many. 

Siamak
Member

Ravens Fan, but if you use multiple Send Notification functions, then only one of them can trigger the waiting VI to continue. I meant the waiting VI need to wait for multiple VIs to trig. The trigger VIs continue after they trig, but the waiting VI continues when the last trig is done.

 

Aristos Queue, Wait for All Notifiers.vi uses an array of notifiers which communicate to each other on a one-to-one basis.

Of course, making a many-to-one mechanism using the existing functions, but the unique and straight forward functions are not there.

 

Below, I give you the view of what I mean;

 

AllStart.PNG runs at the beginning of the main VI,

HaveStarted.PNG runs at the beginning of the other VIs

WaitForMany.PNG runs when the main VI needs flags from the other VIs, main VI waits here for all flags set,

HaveBeenHere.PNG runs on each VI which wants to set flag, of course the VI runs this and continues.

RavensFan
Knight of NI
I had misread your original post.  I thought you wanted a many to one where any one of multiple locations would trigger the notifier.  Not until later after I read Aristos response did I see that you wanted to wait until All of the multiple locations to trigger.  In that case the Wait on Notification from Multiple function will do the job.
Siamak
Member

Wait on Notification from Multiple function waits until at least one of the specified notifiers receives a message. Notification is a one-to-one relationship, you canmake an array of notifiers but still, the wait part, needs to receive only one notification to activate. It can not work the way I want.

 

 

AristosQueue (NI)
NI Employee (retired)
For the record, many-to-one is exactly dataflow... you put the Many upstream and have an output from each of the Many that goes to the One downstream. The One waits for the Many to signal it. Most of these sorts of problems can be easily -- and more efficiently -- solved in LV by making the communication happen with wires in the dataflow, which is why it is extremely rare to get a request for many-to-one communication primitives.
Siamak
Member
A very basic example comes when One needs All others closed before it closes down.
AristosQueue (NI)
NI Employee (retired)

> A very basic example comes when One needs All others closed before it closes down.

 

Drop N calls to Close.vi, and wire the output Error Cluster to  Merge Errors.vi, and the output of that to One.

 

Alternatively, Send Notification to each of the Many. Then in a loop do Dequeue on a *single* queue. Loop N times. Each of the Many sends a message to  the queue. When you have N, proceed. 

Message Edited by Aristos Queue on 08-25-2009 11:33 AM
G-Money
NI Employee (retired)
Status changed to: Declined
Functionality already exists in LabVIEW.