LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabView Application program crashses randomly

Hi,

 

I have developed an application for a monochromator system using LabView 2012 (32-bit version) as my programming language.

 

My application performs calibrated scan using the Calibrated Photodiode from 300 nm to 1100 nm and then perform Device Under Test (DUT) scan from 300nm to 1100nm at an interval for 5nm.

My application crashses randomly when inside a for loop that goes from 300 to 1100nm at an interval of 5nm, whether it is performing a Cal Scan or DUT scan.

 

The one thing that is consistent is that it crashes whenever LabView executes my supplier’s .NET DLL/ function call. Once the application program goes into the monochromator function call, it does not give LabView the control back. The application is stuck inside the function call.

 

On Good days I am able to scan up to 30 parts with no crashing, while some days it can barely scan 5 parts. It is very inconsistent.

 

I am not sure if anybody have seen any problems using dll to interface with Labview 2012.

 

I have attached an image of problem I am encountering, where the LabView application is stuck in the DLL and it does not give control back to LabView.

I would appreciate any assistance on this subject.

 

 

Thank you,

 

Nirav

0 Kudos
Message 1 of 4
(2,302 Views)

About the only thing I can determine from that jpeg is that you could benefit greatly from this and especially this.  Please upload the actual code, if possible, so we can help you decipher it.

 

thanks!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 4
(2,292 Views)

Hi Bill,

 

Attached is the actual code for the Monochromator.

 

Under the Cal Scan and DUT Scan button, I have a for loop that increments at an interval of 5 nm. The supplier DLL is where the LabView program crashes.

 

Let me know if you need additional information that I can provide.

 

Thank you,

Nirav

0 Kudos
Message 3 of 4
(2,275 Views)

One thing that might help you is to try using SubVI's, modular programming methods and case structures as a opposed to flat sequence structures. Don't create local variables for your controls and indicators, just wire them directly up.

 

As for the DLL, are you getting any error statement back? With the great amount of inconsistency that you are describing I think that there may be some problems with the DLL. Try testing the DLL link in a simplified VI to see if you get the same behavior especially since it seems to hang-up in the same spot every time. If the DLL is causing the problem then it's probably not a problem with LabVIEW but with the DLL architecture.

Ryan
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(2,226 Views)