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,537 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,527 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,520 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,516 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,501 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,491 Views)