LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wait on notification from multiple function

Instructions: "The servant loop uses the function “wait on notification from multiple” to retrieve the two notifications on a “first come first serve” basis and display them on a graph."

 

If I have two master loops, one producing a noisy sine wave and the other producing a noisy square wave that are sent by two Send Notifications and I want them to be displayed on a graph, my question is do I use two Obtain notifier functions? and then how do I feed the two notifiers into the Wait on Notification from multiple, do I have to build an array? When I try this and then attempt to unbundle by name to be able to get a waveform graph, it won't let me connect (different types of data). I have never used this function before so any help appreciated.

0 Kudos
Message 1 of 6
(2,943 Views)

The notifications come off as an array, not a cluster.

 

temp.png

0 Kudos
Message 2 of 6
(2,935 Views)

How can I connect that array to a waveform graph?

0 Kudos
Message 3 of 6
(2,917 Views)
0 Kudos
Message 4 of 6
(2,906 Views)

You will need a shift register to keep track of each signal and append based on which notification you get.

 

Just remember that with a Notifier, you only get the latest value.  So you will likely get weird signals.  What you probably actually want is a Queue, which is a lossless communication method.  You can use a single Queue to have both of your master loops send data to the consumer.  I recommend having the data type of the queue be a cluster with a string or enum for saying who was sending the data and then a variant or common data type for the data itself.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 5 of 6
(2,903 Views)

In addition to recommending a Queue, I can also say User Events might help you here.  These can create a publisher subscriber method where you register for N different user events, and then have some data type in them that identifies where the event came from, and then handle them one by one as they come in.

0 Kudos
Message 6 of 6
(2,848 Views)