LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

accessing same com port from multiple applications

Hi, I have a box that controls multiple Newport stages which interfaces with our PC via RS232. I have more than one standalone LabVIEW application that needs to access the com port that talks to this controller, each one interfacing with a different stage. At present, only one of these applications can be run at a time, but for sake of convenience, I would like to have them run concurrently. What is the best way to implement something like this? Is it possible to make some kind of module that can field requests from multiple applications? I have never done this before, but I am guessing an application can be made whose job is to listen to requests coming in via tcp/ip, put them in a queue, and send them to the control box on a FIFO basis. Of course, then each one of the standalone apps becomes no longer truly standalone, and requires the stage control app to be loaded.

 

Any advice would be appreciated!

0 Kudos
Message 1 of 3
(2,423 Views)

I believe a shared variable is also used for communicating between different VIs.  Might be an option for you to consider.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 2 of 3
(2,406 Views)

@aputman wrote:

I believe a shared variable is also used for communicating between different VIs.  Might be an option for you to consider.


1. It would have to be network published.

2. They are natively tags, meaning they are bad for FIFO situations.

3. I claim NPSV as evil.

 

Now back to the original question...

If you close the port when done, then the other app can get access.  Just put in some smarts to keep retrying every second or so until you claim control.


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 3 of 3
(2,377 Views)