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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving Application Window Interrupts Data Acquisition

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

0 Kudos
Message 1 of 6
(2,535 Views)

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.

0 Kudos
Message 2 of 6
(2,525 Views)

Yes I have already tried to change it to run in any thread but it makes no difference whatsoever. Thanks for the reply.

0 Kudos
Message 3 of 6
(2,518 Views)

Contact the manufacturer and ask them why the dll doesn't play well with moving the window around.

0 Kudos
Message 4 of 6
(2,514 Views)

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.

0 Kudos
Message 5 of 6
(2,499 Views)

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...

0 Kudos
Message 6 of 6
(2,489 Views)