LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

All labview code pauses when a window is being drug, then resumes when released.

My code seems to pause when I am draging labview windows around on my computer (by the windows title bar). I preformed a count down timer to show that when drug and then release the window, that time/code did not continue.
0 Kudos
Message 1 of 5
(2,937 Views)
If the VI is running in the user interface thread that's what is to be expected.

Make sure code that needs to run unaffected by user interface events runs in a different thread (have it in VIs set to run in a different execution system and make sure there's no data flow dependancies that will halt the execution); you select what execution system to use from the VI properties; execution page).
Message 2 of 5
(2,937 Views)
This will also happen if you are calling a dll that is not thread safe and must be run the user inerface thread.

To check this, double click on the Call Library function, and in the configuration dialog, there's a dialog ring to select which thread to run in. If it's set to 'Run in UI Thread', that will cause the execution pause. You can try switching it to 'Reentrant' and see if it works, but if the dll was not written to be thread safe, this will cause problems.

Let us know how it turns out.

Ed


Ed Dickens - Certified LabVIEW Architect
Lockheed Martin Space
Using the Abort button to stop your VI is like using a tree to stop your car. It works, but there may be consequences.
Message 3 of 5
(2,937 Views)
I had a property node in the loop. This cause to to freeze. Never would have figured it out without your help. Thanks to all!

Roger
0 Kudos
Message 4 of 5
(2,937 Views)
I was able to fix the digital out commands with your help. The problem I still have is with Analog In. I have attached a copy of the code. If you wouldn't mind taking a peak at it to see why it freeze when mess with the UI thread. ie move windows.

All the c-nodes are reentrant and all sub vi are set to a different thread. I belive!?

Thanks in advance!
0 Kudos
Message 5 of 5
(2,937 Views)