Configuring Remote Front Panels on a Real-Time Target

Updated Jun 15, 2018

Reported In

Software

  • LabVIEW Real-Time Module
  • LabVIEW Remote Panel Server

Issue Details

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?

Solution

This document uses LabVIEW 8.x. and above, for LabVIEW 7.1 or earlier see additional information. 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. In LabVIEW RT 2014, this component is called the Remote Panel Server for LabVIEW RT. Refer to the Remote Systems Help in Measurement & Automation Explorer (MAX) for information on how to do this.
  2. 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.
 
  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 

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. For versions of LabVIEW prior to LabVIEW 2011, KnowledgeBase: Remote Panel Licenses for LabVIEW Real-Time Targets walks through the process of purchasing, activating, and transferring multi-count remote panel licenses for RT targets. For this type of system, you can activate your Remote Front Panels through NI License Manager if you want to view your executable that is running on a Windows, Mac, or Linux system, but you will need to specifically activate the licenses to work on the RT operating system. The Real-Time Module comes with one Remote Front Panel license by default and this license is installed on the RT target when you install the Real-Time Module on it. 
 
  • 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 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.
 
  • 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.

WAS THIS ARTICLE HELPFUL?

Not Helpful