Why Do I Get a Memory Full Error When Deploying Code to My Real-Time Controller?

Updated Dec 19, 2023

Reported In

Hardware

  • CompactRIO Controller
  • CompactDAQ Controller

Software

  • LabVIEW Real-Time Module

Issue Details

When deploying to my real-time controller, I get a Memory Full error. How can I reduce the memory usage on my Real-Time controller, so that I can use more for my program?

Solution

The size of the OS and Drivers is determined by the software setting in Measurement & Automation Explorer (MAX). In MAX, if you have your device connected through a LAN connection or crossover cable, your device will be under remote systems. Expand the tree under the RIO device and right-click Software and select Add/Remove Software. From this wizard you will be able to select the software package to use, select the minimal version of the RIO driver based on your version of LabVIEW to reduce the OS size on disk.
 
Note: Starting with Measurement and Automation Explorer 5.0 the minimal install is default. An initial installation will bring up the installation window below, which contains the minimal install:
 


On the next page of the installation uncheck Software set add-ons to keep any additional libraries from installing, as shown below:

For Advanced Users you can select Custom software installation and customize the drivers and components you need for your application. You must have LabVIEW Real-Time and NI-RIO installed to run VIs on your device. 

Additional Information

Note:To save the most memory possible, it is recommended that you only install the add-ons that you absolutely need. For instance, if you are not using shared variables in your application, it is recommended that you uninstall Variable Client Support and Network Variable Engine.


Caveats for Older Hardware:
If you are running into Memory Full errors when deploying to your real-time target, make sure to check the specification sheet or manual for your Real-time controller for the amount of DRAM and Non-volatile memory that is available on your device. For instance, the cRIO-9073 has 64 MB of DRAM, so installing the minimum software for NI CompactRIO-17.0 (no add-ons) takes about 60% of the memory available. For more information on how to test the memory usage on your Real-time controller, please see How Do I Monitor Available Memory on a LabVIEW Real-Time Controller?  or the related links below.