LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

memory eaten up - guilty: Datasocket or References?

Hi,

I've developed quite a big prog (LV7), with different parallel task (DAQ, OPC for PLC, Database, ...). And now there is a memory leak somewhere. LV itself didn't mentioned to own the memory (according to the w2k-taskmanager, which is stable around 65 MB), but something must happened. 'cause the overall memory consumpting is increasing (5 MB /h), so after 10 h the CPU is busy w memory managment and will no longer let my prog work.
I think it's somewhere within my PLC-OPC-Connection, cause the other tasks (DAQ, UI, ...) are still running at normal speed, only this one will slow down dramaticly. Just a note: the app is running from the development enviroment, there are some bugs in LV7 providing me to make a exe.


Any ideas?

TIA Peter
0 Kudos
Message 1 of 4
(2,677 Views)

1) can you "dummy up " the OPC stuff and get memory to stablize?

2) Whatever type of references... open them once at the beginning and close at the end. The resourse for references are not cleaned up until LV exits!

Ben


Ben Rayner
Certified LabVIEW Developer
www.DSAutomation.com

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 4
(2,676 Views)
res 1) I've started this morning a long-run-test to make sure it's the OPC task. Hopefully it is, than I can blame on their developer 😉

2) I open my references in the beginning, store them in a global var and use them afterwards in different sub's. When the prog is stopped, I will clean up the references. BTW, I've also been told, that I should close any "local" reference, so to say, when I use the global ref, set via attribut their value, I should have to close the outcoming ref-wire of these attribute as well. Is thsi correct? At least, if I do so, some of the references became invalid for further use...

nevertheless, tia for your suggestions!

Peter
0 Kudos
Message 3 of 4
(2,676 Views)
DR VI discussed that here

http://www.ni.com/devzone/lvzone/dr_vi_archived4.htm

The one additional note I should stress is that once system resourse are allocated for references, they do not get free'd up until LV exits.

Ben
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 4 of 4
(2,676 Views)