LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Occasional error message saying "Labview.exe has stopped working"

Hi,

 

I am using Labview 8.0 on a Windows Vista operating system to communicate with lab instruments through GPIB. Occasionally, when one of my programs finishes running, an error message appears saying "Labview.exe has stopped working". The error window gives me the option to close the program or debug. After clicking debug, Windows cannot find the source of the error and the all labview applications get closed. Any ideas? Thanks.

0 Kudos
Message 1 of 7
(3,218 Views)
What is your code doing beside communicating to GPIB?  You might have something else in your code that is actually causing the crash and not the GPIB.  How occasional is this problem happening?  Is there any other pattern you can see with when you have the crash and when you do not?
0 Kudos
Message 2 of 7
(3,184 Views)

I had a very similar issue this morning. I was using a self-built DLL, which I had recently modified to remove some error-checking. However, in cleaning up, I missed a couple of "fclose()" calles in the DLL. When the calling VI encountered these, LabView crashed with a similar "debug" option. Once I got those removed, then the app ran much better. 

 

Hope this helps...

 

DOK

0 Kudos
Message 3 of 7
(3,179 Views)
The code is communicating through GPIB with a Stanford Research Lockin-Amplifier. Measurements are taken 24 times via a FOR loop and at the 9th and 17th loop, settings are changed on the Lockin. The data is save in arrays that are "shift registered" around each loop. At the end of the FOR loop, the visa is closed with the lockin and the arrays are stacked together and saved in a spreadsheet. There does not seem to be any recognizable pattern for when the program throws the error. Is there a compatibility issue with Labview 8.0 and Windows Vista? Thanks.
0 Kudos
Message 4 of 7
(3,164 Views)

[Rant ON]

Anything can happen with Windows

[Rant OFF]

 

It may not be an issue between Windows & LabVIEW 8.x

 

You may need to try and trap the error by logging each and every message or transaction that takes place.  Write it to a text file for later examination.  You might save things like number of iterations, all communications, sniffing the error cluster, etc.  It almost sounds like something is being written to a location that it should not write to... 

 

You may want to post your code so that we can look at it in case there is something obvious.

0 Kudos
Message 5 of 7
(3,156 Views)

The code that I have been having an issue with is attached. The main program is called "Frequency Sweep Real Time2". The other two attachments are subVI's used within the main program. I am a young programmer and I have never had any official training with Labview so sorry if my Labview programming is unconventional or just plain bad. Thanks to whoever looks this over.

 

-Ryan

0 Kudos
Message 6 of 7
(3,138 Views)

Hi Polymer,

 

A word of warning is that LabVIEW 8.0 is not supported on Windows Vista. I believe 8.2.1 was the first version that was.

 

In general, looking at your code, remember the mantra that you should try to keep your block diagrams to one screen size. If it gets bigger than that, you need to look into modularizing the code a bit into subVIs. For instance, all the stop with building the XY Graph at the end could be a subVI. In the newer versions of LabVIEW there is a magical auto-cleanup tool, as well, which would tighten up some of the features of your code.

Jeff | LabVIEW Software Engineer
0 Kudos
Message 7 of 7
(3,117 Views)