LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Two vi's sharing a serial com port

First let me say I found this http://digital.ni.com/public.nsf/allkb/570A2263DE11C0B68625693E00576037 but cannot download the examples to see how the process of sharing one com port with multiple vi's works.  I'm updating software for some old serial data acquisition systems and using VISA can communicate very well.  Having multiple scans of the same or different channels at different time intervals would be desirable.  The above example is too old for my 8.5 to download.  Does anyone have a later example or can someone explain how to coordinate the two processes so they don't interfere with each other as is happening now.  Timing is not so critical that either vi cannot wait until the other vi is done scanning it's list of channels. For example vi one might be scanning 10 channels at a one second rate and vi two might need to scan 50 channels at a 10 second rate.  The 50 channel scan would take more than the one second scan rate of the first vi so the first vi would need to wait until the second scan task is complete before resuming.   Thanks.
0 Kudos
Message 1 of 6
(3,205 Views)

Mike:

 

The 2 vi's from the zip file are saved in 8.2.

 

-AK2DM

~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
Download All
Message 2 of 6
(3,202 Views)
thanks, was able to download them.  Hope they make sense to meSmiley Happy
0 Kudos
Message 3 of 6
(3,185 Views)

There's nothing there that will help you. All it does is make the VISA Resource available in multiple locations and that's not what you need. As long as you do a read/scan from one VI at a time, you can use the VISA Lock functions. There's an example you can look at.

 

Have you considered just using a single VI that tells the instrument to scan at the fastest rate and with the channels from VI A and VI B?

Message 4 of 6
(3,178 Views)

Can you use data flow to force the vis to run sequentially?

 

If not, you could use a semaphore make each vi wait for the other to finish.

 

 

steve

----------------------------------------------------------------------------------------------------------------
Founding (and only) member of AUITA - the Anti UI Thread Association.
----------------------------------------------------------------------------------------------------------------
Message 5 of 6
(3,155 Views)

Dennis, yes, I'm working on something along those lines now.  Steve, thanks for the suggestion.  Need to learn about semaphores and this might be a good opportunity even if I don't utilize them as a solution. 

0 Kudos
Message 6 of 6
(3,126 Views)