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.
- 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.
- Open a project and add an RT target to the project:
- In the Project Explorer, right-click your .lvproj file and select New»Targets & Devices....
- From the Add Targets and Devices window, select or create your RT target.
- Enable the web server on the RT target:
- Right-click the target in the project and select Properties.
- Select the Web Server category from the left pane.
- 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).
- Click OK.
- Right-click the target again, and select Deploy. This will deploy the settings to the target.
- 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.
- Generate the HTML file for the Remote Front Panel:
- Open the VI if it is not already open.
- Open the Web Publishing Tool by going to Tools»Web Publishing Tool....
- 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.
- 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.
- Click Save to Disk. This will save the HTML to the destination directory and add it to your project under your target.
- Build your RT application:
- Right-click Build Specifications under the target and select New»Real-Time Application.
- Select the Source Files category from the left pane.
- Select your VI and click the arrow to add it to Startup VIs.
- Select your HTML file and click the arrow to add it to Always Included.
- Select the Destinations category from the left pane.
- Click the blue plus sign (+) to add a new destination.
- Change the Destination label to something more meaningful, such as www.
- 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.
- Select the Source File Settings category from the left pane.
- Select your HTML from the Project Files list and change the Destination drop-down box to the destination you created (i.e. www).
- Customize the rest of the build specification as desired. Click Build.
- 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.
- 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
- 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 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:
- Open a Windows Explorer window by right-clicking the Start menu and selecting either Open or Explore.
- 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.
- 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:
- Open Tools» RT Target Options.
- Click Web Server» Configuration in the Category list.
- Place a checkmark in the Enable Web Server checkbox to enable the Web Server.
- 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.
- Click Web Server» Visible VIs in the Category list.
- 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.
- Click the OK button to close the RT target Properties dialog box.
- 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.