LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Real-time Control System Memory Leak

I am trying to make a real-time control system for my lab.  The real-time portion of the code is running on a cRIO-9057 and the front panel is running on a windows machine.  I am seeing a memory leak on the order of 100MB/day (rough estimate since I haven't tracked the rate that closely).  I am working with NI help and they've been great but the problem persists so I figured I would reach out to the wider community.

 

I am currently removing sections of the real-time loops to see if the memory leak slows or stops.  The removed sections are in the VI named Real-Time Deleted Code.  I think the last section I removed (the nested case structures which were originally in the Consumer Loop) were causing part of the leak, but not all.

 

I've attached the whole project in the zip file below.  Please let me know if you need any more information.

 

Any assistance is greatly appreciated.

 

P.s. pardon the messy code.  I am fairly novice when it comes to LabVIEW and I'm scrambling to get the leak solved before I finish adding some other features and cleaning everything up.

0 Kudos
Message 1 of 4
(89 Views)

As you may know, LabVIEW comes out with new versions every year (such as LabVIEW 2024).  Any VIs or Controls saved in, say, LabVIEW 2024, which almost all new users of LabVIEW are using, cannot be opened and read by most of the long-time LabVIEW developers (who may not buy a new version every year, myself, included).

 

You stand a much better chance of reaching more of the LabVIEW community if you "Save for Previous Version" and specify, say, LabVIEW 2021 (I'm mostly using LabVIEW 2019, but do have 2021 available ...).

 

Bob Schor

0 Kudos
Message 2 of 4
(84 Views)

Ah, understood, thanks for the heads up!  I am using LabVIEW 2024 but am now including a save for 2021.

0 Kudos
Message 3 of 4
(73 Views)

Another update: the flush buffer function in the Consumer Loop was added just before sharing the project.  I currently have it running again to see if that fixed the problem.  So far I am not seeing a memory leak, but that may just be because whatever process is causing the problem has not yet eaten up the memory that is allotted at start.  I will have more updates later.

0 Kudos
Message 4 of 4
(27 Views)