LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab control unresponsive

I have a program with two main loops - one that handles data acquisition and displays data, and another that has an event structure to handle front panel events. The front panel is a tab control with different indicators, graphs, and gauges on the tabs. I have a cluster of booleans that are buttons on the front panel that allow the user to change the tab (there is an value change event in the event structure). When there is no data available, the tab control works well and I can move between tabs when pressing the buttons. However, when I start acquiring data and I try to change tabs, sometimes the request is completely ignored, even though I have probed the input to the tab indicator and I can see the value changing. After a couple presses of a button I can usually get it to change the tab. Any ideas on how I can fix this unresponsiveness?
0 Kudos
Message 1 of 12
(3,394 Views)

Does the event structure handle both the boolean value changes as well as the tab control value change?  How much CPU time is the DAQ task using?  Are there any dependencies between the loops?

 

Please attach your vi, if possible.

 

 

>

"There is a God shaped vacuum in the heart of every man which cannot be filled by any created thing, but only by God, the Creator, made known through Jesus." - Blaise Pascal
0 Kudos
Message 2 of 12
(3,379 Views)

The event structure handles only the boolean cluster change, there is no event for the tab control change.

 

It looks like the data acquisition loop is running about every 2 ms (it's not DAQ, it's NI-CAN).

0 Kudos
Message 3 of 12
(3,366 Views)
Please show us some simplified code. There is no easy way to troubleshoot this from a description.
0 Kudos
Message 4 of 12
(3,353 Views)
event loop.png
0 Kudos
Message 5 of 12
(3,348 Views)

Well, a VI would be much more helpful compared to a picture. We cannot see the other cases, for example!

 

A big no-no is placing the event structure inside a case structure unless all other cases complete fast! Of course here "idle" is a constant, so the case structure is not even needed. 😉

0 Kudos
Message 6 of 12
(3,331 Views)
Another common error is to leave the checkbox set to Lock Front Panel until Event completes, on one or more events.
0 Kudos
Message 7 of 12
(3,313 Views)

I am hesitant to post much more code; I thought that maybe someone might have had a similar issue.

 

I did try unchecking the Lock Front Panel checkbox but it did not make a difference.

0 Kudos
Message 8 of 12
(3,306 Views)
You may be starving the processor if you don't have any timing in your loops.  It appears that you don't have any timing in your "event" loop (which shouldn't be a problem, with caveats) and if you don't have a "wait (ms).vi" in your acquisition loop, that may be the source of your problems.
National Instruments
Applications Engineer
0 Kudos
Message 9 of 12
(3,279 Views)

 

Just curious, but why are you using the Tab Indicator and booleans to change tabs? Why not use a tab control and allow the user to click directly on the tab they want? Then you can set up an event for the tab control be clicked. With a control, if you need to change things on the tab display you can just property nodes to update the control.

 

________________________________________________________________________________________________ 

After a couple presses of a button I can usually get it to change the tab. Any ideas on how I can fix this unresponsiveness?  

________________________________________________________________________________________________

And judging by your issue, it sounds like you are clicking when your code is not in the idle state. Therefore, your button clicks aren't being read (as is mentioned above in other posts). If this is the case, you should probably switch to producer consumer architecture. The reason after a couple clicks works is because you happen to finally click while you are in the idle case.
Message Edited by for(imstuck) on 05-26-2010 04:10 PM
0 Kudos
Message 10 of 12
(3,261 Views)