LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does opening and closing FPGA references increase Windows XP handles by 3?

Hello.

 

We run a test system here that uses TestStand to communicate to a number of Labview VI modules which in turn communicates to a PXI-7833R FPGA. Everything has been working fine except after a long time running Labview would get an out of memory error. I discovered after a particular VI was run 100,000 times, the number of handles in Windows XP Task Manager grew to about 370,000. The number of threads and processes remains stable and normal. Closing Labview removes all the excessive handles.

 

I tried an experiment to create a standalone VI (ie: no TestStand) which simply opens the FPGA VI reference then closes the reference. This is repeated 4 times in the same VI. The number of handles in Windows XP Task Manager increased by 12 each time the VI was run. No errors. This indicates closing the FPGA reference might not be working.

 

Why does this happen? Is there a way to avoid it? The version of Labview is 8.5.1.

 

Appreciate any help here. Thanks.

 

-Dave

0 Kudos
Message 1 of 5
(3,414 Views)

Hello Dave,

 

Where do you place your open/close FPGA reference in the program? In LabVIEW, you typically want to place them outside of the While Loop in the host VI.

Andy Chang
National Instruments
0 Kudos
Message 2 of 5
(3,396 Views)

could be related to this known issue--

FPGA FIFO reset behavior—When you use an FPGA target emulator, FPGA FIFOs reset when the VI is stopped and then started again. When you use an FPGA target with Interactive Front Panel Communication, FPGA FIFOs do not reset when the FPGA VI is stopped and then started again. To reset the FIFO, right-click the FPGA target in the Project Explorer window and select Download from the shortcut menu. When you control an FPGA VI using Programmatic FPGA Interface Communication, use the Close FPGA VI Reference function with the Close and Reset shortcut menu option selected or the Invoke Method with the Reset method selected to reset FPGA FIFOs

 

see Knowledgebase

Also remeber to load the FPGA Read/Write VI's dynamically from testStand and dump them after.  Thechange to the data type causes the vi to need to recompile so it can't stay in memory if you need different types of data.

Message Edited by Jeff Bohrer on 10-27-2009 02:21 PM

"Should be" isn't "Is" -Jay
Message 3 of 5
(3,393 Views)

Thanks Andy and Jeff.

 

Andy, the open and close of the FPGA reference is outside any while loop. In fact, the phenomena is noticed without any while loop. Just run the VI which has one open and one close FPGA reference wired to each other (no otehr code) and the handles will increase by 3 when the VI is exited.

 

Jeff, I tried everything you mentioned (download from the Project Explorer, Close and Reset ticked on the Close Reference, and using the Invoke Method to reset the FPGA FIFO's just before a Close Reference). The problem still occurs.

0 Kudos
Message 4 of 5
(3,374 Views)

Sounds like its time to upgrade your software.   I hate to say it bluntly but your needs just outgrew your tools.  Such is commonly refered to as "Progress" but it isn't always fun. 

 

the LabVIEW 2009 development team made special focus on improving this exact area.


"Should be" isn't "Is" -Jay
Message 5 of 5
(3,365 Views)