LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

cursor flicker in graph

I have a X-Y graph that is include in a "infinite" while-loop. The "smooth
update" is ON so that the graph doesn't flicker. But if I activate the
cursors they flicker (not the datas in the graph, only the cursors). I have
tried to put a delay in the while-loop but it continue to flicker.

I have not found the solution on the labview's web site.

Does anyone have an idea?

Thank's


I use Labview 6.0 on a Pentium500MHz
0 Kudos
Message 1 of 6
(4,172 Views)
This may have to do with your loop. If you can, or if it is applicable, make sure you have a delay in your loop.
0 Kudos
Message 2 of 6
(4,172 Views)
I've actually noticed this myself. It seems that the cursor is not updated smoothly the way the graph is, which means that when you redraw the graph very quickly, you might notice a small flicker. You can generally reduce this to where it is virtually unnoticable by having a delay in the loop and only redrawing the graphs when you have to, which is usually good practive anyway.
0 Kudos
Message 3 of 6
(4,172 Views)
This isn't entirely true. In my experience, you get the flicker each time you redraw the graph. Adding delays in the while loop only spaces out the flickers, I can't seem to get rid of them. Not to mention delaying my redraw loop removes other graphics that are essential feedback. In my case, I'm selecting a piece of a trace and having it draw the fit line over that. If I drop my redraw to, say, once a second, the lines on the graphs update at that rate, which is unacceptably slow. And while the cursors no longer induce seizures in epileptics, they're still very annoying. Any other ideas?
0 Kudos
Message 5 of 6
(4,172 Views)
....


>
> Does anyone have an idea?


First the background. The graph typically erases, draws the grid if
visible, then draws the plots into an offscreen bitmap. The bitmap is
then drawn to the window all at once, and this help to get rid of the
flickering since you will not see a graph half erased in one video
refresh, erased and half gridded, then gridded with some of the plots as
intermediate displays.

The graph cursors are not drawn into the bitmap so that they are better
animated when someone grabs one and drags it around the plots. If the
cursor is drawn into the bitmap, then how do you erase the cursor in its
old location? By redrawing a sliver of graph, which takes awhile. If
the cursor is drawn straight to the window and everything el
se is in the
bitmap, then you can draw a sliver of the bitmap to the window whenever
you want to erase a cursor. And of course the tradeoff is that if the
cursor is drawn to the window it flickers a little bit, but animates
well. If drawn with the plots to the bitmap, it flickers not at all,
but animates poorly.

We tried to improve this around LV5 or so by making a distinction
between cursors that were movable by the end user and those that were
not. Problem is that some users also animate cursors using property
nodes. Oops. So the improvement was removed, sort of.

In your .ini file, if you set smoothGraphMarkers to TRUE, and disable
user interaction with your cursors, you will get smoother cursors. If
you animate the cursors using property nodes once the plot is up, this
will take longer, and of course it doesn't allow the user to grab and
move the cursors, but maybe it will help.

Greg McKaskle
Message 4 of 6
(4,172 Views)
How about this for an idea. Assuming the background is black and the trace is yellow, update the trace as follows:

1) Draw a black line over the yellow line.
2) Draw a new yellow line.

Then, you wouldn't have to update the whole bitmap. Not sure if this would help with the flicker, but it is a different approach.
-Matt Bradley

************ kudos always appreciated, but only when deserved **************************




0 Kudos
Message 6 of 6
(4,172 Views)