LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Inconsistent waveform chart update

Solved!
Go to solution

Hello guys,

 

I'm doing some test with the waveform charts. I have two plots, one which updates every 3 minutes and has 1 hour of delay vs the first one that updates every second (this delay and freq update can change, but not frequently). I have been doing some tests in the attached VI that you can check.

 

I want the chart features like x-scrollbar and auto-scroll, that's why I prefer to avoid the use of xy plot. And also, I don't like the needed append in the xy plots that slow down things when fast data update is needed.

 

The thing is that the "Comb Chart" is doing all I need and want, but it's updating incosisntently, and some points are missing but only visually. If you move the scrollbar you can see how they appear again... What is causing that? Which are my options to get the same result but with a consistent visual update?

 

Best regards,

 

 

EMCCi

0 Kudos
Message 1 of 13
(2,133 Views)

Please fill all controls with reasonable default values before saving and give them reasonable labels. "Numeric" is not a reasonable label for "number of iterations" and Zero is not a reasonable default value. A test VI need to work without us having to guess what you entered in all the controls.

 

Why does your loop run without any timing for the first ~25k iterations.

Your charts seem to have a fixed point spacing, so why are you updating t0 with each point? Do you really need a 100k history?

 

So tell us exactly how you run it, what you observe, and what you like to observe instead.

 

0 Kudos
Message 2 of 13
(2,120 Views)

You are completely right, sorry. The post was made after a long day of job but I should have prepared better the question and the VI. I have re-uploaded it, I hope it's better now.

 

  • Why does your loop run without any timing for the first ~25k iterations: To have some historic fastly added to the "RT simulation"
  • Your charts seem to have a fixed point spacing, so why are you updating t0 with each point?: Because there is the possibility that it could change without previous warning, but only in rare occasions
  • Do you really need a 100k history?: Yes, in fact 75k should do the trick. But more or less.

 

What I want to observe is what "Comb Chart" is showing, but without the ghosting points. At least in my computer, the chart updates the blue line correctly, but the red points sometimes are updated and sometimes not, it jumps from updating/not-updating state every few seconds (5-15s). But, when the red points are not being updated, if I move the scrollbar they magically appear, so I think that is something cosmetic because the points are in fact stored in the chart.

 

Best regards,

 

 

EMCCi

0 Kudos
Message 3 of 13
(2,086 Views)

This looks similar to an issue I ran in to in 2013. It got a CAR but is not fixed:

https://forums.ni.com/t5/LabVIEW/Chart-Redraw-Issue-with-Multiple-Plots/m-p/2755616

 

It looks like this:

chart redraw issue with multiple plots1.gif

As you can see on the bottom chart, the white sine plot is updated in chunks. The red single point plot is updated less often. When both plots are plotted, the white plot updates only when the red plot has a new point, but only parts of the plot is drawn.

 

At that time, I wanted to use the superior performance of the chart, but had to abandon it due to these kinds of issues. When I asked NI in 2014 about these, they hinted about what later became NXG, which would save us all...

Certified LabVIEW Architect
0 Kudos
Message 4 of 13
(2,047 Views)

Yes, it's similar but just in the reverse way. It's the low resolution one which isn't displayed properly.

 

Are charts broken for non-trivial applications then? Or I'm doing something wrong? Because I don't have experience with waveforms and charts in general.

 

Also, doesn't seem trivial to auto-scroll a graph, so which are my options? Auto-scroll a graph with property nodes or there is a way to do display what I want correctly?

0 Kudos
Message 5 of 13
(2,034 Views)

Hello guys,

 

I have been trying different things but nothing seems to work for me.

 

I have tried to do the job with an xy plot, but as you can check in the attached VI "XY plot test.vi", it has performance problems when the amount of points starts to rise. Open the VI, run it, click pause button to fastly execute the first 50k iterations (to avoid plot updating and property nodes executions), and disable it after. Then you will check that the VI runs slow due to the amount of points. I know that I have runing a build array inside a loop, but the VI takes almost 1 second to append a new point to the plot. This absolutely too much for being caused by a build array, and also the scrollbar feels slow (even with the VI already stoped, so I think it's the plot).

 

In the other hand I have also tried if the "Force redraw" method of the chart was going to solve the original chart problem, but it does nothing (Charts test.vi). It's a pitty because the "Comb Chart" does everything I need, but it has displaying problems with the second signal. I have tried also with different loop timmings but also no change there. Also, when the VI finishes running, it's easy to check using the scrollbar that despite the drawing problems while running, all the points are there at the end.

 

Could I get some help? I don't know how to make it run properly... Thanks in advance,

 

 

EMCCi

Download All
0 Kudos
Message 6 of 13
(2,011 Views)
Solution
Accepted by topic author EMCCi

What you want to do is to decimate the points to only display as many points that there are available pixel-"columns". 

 

See page 3 of https://labview360.com/document/an/pdf/an202.PDF

 

Certified LabVIEW Architect
Message 7 of 13
(1,980 Views)

Yes, it makes sense! I can't try it right now but I think it should work.

 

Thank you so much!

0 Kudos
Message 8 of 13
(1,951 Views)

I'm working on it right now and I have a question.

 

The example is with a waveform plot with an X axis without units. So, for each decimation range they take the max & the min and send them to the decimated Y array in the same order they have taken place. That's all, they don't have to worry about their X values. But what happens with an XY plot where X axis is time?

 

Example can be found here: https://forums.ni.com/t5/Example-Code/Managing-Large-Data-Sets-in-LabVIEW/ta-p/4100668 (GLV_GigaLabVIEWGenerateAndDisplay.vi)

 

I think that the best option would be to send Ymin & Ymax with their respective original timestamp, when they have taken place. It's like that how it should be done?

 

Thanks for your time,

 

 

EMCCi

0 Kudos
Message 9 of 13
(1,925 Views)

On the X scale, you have a min and max for the range. Then you have the available number of pixels horizontally for the graph (Plot Area.Size.Width). Then you know what time-range each pixel represents and thus what pixel your data belongs to.

Certified LabVIEW Architect
0 Kudos
Message 10 of 13
(1,903 Views)