Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does the waveformgraph in stripchart mode replot points as they move to the left?

When a waveformgraph is in stripchart mode, it seems to replot existing points when new points are added.  This leads to a lot of flicker in the plot lines as new points are added.

It seems like the proper, and much more performant, behavior would be to copy the rectangle of the plot area that is not changing and paste it a little to the left when new points are added on the right.

I verified the problematic behavior in both my own project and in the example that ships w/Measurement studio.

Any suggestions?

Stephen
0 Kudos
Message 1 of 8
(5,355 Views)
Stephen,
 
Similar to the behavior you are describing can be accomplished using a different AxisMode.  Could you try setting the mode to any of the AutoScale options instead of the StripChart mode?  For example:
 

chartingAxis.Mode =

AxisMode.AutoScaleLoose;

Matt S
National Instruments
Applications Engineer
0 Kudos
Message 2 of 8
(5,333 Views)
Matt,

I just tried your suggested solution.  It sort of works.  It does appear to copy and move the unchanging part of the plot to the left.  However, it does so in a chunky fashion, rather than a smooth one.  Also, the left side of my plot shows points being erased, which is very distracting.

Any suggestions on how to make this nice and smooth (and not show points being erased on the left side of the plot?

Thanks,
Stephen
0 Kudos
Message 3 of 8
(5,324 Views)
Hi Stephen,
 
For a smoother plot, instead of using the AutoScaleLoose, you could try AutoScaleExact.  This will give you a smoother appearance. 

To prevent the points from being erased, we need to increase the History Capacity of your plot.  You can modify this by right clicking the graph and selecting "Edit Plots".  By default, I believe it's set to 1000.  I hope this helps!
Matt S
National Instruments
Applications Engineer
0 Kudos
Message 4 of 8
(5,316 Views)
Matt,

I tried you suggestion, but it didn't help.  The big problem is that the plot appears to be re-rendered point by point each time PlotAppendY(double[]) is called.  I believe this causes the artifacts.  When in strip chart mode with no grid showing, PlotAppendY() should copy the pixels from the part of the plot that isn't changing to the left, and just replot the newly appended points.

We have a similar plot working quite nicely in LabView 8.5.  Something appears to be different in the .NET implementation.

Any suggestions?

Stephen
0 Kudos
Message 5 of 8
(5,302 Views)
Hi Stephen,
 
I ran my strip chart implementation in Measurement Studio side-by-side with LabVIEW, but didn't notice much of a difference.  Could you post an example of your VI and Measurement Studio code which demonstrates the differences?  Another thought I had would be decreasing the time interval tick if you are using a timer to plot your data.  Perhaps that will make it appear smoother.
Matt S
National Instruments
Applications Engineer
0 Kudos
Message 6 of 8
(5,296 Views)

Hmmm.... 5 years later and the replot problem still persists.  I just created a new spike project to test this with MS 2013 and VS 2012.  The strip chart still appears to replot when data is appended rather than copy and paste the unchanged part of the graph.  I've attached my spike project.  Just for the record, I'm still using the Visual Studio 6 version of the chart in my app because it is mostly flicker-free.  But have a high-bandwidth COM object in my .NET project has caused lots of headaches, so I eternally hope that NI will fix the stripchart behaviour of its .NET waveform graph.

 

Regards,

Stephen

0 Kudos
Message 7 of 8
(4,165 Views)

Hi sstrenn,

 

This thread is 5 years old, please make a new thread that referrences this thread.  That will get traffic since it will show up as a new thread on the front page of the forums.

Peter T
Applications Engineer
National Instruments
0 Kudos
Message 8 of 8
(4,157 Views)