LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Tab control - takes long to change between tabs

Solved!
Go to solution

Hi everyone,

 

I am using a tab control to display a set of results on each tab. So, I have a tab control with three tabs and each tab consists of 16 indicators which are updated with values. Now, when I run the program, it is taking a long time to switch between these tabs. For instance, if I am currently on Page 1 and then I click Page 2, it takes around 5 seconds to change the tab. I know this should be like this but I cannot understand what is happening. 

 

I need help, please. I know it is a silly question but I cannot make heads or tails of it!

 

Thanks!

0 Kudos
Message 1 of 10
(4,337 Views)

Are any indicators overlapping each other?

 

Attach your VI so we can look at it.  Your description of 3 tabs with 16 indicators doesn't sound like it would be causing a problem.

0 Kudos
Message 2 of 10
(4,324 Views)

I'd like to see the VI, but the only thing I can think of is are there any user events occurring that might be locking the front panel for an extended period of time causing the delay in changing tabs?  16 indicators really shouldn't cause any delay.

LabVIEW Champion
Certified LabVIEW Architect
Certified Professional Instructor
0 Kudos
Message 3 of 10
(4,312 Views)

Sure, here's my VI. I realised i made a mistake in my post. I have more than 16 indicators in each tab but I don't know, do they slow it down that much??

0 Kudos
Message 4 of 10
(4,292 Views)
Solution
Accepted by topic author racdar92

It takes me about a second for the tabs to switch when it is in edit mode.

 

But I notice you have the tab control grouped with other items.  Any reason?

 

When I ungrouped that group so that the tab control was its own entity, switching tabs was much quicker.

Message 5 of 10
(4,280 Views)

Oh, no reason at all actually, just for structuring to be honest. I'll try that out. Thanks very much for all your help!!

0 Kudos
Message 6 of 10
(4,276 Views)

Yep, worked like a charm!! Thanks 🙂

0 Kudos
Message 7 of 10
(4,274 Views)

I agree, once I ungrouped everything on the tab controls they seemed to switch just fine.  I did notice there were several nested groups within the items.

LabVIEW Champion
Certified LabVIEW Architect
Certified Professional Instructor
Message 8 of 10
(4,273 Views)

I would also recommend to streamline the code a little bit.

 

For example the cases in frame#1 differ only by some small operations. All that belongs inside the case is the code that differs. none of the local variable seems to be necessary. All that belongs in the smaller cases are the colorbox constants (might be easier to index into an array of colors). If you autoindex on the For loop boundary, you don't need to wire N and you can eliminate the "index array" operation.

In frame #2, you could autoindex on arrays of references, all in a single FOR loop (same for all the initializations).

You have race conditions. Initializing all the colors (to the right and left of the sequence structure) all occur in parallel to the sequence structure. You should create a data dependency to ensure things occur in a defined order.

 

You can probably eliminate all these hidden indicators and associated local variables. The wire is the data!

 

0 Kudos
Message 9 of 10
(4,265 Views)

Hey everyone,

 

The slow switching behavior with tab controls containing grouped items was tracked with CAR 477864 and has been fixed in LabVIEW 2015.

0 Kudos
Message 10 of 10
(4,103 Views)