LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

General Purpose Signaling with LabVIEW 7

I need LabVIEW 7 to handle the following situation. I have 3 concurrent VI's - A, B and C. A and B want to hear different sets of "signals" from C. Specifically, A wants to hear only signals 2, 4 and 6 while B wants to hear only signals 1, 3 and 5. These sets are arbitrary and NOT known at compile-time. Furthermore, A and B can listen for their signals one or more at a time, service any received signals, and loop to listen for one or more additional signals. Neither A or B want to poll and both must hear all their respective signals regardless of the order they are generated by C and regardless of the order A and B choose to listen for them.

LabVIEW 7 Notifiers almost solve this problem except for the timestamp feature that
prevents notifications from being received out of order. For example, if C sends notifier 1 to B while B is waiting on notifier 3, and then C sends notifier 3, notifier 1 will NEVER be heard by B (unless, of course, B has a Wait on Notification icon on his diagram for each possible notification he is to receive).

User defined events look very promising for solving this problem but I am not sure how to get the event structure to hear different sets of events (not known until run-time) at different times. For example, A may first want to listen for signals 2 and 4, say with a timeout, and then listen for signals 4 and 6.

Any insights into solving this problem would be appreciated.

W. Brown
0 Kudos
Message 1 of 4
(2,772 Views)
If C writes each signal to a separate queue (1,2,..,6), then A and B can read the queues assigned at run-time. No data gets lost since the queues can be arbitrarily large. If both A and B want to listen to the same signal (say, 3), then it gets more complicated. In that case a functional global used as a circular buffer with two sets of markers (one each for A and B) might work.

Lynn
0 Kudos
Message 2 of 4
(2,772 Views)
Thanks for your ideas. If I use separate queues, A and B end up polling queues since there is no "Wait on Multiple" queues icon. Using one queue is no good since the order in which events arrive at the queue becomes important.

What I am really after is a new LabVIEW class (called Signal) that acts just like notifiers but WITHOUT the timestamping feature found in "Wait on Multiple Notifiers."

Short of that, I am becoming concerned I will have to go back to a C language DLL to implement multithreaded signals for my LabVIEW application.

Bill
0 Kudos
Message 3 of 4
(2,772 Views)
Attached is a workaround that answers this problem.

W. Brown
0 Kudos
Message 4 of 4
(2,772 Views)