To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This application limits the amount of simultaneous connections to an application through Remote Front Panel.
Description
Many LabVIEW users have licenses to deploy a remote front panel and have more than one person to be able to view that front panel. Most of the time, this is a great tool that users can access the front panel from the web. Although there may be certain VIs that you don't want more then one person to be able to access. To be able to implement this fuctionallity, all you need is a property node and an invoke node. These nodes are used to take information from the webserver and close those connections.
Requirements
Software
Steps to Implement Code
This snippet would need to be inserted into a loop structure in order for this to work, because while the code is being run it will constantly look for who is connected to the front panel. If that number of people exceeds the amount specified in "Limit Client connections" then that client address is closed and cannot see the front panel. The VI attached has this code implemented in a simple incremental counter.
Additional Notes
Once the code is written in your VI, or you are using the download example provided, you will need to make sure your webserver is running in Tools->Options->Web Server. Make sure the 'Enable Web Server' is checked. Then Restart LabVIEW and open the VI and go to Tools->Web Publishing Tools. Once your VI is deployed you can control the number of clients that can connect to it.
Block Diagram
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.