04-24-2017 01:45 AM
Dear Community,
I have the following problem:
I obtain a dynamic number of notifications and send the reference to different queues and then wating with the "wait for multiple notifications" function of the notifications. The queues handle data and put them back to the calling vi with the notifier reference. When I activate the highlight function in the calling vi, that obtain and waiting for the multiple notifications the "wait for multiple notifications" collect all notifications and return an array of the notifications.
Now the problem:
When the program executes with deactivated highlight function the "wait for multiple..." VI only return one of the notifications.
The Important Points of my question is that I create a dynamic number of notifications and that I need all notifications and after execution the vi should stop execution.
With kind regards
Sönke
Solved! Go to Solution.
04-24-2017 03:40 AM - edited 04-24-2017 03:42 AM
Soenke,
you are seeing expected behavior. Please read the help for "Wait on Notifications from Multiple":
Waits until at least one of the notifiers you specify receives a message.
When one of the notifiers receives a message, this function continues to execute.
The reason why it seems to work in highlight mode is because it greatly slows down execution speed for the highlighted code. That way (when all the send notifications are NOT highlighted) you have all these threads sending their notification before the slowed down code "collects" them.
EDIT: From the sounds, you are more likely looking for Rendezvous....
04-24-2017 03:45 AM
If you need all notifications to be acted on, you really should just use a single queue.
04-26-2017 01:10 AM
Dear Crossrulz,
Your Idea was the way to the solution.
Thank you very much for your support
04-26-2017 01:14 AM
The solution was to obtain a queue and get the reference to the queues, that produces the data. The queue that produces the data check the number of counts and if all data are collected the queue fire an event to kill the vi and get the data back to the calling vi