LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

What is causing the long delay when stopping the VI?

I have heard the normal explanation about dangling references and large array allocation. But, this one stumps me. I have a medium-sized application runs fine and quits fine if I don't call the VI attached. If I do activate calls to the VI I experience a long delay roughly proportional to the time the application runs. The VI attached simply changes the background color of a cluster based on a boolean alarm array. It looks to me like I've made sure to close all references, but perhaps I'm missing something.

Note that the VI is created in LabVIEW 6.1.

When the long delay occurs, the application is trying to quit or stop. The processor is 99% comsummed by LabVIEW and the LabVIEW process is not responding.
After a while (1-5 minutes) all is restored to normal.

Any insights?

Thanks,

Daniel L. Press
PrimeTest Corp.
www.primetest.com
0 Kudos
Message 1 of 4
(2,900 Views)
Hi Photon Dan,

I do not see your VI that you said is attached.
It does not matter because I do not have 6.1 loaded yet (still finishing up projects written in 6.0.2).

So, I can only ask questions (that you have probably thought already, but here goes).
Is the boolean array large?
What does your memory look like when using the offending VI? (It takes a long time to allocate and clean-up virtual memory).

I will watch for your reply in case I can help.

Always interested in making it go faster,

Ben
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,900 Views)
Oops, I guess my attachment didn't happen.

The boolean array is sized to the number of channels that are active. That number is between 1 and 16.

I have taken the application in a different direction. Instead of using the control references to set the background color of my clusters, I'm now using a big boolean control with the TRUE case painted red.

For some reason, the delay upon stopping is greatly reduced, but still there. I have used the VI Profiler while running as well as the Windows task manager. Neither one shows any evidence of a memory leak. When running, task manager says I'm using 216 MB of RAM. I've got 256 MB so I shouldn't be relying on virtual memory.

I've attempted to attach that VI again, but I converted it to 6
.0.2.

- Dan
0 Kudos
Message 3 of 4
(2,900 Views)
Don,
you do not close all the Panel.Controls[] references, but only the subset you use. You have to close them ALL, whether you use them or not.


LabVIEW, C'est LabVIEW

Message 4 of 4
(2,900 Views)