LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Memory Leak when using Active X and/or Modbus commands

I am using a piece of hardware connected by ethernet to my PC with its own IP address. The unit sends me data from my test rig (16 differential channels) such as voltage, current, temp, pressure etc.
 
I am able to use ActiveX commands to get the data sent back. I am sampling data at about 1 second intervals and graphing it within Labview. The problem is that Labview consumes memory at about 4K every minute. I open a connection to the IP address send the ActiveX command receive the string of characters back and then close the connection (this procedure is repeated every second). The advice given by NI engineers was that it was the limitation of ActiveX communication layers, so I set about using Modbus TCP/IP instead.
 
I searched the knowledge base and found an example of using Modbus to communicate to a Festo controller written by an NI engineer. I adapted this to suit reading back one input register starting at address 1 and found it obtained the data from my own piece of hardware. Again, running this in a 1 second interval a memory leak of about 4K/minute occurs.
 
Neither approach is satisfactory as tests must run for months at a time without interruption.
 
Is the problem therefore not to do with Labview and not the communication layer protocols?
 
A solution would be greatly appreciated!!
 
 
0 Kudos
Message 1 of 8
(3,775 Views)
Could you post some code??
0 Kudos
Message 2 of 8
(3,768 Views)
I've attached both the ActiveX vi   and the Modbus vi code
Download All
0 Kudos
Message 3 of 8
(3,761 Views)
Could you save them as 7.0 format llb files. Thanks.
0 Kudos
Message 4 of 8
(3,755 Views)
 
Download All
0 Kudos
Message 5 of 8
(3,748 Views)
From what I can see you might try closing the ActiveX reference at the end. Not sure if Labview does that automatically but if it doesn't that might cause the mem leak.
0 Kudos
Message 6 of 8
(3,744 Views)
Try this for the activex file. I have to go back to a training class and will look at the other app later.
0 Kudos
Message 7 of 8
(3,741 Views)

I tried that Modified ActiveX vi

It still has a memory leak of about 12K /minute.

I ran it over 20 minutes and there was an increase of 264K (sample rate was 200 msec)

0 Kudos
Message 8 of 8
(3,723 Views)