From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
02-26-2015 07:09 PM - edited 02-26-2015 07:10 PM
I am acquiring data from a spectrometer over usb in labview which uses a DLL call to acquire the data at various rep rates which works fine so long as i dont interact with the applicatioin window at all while doing so, but if i do something as simple as move any of the application windows around or interact with the application in any way it causes the spectrometers to miss data and sometimes causes them to loose comunication. This is highly reproducable.
I have tried chaning all the execution settings but nothing seems to help.
Any Ideas?
Thanks
02-26-2015 07:47 PM
I'm not an expert on .dll's. There are others on here who can give you advice that is more on point.
But the dll probably runs in the UI thread. What color is the top of the Call Library Function Node? When you go to move the window, it's user interface, and that steals CPU cycles from the dll for being able to run.
If possible, you might be able to assign the dll to run in any thread. However, that could also cause the dll to cause your app to crash down around you if it wasn't written in away to allow that.
02-26-2015 07:51 PM
Yes I have already tried to change it to run in any thread but it makes no difference whatsoever. Thanks for the reply.
02-26-2015 07:57 PM
Contact the manufacturer and ask them why the dll doesn't play well with moving the window around.
02-26-2015 11:16 PM
I am not sure if it can help, or related any way, but in the past i had some trouble with interfacing a mass spectrometer via the given dll. It crashed my LabVIEW code often, even the LV developer environment. In my case the solution was to create an exe out of my code which made the dll operations stable. I cannot remember the details, but LabVIEW handles differently dlls depending whether you are using it from the dev environment or from the runtime engine.
02-26-2015 11:54 PM
But I agree with RavensFan. The problem is in the dll. The manufacturer (their programmer) of it clearly did a poor job, as in my case. So the best solution would be to ask the company to fix the dll, so it can work properly. In my case I was just lucky that the workaround (make exe from my code) gave a solution...