LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

VISA-calls eat memory since Labview 6.1

I use VISA functions to read from a serial port, this is done all the time during the rest of my VI. I just upgraded from 6.0 to 6.1 and now labview crashes (some error window opens, but it's empty except for the "close" button, after hitting this labview crashes) after some minutes. I figured out that my computer (PC, 266 MHz, Windows 98 2nd) runs out of memory with every VISA call. I tried with a very simple VI (only VISA Read, connected to an indicator and to a resource control field): This behaviour is only to be found in 6.1, not in 6.0 or 5.0.
I didn't find any notes to this changed behaviour. Any ideas?
Best regards!,
Norman
0 Kudos
Message 1 of 10
(3,603 Views)
Norman,

So, you run the same VI in LabVIEW 6.0 and LabVIEW 6.1 and the memory leak happens in LabVIEW 6.1, but not LabVIEW 6.0. Is this correct? If it is, then the memory leak would be in LabVIEW, not VISA since the VISA code is the same for both LabVIEWs. Can you post your VI for all to look at?

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 10
(3,603 Views)
Hi Randy,
yes, your right. I don't know if the VISA code was changed from 6.0 to 6.1, but there's also a feeling that 6.1 uses much more memory than 6.0 (I get more often windows messages that I should close other programs (like system monitor - not much of a great application)) so I think you're right here too.
I don't have my VI here at hand (friday again), but it also happens with this simple one: Drag and drop a simple VISA Read icon to a blank VI, connect the resource name link to a control element, and the read buffer to a indicator. In 6.1 you must also link a read buffer length (constant) I think. That's all. Run this VI in continuous mode and watch your systems memory (e.g. windows system monitor). At friday I can send my simple VI here, or try it
yourself.
There's a another difference between 6.0 and 6.1: This control for the resource name is not much of a control any more: I can't change anything here, but I should have a choice between several ports. (in my case serial ports).
To me it seems that every call of an VISA function uses some memory (some kind of handle), so as it gets every time a new resource name.
I'm very curious if you can repeat my example VI with the same results.
Best regards,
Norman Violet
0 Kudos
Message 3 of 10
(3,603 Views)
"Norman" wrote in message
news:506500000005000000A9B90000-1031838699000@exchange.ni.com...
> Hi Randy,
> yes, your right. I don't know if the VISA code was changed from 6.0 to
> 6.1, but there's also a feeling that 6.1 uses much more memory than
> 6.0 (I get more often windows messages that I should close other
> programs (like system monitor - not much of a great application)) so I
> think you're right here too.
> I don't have my VI here at hand (friday again), but it also happens
> with this simple one: Drag and drop a simple VISA Read icon to a blank
> VI, connect the resource name link to a control element, and the read
> buffer to a indicator. In 6.1 you must also link a read buffer length
> (constant) I think. That's all. Run t
his VI in continuous mode and
> watch your systems memory (e.g. windows system monitor). At friday I
> can send my simple VI here, or try it yourself.
> There's a another difference between 6.0 and 6.1: This control for the
> resource name is not much of a control any more: I can't change
> anything here, but I should have a choice between several ports. (in
> my case serial ports).

This part seemed strange to me so I tried it out. This is at home on a
system that has hardly used labview, but the results were *very* strange.
When I clicked on the pull down control I got asrl's 97 98 99 and 100. Then
labview hung. Closed it down and tried again and got same result. It may
be because I have xp on this computer. I think I read somewhere that you
have to jump through a few hoops to get labview to run on xp.


> To me it seems that every call of an VISA function uses some memory
> (some kind of handle), so as it gets every time a new resource name.
> I'm very curious if you can repeat
my example VI with the same
> results.
> Best regards,
> Norman Violet
0 Kudos
Message 4 of 10
(3,603 Views)
Hi 'asimpleman' 🙂

I have to use Windows 98 2nd Editions, so my problem isn't a XP problem. But it seems that there is indeed a problem with that.
Thanks for your reply,

Greetings,
Norman
0 Kudos
Message 5 of 10
(3,603 Views)
Norman,

Well, if I am right, then VISA is not the issue, but the symptom may be showing itself through VISA. Under this assumption, I ran your test in LabVIEW 6.1 and 6.0.2 using a newer version of VISA. I found no memory leak at all after running it for 5 minutes. I was, however, running this test in Windows 2000. This could be a Windows 98/LabVIEW 6.1 interaction.

So, I decided to try this on one of our test machines. I Ghosted it back to Windows 98 with LabVIEW 6.0.2 on it. I then installed LabVIEW 6.1 with the VISA that comes with that installation. I ran your test again and I still did not see any memory leak from LabVIEW using some memory monitoring in LabVIEW as well as a couple of freeware utilities for memory monitoring in Windows 98.


I will wait for you to post your test. Could you also post some numbers as to how much your memory is leaking and at what rate? Thanks.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 6 of 10
(3,603 Views)
Hi!

Here's my test VI attached.

Memory leaking rate:
- free work space memory lowers with about 10 MB per 10 seconds
- reserved memory grows in the same time about the same amount

(I hope I did the translation of those memory types well)

I'm confused now by your results, where else can be some differences between our computers?

Greetings from Germany,
Norman
0 Kudos
Message 7 of 10
(3,603 Views)
Hi!

In the meantime my principal ordered me to deinstall 6.1 and install 6.0 (german, with 6.02 update) again. Well I did that but now there's a problem: All VISA Icons are flawed! I cannot connect the resource name connector link to any resource name. I use the "create" function, but I always get errors (I try to translate these into english):

connection: class conflict!
Two VISA session were connected which classes (INSTR, GPIB, Serial) are not compatible to each other OR the first one doesn't accept such session.

(german original)
Es wurden entweder zwei VISA-Sitzungen miteinander verbunden, deren Klassen (INSTR, GPIB, Serial) nicht übereinstimmen ODER die ursprüngliche, mit welcher die VISA-Sitzung verbunden wurde, a
kzeptiert Sitzungen dieser Klasse nicht.

Any ideas? Where did I miss something?

Greetings,
Norman
0 Kudos
Message 8 of 10
(3,603 Views)
Norman,

If you did not have LabVIEW 6.0.2 installed when you installed the VISA that is there, then something like this can happen. The procedure is to install LabVIEW, then all of the driver software, including VISA.

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 9 of 10
(3,603 Views)
Hi Randy!

I did deinstall labview 6.1 with all components completely, then reinstalled 6.02 with all default components. And I repeated this procedure yesterday again. Today I can't look for myself, but I'm sure that VISA is part of the default components. Or should I install the VISA part only after rebooting the computer after the labview installation? But I don't think so, because the following:

Here something to try for you: Open one of the example VI's: "serial with timeout". This one is fairly simple and it runs (so VISA have to be installed correctly I think). Copy all to a new VI OR change a little bit in the example VI and suddenly the connection between the "VISA serial read" and the "Eigenschaftskn
oten" (this is something like 'attribut node' in english. I hope you know what I mean) is invalid! I even can't redo this change to make it valid again (well, the change will be redone of course). It looks like the "interpreter" of labview had been invoked and notes just then, that there is an error in this link.

We have 6.02 (german) on a other computer as well, operating system is XP or 2000, and there had been never any problems until now (but noone needed VISA there either). This example VI behaves just the same way on this computer also!

Greetings, Norman
Confused labview user 🙂
0 Kudos
Message 10 of 10
(3,603 Views)