You can view and control a VI front panel remotely, either from within LabVIEW or from within a Web browser, by connecting to the LabVIEW built-in Web Server. When you open a front panel remotely from a client, the Web Server sends the front panel to the client, but the block diagram and all the subVIs remain on the server computer. You can interact with the front panel in the same way as if the VI were running on the client, except the block diagram executes on the server. Use this feature to publish entire front panels or to control your remote applications safely, easily, and quickly.
|Note Use the LabVIEW Web Server if you want to control entire VIs. Use shared variables to read and write data on a single front panel control in a VI.|
The user at the server computer must first configure the server before a client can view and control a front panel remotely using LabVIEW or a Web browser. Configure the Web Server by selecting Tools»Options and selecting the Web Server pages from the Category list. Use these pages to control browser access to the server and to specify which front panels are visible remotely. You also can use these pages to set a time limit on how long a remote client can control a VI when multiple clients are waiting to control the VI.
The Web Server allows multiple clients to connect simultaneously to the same front panel, but only one client at a time can control the front panel. The user at the server computer can regain control of any VI at any time. When the controller changes a value on the front panel, all client front panels reflect that change. However, client front panels do not reflect all changes. In general, client front panels do not reflect changes made to the display on front panel objects, but rather to the actual values in the front panel objects. For example, if the controller changes the mapping mode or marker spacing of a scale of a chart or if the controller shows and hides a scroll bar for a chart, only the controller front panel reflects these changes.
A client can view and control a front panel remotely from LabVIEW or from a Web browser.
The client and server computers must be running the same version of LabVIEW. If you are using a browser to view and control a remote front panel, you must use a version of the LabVIEW Run-Time Engine compatible with the version of LabVIEW on the server computer. Also, contact the server administrator to verify that the HTML document specifies the correct version of the LabVIEW Run-Time Engine.
|Note Before you can view and control a front panel remotely, you must enable the Web Server on the server computer where the VI or application you want to view and control is located.|
To view a remote front panel using LabVIEW as a client, select Operate»Connect to Remote Panel to display the Connect to Remote Panel dialog box. Use this dialog box to specify the server Internet address and the VI you want to view. By default, the remote VI front panel is initially in observer mode. You can request control by placing a checkmark in the Request control checkbox in the Connect to Remote Panel dialog box when you request a VI. When the VI appears on your computer, you also can right-click anywhere on the front panel and select Request Control from the shortcut menu. You also can access this menu by clicking the status bar at the bottom of the front panel window. If no other client is currently in control, you have control of the front panel. If another client is currently controlling the VI, the server queues your request until the other client relinquishes control or until the control time limit times out. Only the user at the server computer can monitor the client queue list by selecting Tools»Remote Panel Connection Manager. If you want to save the data generated by a VI running on a remote computer, use TCP instead of remote front panels.
All VIs you want clients to view and control must be in memory on the server computer. If the requested VI is in memory, the server sends the front panel data of the VI to the requesting client. If the VI is not in memory, the Connection status section of the Connect to Remote Panel dialog box displays an error message.
If you want clients who do not have LabVIEW installed to be able to view and control a front panel remotely using a Web browser, they must install the LabVIEW Run-Time Engine. The LabVIEW Run-Time Engine includes a LabVIEW browser plug-in package that installs in the browser plug-in directory. The LabVIEW DVD or CD contains an installer for the LabVIEW Run-Time Engine.
(Linux) If you installed Netscape, Mozilla, or Firefox in the default location, the LabVIEW installation program automatically installs the browser plug-in necessary to view and control front panels remotely using a Web browser. Otherwise, you can install the browser plug-in manually by installing the LabVIEW Run-Time Engine and then copying /usr/local/lib/LabVIEW-2012/LV2012NPlugin.so to the browser plug-in directory such as usr/lib/netscape/plugins, /usr/lib/mozilla/plugins, or /usr/lib/firefox/plugins.
Clients install the LabVIEW Run-Time Engine and the user at the server computer creates an HTML file that includes an <OBJECT> and <EMBED> tag that references the VI you want clients to view and control. This tag contains a URL reference to a VI and information that directs the Web browser to pass the VI to the LabVIEW browser plug-in. Clients navigate to the Web Server by entering the Web address of the Web Server in the address or URL field at the top of the Web browser window. The plug-in displays the front panel in the Web browser window and communicates with the Web Server so the client can interact with the remote front panel. Clients request control by selecting Request Control of VI at the bottom of the remote front panel window in their Web browser or by right-clicking anywhere on the front panel and selecting Request Control of VI from the shortcut menu.
If no other client is currently in control and if no other browser window on the same connection is currently in control, you have control of the front panel. If another client is currently controlling the VI, the server queues your request until the other client relinquishes control or until the control time limit times out. Only the user at the server computer can monitor the client queue list by selecting Tools»Remote Panel Connection Manager.
Multiple clients can control an application or VI remotely at the same time. To allow simultaneous control of a VI, the VI must be reentrant. To make a VI reentrant, select File»VI Properties, select Execution from the Category list, and select either Shared clone reentrant execution or Preallocated clone reentrant execution. LabVIEW opens a clone of the reentrant VI for each client request for a remote front panel. You can use the Web Server:VI Access List property to programmatically limit access to clones already in memory for remote front panel connections.
The following list includes functionality not supported and recommendations to consider when viewing and controlling remote front panels.