Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1080

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

Advertisement

38
Sample Programs
1080
private static void Capture()
{
// Set probe attenuation factor.
myScope.DoCommand(":CHANnel1:PROBe 1.0");
Console.WriteLine("Channel 1 probe attenuation factor: {0}",
myScope.DoQueryString(":CHANnel1:PROBe?"));
// Use auto-scale to automatically set up oscilloscope.
myScope.DoCommand(":AUToscale");
// Set trigger mode.
myScope.DoCommand(":TRIGger:MODE EDGE");
Console.WriteLine("Trigger mode: {0}",
myScope.DoQueryString(":TRIGger:MODE?"));
// Set EDGE trigger parameters.
myScope.DoCommand(":TRIGger:EDGE:SOURCe CHANnel1");
Console.WriteLine("Trigger edge source: {0}",
myScope.DoQueryString(":TRIGger:EDGE:SOURce?"));
myScope.DoCommand(":TRIGger:LEVel CHANnel1,-2E-3");
Console.WriteLine("Trigger level, channel 1: {0}",
myScope.DoQueryString(":TRIGger:LEVel? CHANnel1"));
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive");
Console.WriteLine("Trigger edge slope: {0}",
myScope.DoQueryString(":TRIGger:EDGE:SLOPe?"));
// Save oscilloscope configuration.
byte[] ResultsArray;
int nLength;
// Number of bytes returned from instrument.
string strPath;
// Query and read setup string.
nLength = myScope.DoQueryIEEEBlock_Bytes(":SYSTem:SETup?",
out ResultsArray);
// Write setup string to file.
strPath = "c:\\scope\\config\\setup.stp";
FileStream fStream = File.Open(strPath, FileMode.Create);
fStream.Write(ResultsArray, 0, nLength);
fStream.Close();
Console.WriteLine("Setup bytes saved: {0}", nLength);
// Change settings with individual commands:
// Set vertical scale and offset.
myScope.DoCommand(":CHANnel1:SCALe 0.1");
Console.WriteLine("Channel 1 vertical scale: {0}",
myScope.DoQueryString(":CHANnel1:SCALe?"));
myScope.DoCommand(":CHANnel1:OFFSet 0.0");
Console.WriteLine("Channel 1 vertical offset: {0}",
myScope.DoQueryString(":CHANnel1:OFFSet?"));
// Set horizontal scale and position.
myScope.DoCommand(":TIMebase:SCALe 0.0002");
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
// Results array.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents