LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Moving floating window stops VI execution

Hi, Ive noticed some strange behaviour and dont know if it is just windows itself that is the cause. My application consists of mulitple floating windows that can be opened by the user, but the moment the user starts to drag the windows to new positions the VI execution stops. Im running a 2.4GHz dual core with 3gigs of ram and noticed that whilst the window is being moved the CPU usage jumps to 50%. Its not giving any errors, the whole application seems to just pause for the duration of the drag. My question is, is this to be expected? and is there a workaround? because Ive played abit with the priorities and execution threads of the VIs, but I still get the same results.
0 Kudos
Message 1 of 5
(3,233 Views)

Do you have any timing in your loops (it is always a good idea to have loops wait/sleep to aid the OS in thread switching), are your time critical code an a seperate thread (loop).  Proper timing of vi will alleviate these issues.  Remember though that when you move the screen there is alot of stuff to do, redraw all controls ....

Try to put a small wait in your loop if possible and see if this helps, it should make the thread switching less noticable.

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 2 of 5
(3,224 Views)
I do this all the time without problems.

Is there any code in the floating windows? Perhaps an event case? Sounds to
me like there is an event that triggers itself, or an event that can't keep
up or something.

Does the code work when you change the floating windows to normal dialogs?

Regards,

Wiebe.


0 Kudos
Message 3 of 5
(3,212 Views)
The thing is all my VIs use a queue mechanism to accomplish synchronizing, and I use delays where needed. Under normal running conditions overall CPU usage is only 5%, I can understand that updating the window takes alot of resources, so Ive come up with a simple solution for the meantime... by disabling in xp the show window contents while dragging property. Can there be any code running in a floating window using Qs for inter VI communication, does dragging the window influence Qs? like I said Ive tried adjusting the execution and threading options, but with little success.
Message 4 of 5
(3,203 Views)

"ANT0074" <x@no.email> wrote in message
news:1228230609022-817566@exchange.ni.com...
> by disabling in xp the show window contents while dragging property.

I always disable window contents while dragging, so that might explain why I
never have problems.

>Can there be any code running in a floating window using Qs for inter VI
communication, does dragging the window influence Qs?

Sure. You can do anything you do in a normal diaglog, and you should't need
to do anything specific. to make it work in a floating window.

> like I said Ive tried adjusting the execution and threading options, but
with little success.

Don't. It is rarely usefull.

Have you tried what happens when you set the diagrams to normal? Not as a
solution, I know it is not what you need. But if the same problem appears,
we can rule out a few things...

Regards,

Wiebe.


0 Kudos
Message 5 of 5
(3,192 Views)