From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

CRIO Incremental RAM Consuming

Solved!
Go to solution

I have problems with my compactRIO 9031 (NI Linux RT x64) and LabVIEW 2018 SP1. I've deployment a message handling loop design pattern, with Real-Time target and FPGA. After two hours of running, the controller rebooted itself due to a lack of virtual memory.

 

In order to figure out if the problem comes from programming' errors, I've done several tests with a simple code which I attached, and also with an old cRIO (9012) with LabVIEW 2009 and OS VxWorks.

 

The code is very simple, two random numbers are generated in RT RAM Test .vi and are sent to FPGA RAM Test.vi to be used as arguments in an addition operation. The FPGA loop runs every 700 us.

 

The data set of generated numbers, FPGA operation, CPUs’ loads, Total Virtual/Physical RAM is converted to waveform and recorded in a .tdms file every 15 minutes.

 

The RT RAM Test is embedded and set to run as startup.

 

After 2 hours (4, in cRIO 9039 device which has double memory capacity than cRIO 9031) the application stops itself after consuming 80-90 MB each recording step and it ran out of memory.

 

The problem keeps happening independently of the programmed code used.

Any tips to help me with my problem? Has anyone dealt with the same thing?

 

Thanks in advance

 

RT RAM Test.png

RT to Waveform.png

FPGA RAM Test.png

RAM_Test_9039.jpg

Download All
0 Kudos
Message 1 of 4
(1,882 Views)

Hi Franinge,

 

writing to TDMS file will need some memory buffers to handle all that extra stuff done for TDMS…

 

You can also improve your own code:

The upper part is your loop without those Rube-Goldbergs (case structure, InsertIntoArray instead of BuildArray).

The lower part does the same as long as the "element" array has a "multiple of 10" size…

 

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 4
(1,870 Views)

Thanks, GerdW. I'll take into account your recommendation but the problem had already happened before writing in TDMS. Indeed it was a quick option to guess what was happening with my cRIO that rebooted itself after a certain time running.

 

I'd like to know what is happening and how to solve it because it's independently of the code used. (My LabVIEW project is much larger, with many queues and arrays and the behavior of the cRIO is exactly the same as the simple RAM Test's project ones.

0 Kudos
Message 3 of 4
(1,854 Views)
Solution
Accepted by topic author Franinge_89

I'd like to share with the community the solution to my problem. I really appreciate the given help to Luis Sanmiguel, a member of the NI Technical Support, and to the rest of the team too.

The given solution is calling to system session property node before the while loop starts and not inside it because the program is continuously creating a reference in each loop iteration that causes a memory leak that increases over time.

Franinge_89_0-1603975122499.png

The solution:

Franinge_89_1-1603975178336.png

And the recording after 2 hours running:

 

Franinge_89_2-1603975337376.png

 

 

0 Kudos
Message 4 of 4
(1,777 Views)