06-05-2013 01:29 PM
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
06-05-2013 01:53 PM
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!
06-05-2013 02:17 PM
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
06-06-2013 01:12 PM
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.