Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

Using WaveformPlot.PlotYAppend(double) in MS7, can individual points be plotted as they are acquired?

We are porting an application from LabVIEW to Meas Studio 7, in C#.
As each data point is received, we would like to see it displayed, using a WaveformPlot on a WaveformGraph. (we chose this object to utilize its display cursors)
As we currently have coded the operation:

double nextPoint, firstPoint;
private NationalInstruments.UI.WaveformPlot PlotImp;

SourceAndMeasure(out nextPoint);
PlotImp.PlotY(nextPoint);
while(acquiring){
SourceAndMeasure(out nextPoint);
PlotImp.PlotYAppend(nextPoint);
}

Do I need to use the .PlotY as the plot call for the first point?
And what can be called to insure that the plot object is written to the display
as each point arrives?

Thanks.
Peter

p.s. NI, please add a C# category.
0 Kudos
Message 1 of 2
(3,618 Views)
"Do I need to use the .PlotY as the plot call for the first point?"

No. In the example above you could leave out the first call to PlotY and PlotYAppend will work for the first point as expected.

"And what can be called to insure that the plot object is written to the display as each point arrives?"

If you want to selectively update the display immediately, you can call Update on the graph when you want the display to be updated. If you want all updates (plotting a point, setting any properties, etc.) to update the display immediately, set the ImmediateUpdates property on the graph to true.

- Elton
Message 2 of 2
(3,618 Views)