03-11-2014 08:23 AM
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!
Solved! Go to Solution.
03-11-2014 08:42 AM
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.
03-11-2014 08:56 AM
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.
03-11-2014 10:07 AM
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??
03-11-2014 10:35 AM
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.
03-11-2014 10:37 AM
Oh, no reason at all actually, just for structuring to be honest. I'll try that out. Thanks very much for all your help!!
03-11-2014 10:37 AM
Yep, worked like a charm!! Thanks 🙂
03-11-2014 10:38 AM
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.
03-11-2014 10:57 AM - edited 03-11-2014 11:25 AM
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!
08-11-2015 01:13 PM
Hey everyone,
The slow switching behavior with tab controls containing grouped items was tracked with CAR 477864 and has been fixed in LabVIEW 2015.