You can add VIs and dependent files under an RT target in the Project Explorer window. 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 refers to downloading VIs and dependent files to an RT target.
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. Properties, settings, and built applications are downloaded to disk on the RT target. VIs, libraries, and shared variables are downloaded to memory on the RT target. Additionally, LabVIEW stores the compiled code for the 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.|
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.
You can connect to the RT target and access the front panels of VIs in memory on the target. 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. 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.
By default, when you run a VI LabVIEW automatically deploys all shared variables, including I/O variables, that the VI references. Automatic variable deployment is convenient during VI development because it allows you to run a VI simply by pressing the Run button, without separately deploying or redeploying variables that the VI references. However, in some cases it is useful to disable automatic variable deployment.
For example, if you attempt to run a host VI that references a variable hosted on an RT target that is running a startup VI, LabVIEW returns a deployment conflict unless you disable automatic variable deployment. If automatic variable deployment is enabled when you attempt to run the VI, LabVIEW attempts to deploy all the variables that the VI references and returns a conflict when one or more of those variables is hosted on a device that is running a startup VI. In this case, disabling automatic variable deployment on the RT target hosting the variables 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.
If you encounter deployment difficulties while using features that depend on the NI Scan Engine, you can attempt the following troubleshooting steps:
|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.|
Deploying configuration settings to a CompactRIO target with a connected I/O chassis involves three distinct domains:
It is possible to 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.
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.
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.
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.