Viewing and Controlling Front Panels Remotely with the Web Server

You can view a VI front panel remotely, either from within LabVIEW or from within a Web browser, by connecting to the LabVIEW built-in Web Server. Additionally, you can also control a VI front panel remotely within LabVIEW.

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. When controlling a VI front panel remotely, 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.

Configuring the Server for Clients

The user at the server computer must first configure the server before a client can view or control a front panel remotely. 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.

Viewing and Controlling Front Panels in LabVIEW or from a Web Browser

A client can only view a front panel remotely from a Web browser. However, a client can both view and control a front panel remotely using LabVIEW.

To remotely control a front panel from LabVIEW, the client and server computers must be running the same version of LabVIEW. If you are using a browser to view 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.

Viewing Front Panels from a Web Browser

If you want clients who do not have LabVIEW installed to be able to view a front panel remotely, they can use a Web Browser.

Follow the procedure to allow clients to remotely view the front panel using a Web Browser.
  1. Using the Web Publishing Tool on the Web Server, publish the VI.
  2. Provide the generated web address to the clients.

Viewing and Controlling Front Panels in LabVIEW

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.

Note (Linux) NI does not support remote front panels on Linux.

Multiple Clients Simultaneously Controlling Remote Front Panels

Multiple clients can control a 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.

Functionality Not Supported in Viewing and Controlling Remote Front Panels

The following list includes functionality not supported and recommendations to consider when viewing and controlling remote front panels.

  • Avoid exporting VIs that have While Loops but no wait function. These VIs prevent background tasks from performing in a reasonable amount of time, making front panels unresponsive when viewed or controlled remotely.
  • Some VIs might not work exactly the same way from a remote computer as they do when run locally. Embedded.NET and ActiveX controls do not display on a remote client because they draw and operate almost completely independently of LabVIEW. If a VI presents the standard file dialog box, the controller receives an error because you cannot browse a file system remotely. Also, the browse button of a path control is disabled in remote panels.
  • Clients viewing a front panel remotely might see different behavior depending on whether the front panel they are connecting to is from a built application. Specifically, if the front panel is from a built application, any programmatic changes to the front panel made before the client connects to the front panel are not reflected on the client computer. For example, if a Property Node changes a caption on a control before a client connects to that front panel, the client will see the original caption of the control, not the changed caption.
  • Only a controller can remotely view the front panel of a VI dynamically opened and run using the VI Server or the front panel of a subVI configured to display the front panel when called. Clients not controlling the VI cannot view the front panel.
  • Block diagrams that achieve certain user interface effects by polling properties of a front panel control might experience decreases in performance when you control the VI from a remote computer. You can improve the performance of these VIs by using the Wait For Front Panel Activity function.
  • LabVIEW cannot generate a Panel Close event for a VI being viewed or controlled remotely. If you are viewing or controlling a VI remotely, LabVIEW can generate events only in the Control class, that is not in the Application or VI class.
  • If you are remotely viewing or controlling a VI which displays the front panel of a subVI when calling the subVI, avoid manually closing the front panel of the subVI. Otherwise, you might lose control of the VI on both the client computer and the server computer. If you must view the front panel of the subVI when called, configure LabVIEW to close the subVI after it runs.