1392
Keysight InfiniiVision M9241/42/43A PXIe Oscilloscopes SCPI Programmer's Guide
40
Programming Examples
Console.WriteLine("Acquire type: AVERage");
}
else if (fType == 3.0)
{
Console.WriteLine("Acquire type: HRESolution");
}
double fPoints = fResultsArray[2];
Console.WriteLine("Waveform points: {0:e}", fPoints);
double fCount = fResultsArray[3];
Console.WriteLine("Waveform average count: {0:e}", fCount);
double fXincrement = fResultsArray[4];
Console.WriteLine("Waveform X increment: {0:e}", fXincrement);
double fXorigin = fResultsArray[5];
Console.WriteLine("Waveform X origin: {0:e}", fXorigin);
double fXreference = fResultsArray[6];
Console.WriteLine("Waveform X reference: {0:e}", fXreference);
double fYincrement = fResultsArray[7];
Console.WriteLine("Waveform Y increment: {0:e}", fYincrement);
double fYorigin = fResultsArray[8];
Console.WriteLine("Waveform Y origin: {0:e}", fYorigin);
double fYreference = fResultsArray[9];
Console.WriteLine("Waveform Y reference: {0:e}", fYreference);
// Read waveform data.
ResultsArray = myScope.DoQueryIEEEBlock(":WAVeform:DATA?");
nLength = ResultsArray.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}",
fX ((float)i * fXincrement),
(((float)ResultsArray[i] - fYreference)
* fYincrement) + fYorigin);
// Close output file.
writer.Close();
Console.WriteLine("Waveform format BYTE data written to {0}",
strPath);
}
}
Содержание InfiniiVision M9241A
Страница 1: ...Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide ...
Страница 52: ...52 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 2 Setting Up ...
Страница 178: ...178 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 5 Commands Quick Reference ...
Страница 246: ...246 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 7 Root Commands ...
Страница 268: ...268 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 8 ACQuire Commands ...
Страница 280: ...280 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 9 CALibrate Commands ...
Страница 354: ...354 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 15 EXTernal Trigger Commands ...
Страница 412: ...412 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 17 FUNCtion m Commands ...
Страница 416: ...416 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 18 HCOPY Commands ...
Страница 442: ...442 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 20 MARKer Commands ...
Страница 588: ...588 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 23 MTESt Commands ...
Страница 692: ...692 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 24 POWer Commands ...
Страница 1062: ...1062 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 30 TIMebase Commands ...
Страница 1250: ...1250 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 33 WGEN w Commands ...
Страница 1306: ...1306 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 35 Obsolete and Discontinued Commands ...
Страница 1314: ...1314 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 36 Error Messages ...
Страница 1376: ...1376 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 39 More About Oscilloscope Commands ...