Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

jerked graph

I am charting real time data to a graph. The customers are feeling that the graph is jerked and it is important because they will have to watch the graph for a long time. How can I work to improve the fluidity of the graph ?
0 Kudos
Message 1 of 5
(3,938 Views)
One thing that this might depend os how often you are updating the data. The graph will basically try to autoscale the axis (if you enabled that) when you plot a data point to it and Im not sure how that could be made fluid. If you look at the charting example under MeasurementStudio\DotNET\Examples\UI\Graph\Charting, that graph seems fluid because the updates are coming at a fast rate. If you change the timer in the example to update every 1 second instead of every .1 sec, then the graph becomes jerky. Since you are plotting real time data, perhaps you could increase the sample rate or basically scale the axis yourself so that axis is not being updated with every data point.

Now if you are plotting data at a really high rate and its acting jerky, you could try updating your system specs to see that changes the behavior. And also, in the Measurement Studio help, there is a help topic called Optimizing Measurement Studio Graph .NET Controls that you can refer to for some tips on how to make the graph faster and not use as much resources incase you are low on resources anyway.

I hope this helps
Bilal Durrani
NI
0 Kudos
Message 2 of 5
(3,931 Views)
Hi and thank you for your answer.

I followed both your tips and the measurement studio help. Badly my graph is still acting jerky.

I m plotting data at a high rate but my system should not be a matter (p4 3.2Gh, 1G ram, fast video card). I send a very little C# example (one graph, one plot) to show you what's wrong.


Pipo
0 Kudos
Message 3 of 5
(3,909 Views)
The reason why this is happening is because in strip chart mode, everytime you update the point, the axis has to rescale itself. In this case, the axis (and all the displayed data) has to be scrolled back by a certain amount (based on the interval you specify) everytime the timer tick occurs. In the case of your example, this rescaling is occuring every 50ms. One way to avoid that scaling would be to use the scope chart mode on the x axis instead of the strip chart, but that might not be what you want.

According to persistance of vision studies, if an image is updating slower than approxiamately 10 frames per second (or slower than 10ms updates), the eye percieves the image to be jerky (there is probably more to this, but further research into the mechanism of persistence of vision will be left as an exercise to the reader).
Notice your example becomes much smoother if you change the update rate to 10ms from 50ms. So I would try changing the sampling rate of your data to update every 10ms instead of 50ms. That would probably spread out the data, but I believe it should help make the graph smoother.

I hope this helps
Bilal Durrani
NI
0 Kudos
Message 4 of 5
(3,895 Views)
Actaully, Im wrong on the 10fps = 10ms updates by a factor of 10. But faster updates in general will help the problem. 10 fps (100ms) seems to be the minimum. Some common video formats out there seem to use 30 fps (33.3ms).

Make sure you also update the increment parameter in the PlotYAppend according to your update rate.

Hope this helps.
Bilal Durrani
NI
0 Kudos
Message 5 of 5
(3,888 Views)