11-19-2007 06:19 PM
{
double [] mywavedata = new double[1000];
AnalogWaveform<Double> mywaveform = new AnalogWaveform<Double>(1000); int actualpoints; double initialx; double increment;
scope.AutoSetup();
scope.EnableChannel(
"CH1");scope.FetchWaveform(
"CH1", 1000, mywavedata, out actualpoints, out initialx, out increment);Graph.PlotWaveform(
mywavedata); return;}
I guess I'm probably close here but the issue is, FetchWaveform gives me a double array, whereas PlotWaveform takes an analogwaveform, so the question is:
A). how do i convert from double [] to analogwaveform, and
B). is there a better/easier way to do what i'm trying to achieve?
11-19-2007 07:52 PM
{
double [] mywavedata = new double[1000]; double initialx; double increment; int count; AnalogWaveform<Double> mywaveform;ConfigureScope();
scope.FetchWaveform(
"CH1", 1000, mywavedata, out count, out initialx, out increment);mywaveform =
AnalogWaveform<Double>.FromArray1D(mywavedata);Graph.PlotWaveform<
Double>(mywaveform); return;}
private void ConfigureScope(){
scope.AutoSetup();
scope.EnableChannel(
"CH1");}
11-21-2007 10:39 AM