Step by Step Tutorial: How to Embed an Executable VI on a networked RT Series hardware
Overview
This tutorial shows a quick step by step process of embedding a VI on to RT series hardware, and was written for LabVIEW RT 6i or later. This tutorial assumes that the reader knows how to target RT series hardware (RT Engine ) on the network.
Table of Contents
Creating and Embedding the Application
The Application Builder in LabVIEW RT can be used to embed the VI on the controller.The following steps outline the procedure of embedding the VI.
1. Save the VI you would like to embed
2. Close the VI and target the RT series hardware (RT Engine) on the Network
3. Open a New VI.
4. Go to Tools >> Build Application and Shared Library (DLL) to open the Build Application or Shared Library (DLL) dialog box, shown below. The Target file name, Destination Directory, and Support file directory fields will be greyed out since you are targeted to the RT series controller.
If you are not targeted to the RT series controller, you may still proceed to build the application as long as the mentioned fields are filled as shown below. Make sure to use the correct IP address of the RT series controller.

[+] Enlarge Image
Figure 1. Build Application or Shared Library (DLL) Dialog Box
| The Application Builder determines the Target file name, Destination directory, and Support file directory from the Application Path setting in the Network Options, dialog box, available by selecting Tools»Network: x.x.x.x Options»RT Target: Miscellaneous. If you select the Small application with external file for subVIs option in the Build Options section, you cannot change the LLB for other files path because this path is determined from the Application Path setting in Network Options. Use the Source Files and VI Settings tabs the same way you do to build a LabVIEW executable when LabVIEW Real-Time is targeted to the host PC. Refer to the Application Builder Troubleshooting Wizard link below for more information about these tabs. The App Settings and Installer tabs are disabled when you target LabVIEW Real-Time to the RT Series PXI controller because these settings do not apply to applications embedded on the PXI controller. Note: Do not add the file serpdrv to your application in the Source Files tab. The serial port driver for LabVIEW Real-Time is installed on the RT Series PXI controller with LabVIEW Real-Time. Manually adding serpdrv to your application adds the Windows driver, which is incompatible with the RT Engine on the PXI controller |
5. Select Application (EXE) from the Build target pull-down menu.
6. Click the Source Files tab.
7. Navigate to the location of the VI to be added.
7. Select the VI to be added.
8. Click the OK button.
9. Click the Build Button.
The host will now communicate with the target and embed the executable VI on the RT series hardware.
See Also:
Application builder troubleshooting
Launching the Embedded Application at Start-Up
The RT series controller can launch your embedded application each time you start up your RT Series controller. In order to do so, complete the following steps.
1. Target the RT series hardware.
2. Select Tools >>Network Option.
3. Select RT Target: Miscellaneous from the pull-down menu.

Figure 2. RT Target: Miscellaneous Options Dialog Box
4. Select the Launch Application at Boot-up as shown in Figure 2 above.
5. Click the OK button.
The VI will now launch automatically once the RT series hardware is rebooted.
EXTRA TIP:
| Even if your application is stored on the hard drive of the host PC, you can use command line arguments to disable the Select Target Platform dialog box and explicitly specify a target for the application. You can use these parameters in a shortcut from your Windows StartUp folder to automatically launch RT Engine applications and/or host PC applications when you boot your host PC. For example, create a shortcut with the following shortcut target: c:\mybuiltapp.exe -target 127.127.44.108 -quithost To disable the Select Target Platform dialog box, specify a target, such as the IP address of the RT Series PXI controller, in the command line argument of your built executable application using -target. For example: c:\mybuiltapp_rtengine.exe -target 127.127.44.108 or c:\mybuiltapp_host.exe -target host To disconnect the host PC from the RT engine after all VIs are downloaded, use -quithost. For example, c:\mybuiltapp_rtengine.exe -target 127.127.44.108 -quithost |
Related Information
To find more detailed information on embedding VIs on RT series hardware see the following links.
See Also:
RT Series PXI/Compact PCI Controller User Manual
Reader Comments | Submit a comment »
Document needs an upgradtion for
using with LabVIEW 8.2.
- gorakhnath.srivastava@emrsn.com - Oct 15, 2007
Legal
This tutorial (this "tutorial") was developed by National Instruments ("NI"). Although technical support of this tutorial may be made available by National Instruments, the content in this tutorial may not be completely tested and verified, and NI does not guarantee its quality in any way or that NI will continue to support this content with each new revision of related products and drivers. THIS TUTORIAL IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND AND SUBJECT TO CERTAIN RESTRICTIONS AS MORE SPECIFICALLY SET FORTH IN NI.COM'S TERMS OF USE (http://ni.com/legal/termsofuse/unitedstates/us/).
