LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using notifiers

I have one computer reading from a datalogger for two separate experiments. The datalogger receives information from each experiment on different channels. This data is then sent via GPIB-USB connection to the computer. I need two separate vi's running on that single computer so that the experiments can be accessed at different times. I am trying to figure out if it is possible to have a third VI running continuously to read from that USB port, while the other two vi's read/write to the third vi for the data with some sort of priority level setup.

-If this is possible, how do I read/write to separately running vi's? I understand notifiers work to communicate between vi's, but I am not sure how to send a request for information. For example, if one of the experiements needs a reading from the datalogger, how do I send a request to the third VI that only reads/writes in order to get the info I need?
-Also, how do I setup priority levels just in case the two vi's try to access the third vi at the same time?

I am fairly new to LabVIEW, so I'm not sure how to approach this. Also if there is another way to have both experiment VIs read from the single GPIB connection, I am open to any suggestions.

Thanks
0 Kudos
Message 1 of 3
(2,951 Views)
First, yes, it should be fairly straightforward to get the results you want.

I recommend a state machine architecture for this type of operation. Look at the examples with LabVIEW and search this site for more information.

Set up a subVI which communicates with the datalogger. It should have read and write commands and perhaps initialization, shutdown, and error handling commands, if appropriate. This can be called from either VI with suitable data to identify which instrument is to be read. Uses queues to send the data back to the instrument-specific vIs.

The VIs for the separate instruments will run in independent while loops, each with a wait function to allow timesharing. The main VI will have a loop which keeps everything running. It may also be te user interface for both instruments, or their respective subVIs can move their panels to the front when active. This depends on how you will be using them.

Lynn
0 Kudos
Message 2 of 3
(2,947 Views)
Please see answer posted on this thread (duplicate)
http://forums.ni.com/ni/board/message?board.id=170&message.id=113590#M113590

PS: Please do not make multiple threads on the exact same issue. It's easier for all of us to stay in the loop if there is just one thread to read.
Travis H.
LabVIEW R&D
National Instruments
0 Kudos
Message 3 of 3
(2,922 Views)