Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1136

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

38
Sample Programs
aArray);
}
1136
dctAcqMode[strsPreamble[18]]);
Console.WriteLine("Completion pct: {0}", strsPreamble[19]);
Console.WriteLine("Waveform X inits: {0}",
dctUnits[strsPreamble[20]]);
Console.WriteLine("Waveform Y units: {0}",
dctUnits[strsPreamble[21]]);
Console.WriteLine("Max BW limit: {0}", strsPreamble[22]);
Console.WriteLine("Min BW limit: {0}", strsPreamble[23]);
// Get numeric values for later calculations.
double fXincrement;
myScope.SCPI.WAVeform.XINCrement.Query(out fXincrement);
double fXorigin;
myScope.SCPI.WAVeform.XORigin.Query(out fXorigin);
double fYincrement;
myScope.SCPI.WAVeform.YINCrement.Query(out fYincrement);
double fYorigin;
myScope.SCPI.WAVeform.YORigin.Query(out fYorigin);
// Get the waveform data.
myScope.SCPI.WAVeform.STReaming.Command(false);
short[] WordDataArray;
myScope.SCPI.WAVeform.DATA.QueryBlockInt16(null, null, out WordDat
nLength = WordDataArray.Length;
Console.WriteLine("Number of data values: {0}", nLength);
// Set up output file:
strPath = "c:\\scope\\data\\waveform_data.csv";
if (File.Exists(strPath)) File.Delete(strPath);
// Open file for output.
StreamWriter writer = File.CreateText(strPath);
// Output waveform data in CSV format.
for (int i = 0; i < nLength - 1; i++)
writer.WriteLine("{0:f9}, {1:f6}",
fXorigin + ((float)i * fXincrement),
(((float)WordDataArray[i])
* fYincrement) + fYorigin);
// Close output file.
writer.Close();
Console.WriteLine("Waveform format WORD data written to {0}",
strPath);
}
}
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
// Results array.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents