From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to limit the number of remote panel connections to a vi?

Solved!
Go to solution

Hello,

 

I have an application running on a RT PXI and I'm using remote panel to access it. My licence allows me to have multiple remote connections and it's ok as I sometimes need to open multiple remote panels at the same time.  However, I would like to limit the number of connections to 1 for a particular  VI.  Is it something that can be done?

 

Regards,

 

Patrick Lessnick 

0 Kudos
Message 1 of 5
(2,590 Views)

Patrick:  If you right click on your target PXI system in the project exporer, select Properties>Web Server>Browser Access you can select who you let have access to your VIs.   Likewise, in the Visible VIs section of Web Services you can limit which of your VIs you want people to be able to see.

 

If this isn't enough control, from your run time application on the PXI system you can write a startup VI (in parallel with your main application) to monitor the Remote Panel: Connections to Clients Property of the real time server.  Once this monitor application sees a connection you can take any number of actions to prevent more than one connection, deny access to specific IP ranges or what have you.

 

I am assuming you are using LabVIEW 2009 and MAX 4.6.1 but it may apply to earlier editions.

 

Hope this helps.

   

Bill

GCentral
Message 2 of 5
(2,574 Views)
Solution
Accepted by topic author plessnick

The way it can be done is to poll the clients that are conected to the VI through a remote front panel.  At that point you close the connection to anybody but the first person that connected to the front panel.  That way if someone is running the VI, nobody else can connect.  Once they are done, someone else can then connect to the remote front panel.  I created a community example that illistrates this behavior.  You can find it here:

 

http://decibel.ni.com/content/docs/DOC-9673

 

If you have any other questions, let me know.

 

Scott

National Instruments
Applications Engineer
Message 3 of 5
(2,564 Views)

Scott:  Thanks for the far more elegant solution than I offered.  Did my response to Patrick help any?

 

Patrick:  Scott's solution cuts right to the chase - with my solution you would have had to learn how to do it on your own.

 

Bill

 

GCentral
0 Kudos
Message 4 of 5
(2,560 Views)

Hello,

 

I would like to thank you both for your answers.

 

I already have a VI running in parallel to limit access to specific users (the customer doesn't want to limit the access based on the IP address) so those solutions will be easy to implement.  I would present both solutions to my customer and I'm sure he willl want to have both implemented.

 

Regards,

 

Patrick Lessnick

0 Kudos
Message 5 of 5
(2,527 Views)