From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with blinking chart in tabcontrol

Hello everybody,

 

I'm working with a vi where on several tabs charts are embedded. If a chart of a tab that is not in the foreground is set to blinking, the corresponding chart can be seen on the active tab. Is there a solution to this problem, or is that just a bug.

 

A short, simplified example to illustrate this behavour  is attached to this message (Labview 2010).

 

Thank you in advance,

Johannes

Message 1 of 11
(3,664 Views)

@JohannesE wrote:

Hello everybody,

 

I'm working with a vi where on several tabs charts are embedded. If a chart of a tab that is not in the foreground is set to blinking, the corresponding chart can be seen on the active tab. Is there a solution to this problem, or is that just a bug.

 

A short, simplified example to illustrate this behavour  is attached to this message (Labview 2010).

 

Thank you in advance,

Johannes


Hello Johannes,

 

The problem lies in your code because you're constantly redrawing the graphs regardless of whether or not they are on screen; this causes the glitching effect in your program. You must only redraw the charts when they're in view, via use of your tab control. I've modified your VI to include a case structure based on your tab control which will only blink the graphs when they're selected in the case structure.

 

Remember to code smart, you don't want to waste processor time on the indicators you can't see anyway!


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Message 2 of 11
(3,657 Views)

Hi Alex,

 

first thanks for your reply.

 

but to be honest, for me it looks more like a workaround then a feature as intended.

In fact what I don't understand:

Why does the fact that I set a chart to blinking mean that it is always redrawing? Shouldn't the engine take care of that and decide that even if the property blinking is set, the background stuff doesn't need redrawing?

Even if we accept that a chart on the background is updating constantly and that we are wasting CPU, why does it get visible on the active tab?

 

Of course I will implement your suggestion in my (more complex) code. But in my opinion the runtime engine should take care of such stuff to make the real code less complicate.

 

Regards and thanks again,

Johannes

Message 3 of 11
(3,653 Views)

That is a bug!

 

I reported for LV 8.2.

 

Alex,

 

Please very the bug is already logged.

 

It is perfectly legal to update a chart that is on a non-viewed page, in fact there have been many bugs reporting issues regarding the chart/graphs not refreshing corectly when switching to the ptab page holding them.

 

The only work-around that I know of (for LV 8.2) was to not use the blink option.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 4 of 11
(3,648 Views)

@Alexander.thomas wrote:
...

Hello Johannes,

 

... You must only redraw the charts when they're in view, via use of your tab control. I've modified your VI to include a case structure based on your tab control which will only blink the graphs when they're selected in the case structure.

 

...


 

Please cite a reference or retract that statement.

 

Ben

 

Sorry but Blue-bars get quoted like they are gospel so please back this statement up.

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 11
(3,642 Views)

Hello all,

 

I checked the Corrective Action Request (CAR) database and this bug has indeed been reported already (#180955). I apologise that my workaround solution appeared to ignore that this is definitely a bug in LabVIEW that is actively being worked on by our R&D team. The particular problem you are having can be resolved through coding efficiency, although the tab control should not show the graphs which are blinking on hidden tabs. However, it is still best to avoid performing this operation on the hidden indicators because it is essentially unnecessary; but I do understand your concern. Until this issue is resolved I hope you are satisfied with my work around. 

 

I researched some other aspects of this problem and concluded that this bug also affects the Intensity Graph, Intensity Chart, XY Graph, Mixed Signal Graph and Digital Waveform Graph. 

 

Thanks for bringing this to our attention, and again, apologies for any confusion! 


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Message 6 of 11
(3,607 Views)

@Alexander.thomas wrote:

Hello all,

 

... However, it is still best to avoid performing this operation on the hidden indicators because it is essentially unnecessary; but I do understand your concern. Until this issue is resolved I hope you are satisfied with my work around. 

 

I researched some other aspects of this problem and concluded that this bug also affects the Intensity Graph, Intensity Chart, XY Graph, Mixed Signal Graph and Digital Waveform Graph. 

 

Thanks for bringing this to our attention, and again, apologies for any confusion! 


 

The validity of that statement depends on how one defines "best".

 

If best is defined by "make LV as is look as good as possible" then I agree.

 

Most of the real users of LV may decide that the work required in buffering all of the updates that would have been posted to the chart and keeping a proper history so the chart can be populated if and when the tab is selected is "just bending over backwards to make LV look good".

 

LabVIEW does not need help to look good when it is working correctly and bugs are fixed in a timely manner. I have been updating charts on hidden tab pages since LV 6i and LV does a wonderful job of deciding if an object is visable and updating the image accordingly.

 

To close this posting I'll suggest anyone who is unsure if they should update or not update a hidden chart with a mini-challenge.

 

Try to write LV code that will buffer updates for hidden charts in a manner that does not severely impact the CPU to decide for themselves.

 

So as far as I am concerned, I take exception with the idea that our code should be looking at the selected tab before deciding to update a chart.

 

Ben

 

 

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 11
(3,581 Views)

Hi Alexander,

 

just to give another feedback of another user:

In most of my application cases, the limiting factor is not CPU power, but coding time. And that's exactly why I use LabView (and why our lab is paying a lot of money for it...): in most cases I'm happy with LabView because it does save me coding/working time compared to other languages.

What you tell me goes exactly in the opposite direction: I should take care myself of whether graphs are visible or not and correspondingly update it or not. But to be honest, that's exactly what I think the runtime engine should do: decide that for me, so that I can keep my code more simple, readable and faster to code.

 

So, good to hear that this issue already is on the todo list...

Greets and thanks again for your response,

Johannes

 

PS: I implemented your workaround and it now works reasonably well

Message 8 of 11
(3,574 Views)

Hi Everyone,

 

I think I've run across a similar problem.  Has this been resolved in LabVIEW 2012 by any chance?

 

Thanks,

Brian

0 Kudos
Message 9 of 11
(3,406 Views)

You know, it was my first week as an AE intern on the NI Forums when I happened to end up arguing with a Knight of NI... Smiley Embarassed

 

As an apology, I always referred to Functional Global Variables as Action Engines whenever I taught training courses.


Alex Thomas, University of Manchester School of EEE LabVIEW Ambassador (CLAD)

Message 10 of 11
(3,386 Views)