LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Separate UI thread/loop/??

I am working on a LabView program which does a lot of data acquisition.  The program is setup as a state machine and some sub-VI's take 10 or more seconds to complete (FFTs, data acquisition, etc..).  I have tried everything that I can think of to make the user interface usable during this time. However, if a user clicks on a button, it takes 10 or more seconds for the sub-VI to finish and to acknowledge the button.  I have tried putting things in events blocks, separate while loops, etc...  Is there anything that I can do to make the UI more responsive?

 

Thanks!

Drew

0 Kudos
Message 1 of 2
(2,783 Views)

First, make sure the code that handles the user interface is in a separate loop, preferably with an event structure.  It can pass messages into the state machine loop by way of queues.

 

For the subVI's, it depends on what they are doing and what you want them to do at certain button presses.  Do you want a subVI to end early?  You could also pass in a reference to a queue or notifier into the subVI.  Have the subVI check for any messages during its looping process such as a command to end early.

0 Kudos
Message 2 of 2
(2,777 Views)