Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Deploying and Running VIs on an RT Target (Real-Time Module)

LabVIEW 2013 Real-Time Module Help

Edition Date: June 2013

Part Number: 370622L-01

»View Product Info

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.

Disabling Automatic Variable Deployment

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.

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.

Synchronizing 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.

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.

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.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit