LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why do my intensity graphs and XY graphs flicker when updating?

When writing new data to my graphs, the cursors and grid lines flicker when updating. The graphs are in while loops and get new data written to them every iteration of the loop. I can have a graph and cursor showing and constantly write an array of NaNs to the graphs and they flicker. What can I do to make the updates seem transparent to the user?
0 Kudos
Message 1 of 8
(3,786 Views)
FIrst, try to chage the the properties to "smooth updates". (right-click...advanced...)
 
How fast does the loop run? If it is very fast, place the graph terminal in a case structure that is only true a few times/second. You don't need to update it at every iteration if the loop is very fast.
 
How big is your graph area? How big is your 2D array? Make sure they match. (e.g. It does not make sense to send a 10000x10000 array to a 100x100 pixel intensity graph).
 
Also make absolutely sure that you don't have overlapping objects on your front panel. They severely impact graphics speeds.
 
Depending on the details of your application, you might also be able to use a picture indicator instead.
Message 2 of 8
(3,785 Views)
Smooth Updates does nothing. Some of the arrays are 500x100 writing to a graph that is 230x218. One of the graphs is only getting one point written and is larger than a pixel. Both flicker.
 
Does graph boxes extending slightly beyond the edge of a tab panel count as overlapping?
 
The loop has a 5ms delay and takes about 10ms to execute, even slower when doing data aquisition, it's very large. Writing data to the graph only when data has changed would probably hide the problem and is probably a better implementation, but the graphs seems like they should be able to update without a flicker.
 
Indicators are not possible in this case because the user needs to move cursors on the graphs. 
0 Kudos
Message 3 of 8
(3,773 Views)
It definitely does not make sense to update the graph every 5-10ms. (It would be fine to update e.g. every 20th iteration)
 
Oh, I did not see that you have mutiple graphs! How many graphs are there?  How is the CPU usage while running the program?
 
(Can you set your graphs temporarily to "syncronous display" for a quick check: Will this dramatically reduce your loop rate? Just wondering how much work the graphs are actually doing).
0 Kudos
Message 4 of 8
(3,766 Views)
Attached is a very simple vi that demonstrates my problem.  There are two graphs with cursors. Every time the update button is pressed, the cursors flicker. If you change the wiring of the graphs case structure, you can update every iteration, or on a multiple of the update control. All three cause flicker.
0 Kudos
Message 5 of 8
(3,763 Views)

The problem I am facing is somewhat related to the above mentioned issue.

 

My objective is to make a sweeping spectrogram, i.e... As the data comes in, calculate spectrogram and display on intensity chart. Now the issue is to make the transition/sweep as smooth as possible. But I observed two problems with my implementation.

 

1) First, there is flicker in the display, to understand that please refer to the image I shared named "flicker in sliding intensity chart.jpg" and run "sliding 2d array general.vi".

 

2) Second, there a random minor change in the contents of the spectrogram as the spectrogram sweeps. To understand this problem please run "FileReadSpecPlot5.vi". Notice the small blue dots in the sweeping spectrogram, they are also flickering instead of only sweeping to the left.

 

P.S.. They are not my original VIs, they are just prototype. Original project VIs are larger enough.

 

Regards,

Abubakar Rehman

NI Research Officer at National Systems

0 Kudos
Message 6 of 8
(3,321 Views)

Can you place reasonable data in to the Oarray and Narray controls, make their current values default, and re-save the VI so we have something to work with?

 

(I would also recommend an algorithm that operates "in place").

0 Kudos
Message 7 of 8
(3,282 Views)

@altenbach wrote:

...

 

(I would also recommend an algorithm that operates "in place").


 

 

 

Spoiler

It should not make me smile but it did. Christian has a total 7 tags and five of them are variations on "in place".

 

 

 

Ben

 

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 8
(3,278 Views)