Configuring Remote Front Panels on a Real-Time Target

Updated Oct 9, 2023

Environment

Hardware

  • CompactRIO Controller
  • PXI Controller

Software

  • LabVIEW Real-Time Module
  • LabVIEW Remote Panel Server

Operating System

  • LabVIEW Real-Time (NI Linux Real-Time)

I want to host a Remote Front Panel on my real-time (RT) target so that I can view the front panel of the application running in a web browser. How can I do this?

This Knowledge Base applies to LabVIEW versions 8.x. to 2021. For LabVIEW 7.1 or earlier see additional information.

Remote Front Panels for RT targets are not supported on LabVIEW 2022 onwards (see Upgrading from LabVIEW 2021). The recommended solution is to use the G Web Development Software . There is information on Publishing a G Web Development Software WebVI on an NI Linux Real-Time Target.

Follow these steps to successfully create an RT application with a Remote Front Panel on an RT system.
 
  1. In LabVIEW RT 8.6 and later, you must explicitly install the Web Server for LabVIEW RT to the RT target in order to host a Remote Front Panel on it. Starting from LabVIEW RT 2014 to current, this component is called the Remote Panel Server for LabVIEW RT. Make sure this component is correctly installed on your RT target.
Untitled.png
 
  1.  Open a project and add an RT target to the project:
    1. In the Project Explorer, right-click your .lvproj file and select New»Targets & Devices....
 
  1. From the Add Targets and Devices window, select or create your RT target. 
 
  1. Enable the web server on the RT target:
    1. Right-click the target in the project and select Properties.
    2. Select the Web Server category from the left pane.
    3. Make sure that the Enable Web Server checkbox is checked. Also, verify that Visible VIs and Browser Access have the correct permissions setup (the character * can be entered to allow access to all VIs or IP addresses).


  1. ​Click OK.
  2. Right-click the target again, and select Deploy. This will deploy the settings to the target.
  3. These settings will not take effect until the next time the target boots. You can reboot the target at this time or wait until later.
    Note: In LabVIEW 2010, the default port is Port 8000. In versions prior to LabVIEW 2010, the default port is Port 80. Make sure the designated Port is opened in the Firewall Settings of your computer. 
 
  1. Generate the HTML file for the Remote Front Panel:
    1. Open the VI if it is not already open.
    2. Open the Web Publishing Tool by going to Tools»Web Publishing Tool....
    3. In the VI Name drop-down box, select your VI. You will notice that the Snapshot and Monitor Viewing Modes become grayed out. This is because those modes are not supported on RT targets.
  1. Proceed through the Web Publishing Tool wizard and customize as desired. On the final screen, it is recommended to change the Filename of the HTML file to something short and meaningful.
  2. Click Save to Disk. This will save the HTML to the destination directory and add it to your project under your target. 
 
  1. Build your RT application:
    1. Right-click Build Specifications under the target and select New»Real-Time Application.
    2. Select the Source Files category from the left pane.
    3. Select your VI and click the arrow to add it to Startup VIs.
    4. Select your HTML file and click the arrow to add it to Always Included.
  1. Select the Destinations category from the left pane.
  2. Click the blue plus sign (+) to add a new destination.
  3. Change the Destination label to something more meaningful, such as www.
  4. Change the Destination path to c:\ni-rt\system\www on a PharLap or VxWorks Target or /var/local/natinst/labview/www on a Linux RT target. This corresponds to the web server directory on the target. To find which operating system your device is running, please refer to the document Real-Time Controllers and Real-Time Operating System Compatibility.
  1. Select the Source File Settings category from the left pane.
  2. Select your HTML from the Project Files list and change the Destination drop-down box to the destination you created (i.e. www).
  1. Customize the rest of the build specification as desired. Click Build
 
  1. When the build is finished, right-click the application and select Run as startup. This will set the application as a startup application, deploy the application to the target, and then prompt you to reboot the target. When you are prompted to reboot the target, click Yes.

    Note: You can perform these steps individually by right-clicking the application and selecting Set as startup, then right-clicking the application again and selecting Deploy, and then rebooting the target manually.
  1. When the target comes up after the reboot, your application should be running and the Remote Front Panel should be accessible. To verify this, open a web browser and navigate to http://xxx.xxx.xxx.xxx:yyyy/<file name>.html, where xxx.xxx.xxx.xxx is the IP address of the target, yyyy is the port assigned to host the Web Server in step 3, and <file name> is the name of the HTML file that was generated from the Web Publishing Tool. 
    Example (Pre-2010)​http://192.168.10.100:80/BoilerTest.html 
    Example (Post-2010)​http://192.168.10.100:8000/BoilerTest.html 
  2. Once you are at the web page, you need to request control of the VI to interact with it. To do that, right-click anywhere in the grey area in the Remote Front Panel and select Request Control of VI as you can see in the following image.

    Request Control

    After that, you will be able to interact with your VI and monitor live changes.
  3. Additionally, when you are done interacting with your VI, you should always right-click and select Release Control of VI before closing the web page.

Additional Information

  • Remote Front Panels hosted by LabVIEW 2011 or later do not require a license. By default, there are unlimited connections available for any RT target.   
  • If you open more browser instances to connect to the remote panel than you have licenses on the target, you will get a "Remote panel connection has exceeded the maximum number of licenses" error and the remote panels will become locked. To allow remote panels again, close out all instances of the browser and reboot the target. Verify that the executable is running on the target and you should be able to connect to the target again using Remote Front Panels. You can help avoid this issue by having a license count that has more than you need.  
  • If you do not want to include the HTML file as part of your build specification, you can also manually FTP the file to the target. This can be done using most FTP clients. A common method is using the Windows Explorer window:
    1. Open a Windows Explorer window by right-clicking the Start menu and selecting either Open or Explore.
    2. Navigate to ftp://xxx.xxx.xxx.xxx/ni-rt/system/www on a PharLap or VxWorks Target or ftp://xxx.xxx.xxx.xxx/var/local/natinst/labview/www on a Linux RT target, where xxx.xxx.xxx.xxx is the IP address of the target.
    3. Click and drag your HTML file into this window.  
  • If you request control of a VI through remote panels, make sure and release control of the VI before you close out the browser instance. There have been cases where the connection remains open if you do not release control. This behavior will make it appear as though you have one less license count than what you really have because one is still being reserved. To correct the issue, make sure and always release control and/or reboot the target to release all connections.  
  • In case you get the Error 10 in the Application Builder when deploying your code to your RT Target, verify that you have specified the correct destination paths for all the VIs and HTML files as shown in step 5. 
  • When using LabVIEW Real-Time 7.1.x or earlier, use the following steps:
    1. Open Tools» RT Target Options.
    2. Click Web Server» Configuration in the Category list.
    3. Place a checkmark in the Enable Web Server checkbox to enable the Web Server.
    4. Enter the directory that you want to use as the Web Server root directory in the Root Directory text box. The Web Server root directory is the top directory in a Web Server file system.
    5. Click Web Server» Visible VIs in the Category list.
    6. Enter the filename of VIs in memory on the target that you want to add to the Visible VIslist and then click the Add button.
    7. Click the OK button to close the RT target Properties dialog box.
    8. Re-download the vi.  
  • There are specific browser versions that can be used for remotely viewing and controlling front panels. The recommended browser is Internet Explorer. Please refer to the following article for more details on the browser restrictions: Remote Front Panels, NI Network Browser, or WIF Don't Work in Browser.
  • Note: You cannot connect to a remote panel of a packed project library VI running on a Real-Time target.