LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does labview close whilst my program is running?

I am running a program doing data acquisition using the PCI-6602 cards. Everything works fine but somehow after I have been doing acqusition and saving the data for approximately 2 days, I find out that the program has been stopped by LabVIEW and find all the windows closed including labVIEW. In my program I did not use any of the exit functions provided with LabVIEW but somehow, labVIEW exits by itself without issuing any error messages. Why is this happening?
0 Kudos
Message 1 of 6
(3,285 Views)
The fact that you have a problem after extended operation suggests to me that you're creating a problem where the OS shuts the program down. This might be an out of memory or file size issue. Check on how you're managing arrays and opening and closing references. Are you logging to a single file or multiple ones. What's the size of the data that you're saving? Have you looked in the Windows Event Log to see if there were any messages generated? Have you run the Windows Task Manager to check performance and memory usage?
0 Kudos
Message 2 of 6
(3,283 Views)
I am writing to multiple files once, that is I open the files, write all the data and close them again. I do not open them again then cos the next time I create another file. The performance of the PC is reduced drastically and even the memory usage.
0 Kudos
Message 3 of 6
(3,283 Views)
Check on how you're using arrays. Are you using local/global variables or using the property.values? String concantanation? There's a lot of things that could cause your memory to drop and most if not all can be fixed by proper coding. Without seeing the propgram, it's going to be hard to pinpoint the problem.
0 Kudos
Message 4 of 6
(3,283 Views)

I experienced a problem with LabVIEW 7.0 shutting down unexpectedly.  It may be completely unrelated, but I thought I'd mention it just in case.  My problem was that I was calling a DLL that used a reference handle.  At the end of my test (using TestStand), the test closed, and thus the DLL was unloaded from memory as well.  Because there was still a handle open to this DLL, LabVIEW must not have known how to handle this and shut down (or it confused Windows and it shut down LabVIEW).  In any case, the solution was to have a VI stay in memory which calls this DLL, and put the DLL in a the true case of a case statement wired with a constant false.  Thus, the DLL is never actually called by this VI, but it keeps the DLL in memory.

So if you call any VIs dynamically, etc., where a VI could be unloaded from memory, check those VIs and make sure you aren't leaving any references open or something like that.

Hope this is in some way helpful.

Tom

0 Kudos
Message 5 of 6
(3,195 Views)
Do you get any error messages?
0 Kudos
Message 6 of 6
(3,182 Views)