Deploying refers to downloading VIs and dependent files to an RT target. When you run a VI under a target, LabVIEW deploys the VI, all items required by the VI, and the target settings to the RT target.

Deploying VIs from the Project Explorer Window

You can add VIs and dependent files under an RT target in the Project Explorer window. Right-click an item under an RT target in the Project Explorer window and select Deploy from the shortcut menu to deploy the item and any support files for the item to the target.

Deployment Locations on an RT Target

The following table describes what items download to disk and what items download to memory on an RT target.

Items Download Location
Properties, settings, and built applications Disk
VIs, libraries, and shared libraries Memory

Deploying VIs that Use a LabVIEW Class or Call a Member VI

If you deploy a VI that uses a LabVIEW class or calls a member VI, only the VIs and classes referenced in the application deploy to the target. If the deployed VIs reference any dynamic dispatch member VIs, all the VIs that override the dynamic dispatch member VI in descendant classes also deploy.

Disabling Automatic Variable Deployment

By default, when you run a VI LabVIEW automatically deploys all shared variables that the VI references, including I/O variables. However, in some cases it is useful to disable automatic variable deployment. The following table provides examples of when to enable and disable automatic variable deployment.

Automatic Variable Deployment Use Case Benefit
Enabled Developing a VI. Allows you to run a VI simply by pressing the Run button, without separately deploying or redeploying variables that the VI references.
Disabled Running a host VI that references a variable hosted on an RT target running a startup VI. Allows you to run the host VI without encountering a deployment conflict.

You can disable automatic variable deployment on the host computer or on an RT target by right-clicking the host computer or RT target in the Project Explorer window and selecting Disable Autodeploy Variables from the shortcut menu.

Compiled Object Cache

LabVIEW stores the compiled code for deployed VIs in the compiled object cache. If you edit and redeploy a VI, LabVIEW updates the compiled object cache.

Note If you delete a large number of VIs that you previously deployed to an RT target, you can clear the compiled object cache to reclaim disk space on the RT target. However, LabVIEW then must recompile any VIs that you did not delete, which increases the amount of time LabVIEW requires for the next deployment. Consider this performance tradeoff before clearing the object cache.

Accessing the Front Panel of an RT Target VI

You can connect to an RT target and access the front panels of VIs in memory on the target.

Connecting—Right-click an RT target in the Project Explorer window and select Connect from the shortcut menu to open a front panel connection with the target. LabVIEW opens the front panels of VIs, indicating that the VIs are in memory on the RT target. Closing the front panel removes the VIs from memory on the target.

Disconnecting—Right-click an RT target in the Project Explorer window and select Disconnect from the shortcut menu to disconnect the front panel connection with the target and leave VIs running or in memory on the target.

Deploying Settings on CompactRIO Targets

Deploying configuration settings to a CompactRIO target with a connected I/O chassis involves three distinct domains:

  • Project—The target settings configured in the LabVIEW project.
  • Target—The target settings currently deployed on the target.
  • Chassis—The physical I/O modules connected to the chassis.

Maintaining Synchronization between the Project, Target, and Chassis Configuration

You can lose synchronization among the project, target, and chassis configurations when you add a module, remove a module, or change the module in a chassis slot.

  • Adding an I/O Module—To maintain synchronization when you add a module to a previously empty chassis slot, you must add the new module to the project and deploy the new project item to the target. Right-click the chassis item in the Project Explorer window and select New»C Series Modules to display the Add Targets and Devices dialog box, which you can use to discover the new module and add it to the project. After you add the new module to the project, right-click the module and select Deploy to synchronize the new configuration with the target. If you add multiple new modules to the project, right-click the chassis item and select Deploy to deploy all the new modules to the target at once.
  • Removing an I/O Module—To maintain synchronization when you remove a module from a chassis slot, you must right-click the module in the Project Explorer window and select Undeploy to remove the module configuration from the target. You then can delete the module from the project.
  • Changing the Type of an I/O Module—If a module at a given chassis location in the project does not match the module at that location in the actual CompactRIO chassis, right-click the old module item in the Project Explorer window and select Undeploy from the shortcut menu. Then right-click the chassis item in the Project Explorer window and select New»C Series Modules to display the Add Targets and Devices dialog box. Use the Add Targets and Devices dialog box to discover the new module and add the module to the project.

Troubleshooting Steps for NI Scan Engine Deployment

If you encounter deployment difficulties while using features that depend on the NI Scan Engine, you can attempt the following troubleshooting steps:

  1. Installing and Initializing the NI Scan Engine—You must install NI Scan Engine support on an RT target to deploy items and settings that use the NI Scan Engine. If you recently powered up or restarted a target with the NI Scan Engine installed, you must wait for the NI Scan Engine to initialize before deploying the target.
  2. Forcing Deployment—To minimize target communication, LabVIEW only deploys I/O modules and I/O variables upon detecting that the configuration differs from the previously deployed configuration. Therefore, in some cases a deployment operation might appear successful or display a Nothing to deploy message although no information was sent to the target and the target remains unsynchronized. If you experience recurrent difficulty synchronizing the target, project, and chassis, you can force deployment by undeploying an I/O item and then redeploying the item.
  3. Cleaning out NI Scan Engine Configuration Settings—If forcing deployment does not solve the problem, you might need to clean out the deployed NI Scan Engine settings from the target. To clean out NI Scan Engine settings, establish an FTP connection to the target and remove all files from the ni-rt/config/ directory on the target. (NI Linux Real-Time) Establish an SSH connection to the target and remove all files from the /var/local/natinst/deployfwk/config/ directory. After you clean out the appropriate directory, restart the target, then right-click the target in the Project Explorer window and select Connect from the shortcut menu to redeploy the target settings.
  4. Reformatting the Target—If all else fails, you might need to reformat and reinstall software on the target. After reinstalling software on the target, you should be able to redeploy the target successfully.
Note When you connect to a target and LabVIEW detects deployed items that are missing from the current project, LabVIEW reports a conflict in the Conflict Resolution dialog box and offers an option to automatically undeploy those items from the target. You also can use the Project & System Comparison dialog box to view and resolve differences between the project and deployed target settings.