Agilent Technologies InfiniiVision 3000 Programmer's Manual page 1118

X-series
Hide thumbs Also See for InfiniiVision 3000:
Table of Contents

Advertisement

39
Programming Examples
.
1118
Console.WriteLine("Trigger edge source: {0}", _
myScope.DoQueryString(":TRIGger:EDGE:SOURce?"))
myScope.DoCommand(":TRIGger:EDGE:LEVel 1.5")
Console.WriteLine("Trigger edge level: {0}", _
myScope.DoQueryString(":TRIGger:EDGE:LEVel?"))
myScope.DoCommand(":TRIGger:EDGE:SLOPe POSitive")
Console.WriteLine("Trigger edge slope: {0}", _
myScope.DoQueryString(":TRIGger:EDGE:SLOPe?"))
' Save oscilloscope configuration.
Dim ResultsArray As Byte()
Dim nLength As Integer
Dim strPath As String
Dim fStream As FileStream
' Query and read setup string.
ResultsArray = myScope.DoQueryIEEEBlock(":SYSTem:SETup?")
nLength = ResultsArray.Length
' Write setup string to file.
strPath = "c:\scope\config\setup.stp"
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.05")
Console.WriteLine("Channel 1 vertical scale: {0}", _
myScope.DoQueryString(":CHANnel1:SCALe?"))
myScope.DoCommand(":CHANnel1:OFFSet -1.5")
Console.WriteLine("Channel 1 vertical offset: {0}", _
myScope.DoQueryString(":CHANnel1:OFFSet?"))
' Set horizontal scale and offset.
myScope.DoCommand(":TIMebase:SCALe 0.0002")
Console.WriteLine("Timebase scale: {0}", _
myScope.DoQueryString(":TIMebase:SCALe?"))
myScope.DoCommand(":TIMebase:POSition 0.0")
Console.WriteLine("Timebase position: {0}", _
myScope.DoQueryString(":TIMebase:POSition?"))
' Set the acquisition type (NORMal, PEAK, AVERage, or HRESolution)
myScope.DoCommand(":ACQuire:TYPE NORMal")
Console.WriteLine("Acquire type: {0}", _
myScope.DoQueryString(":ACQuire:TYPE?"))
' Or, configure by loading a previously saved setup.
Dim DataArray As Byte()
Dim nBytesWritten As Integer
Agilent InfiniiVision 3000 X-Series Oscilloscopes Programmer's Guide
' Results array.
' Number of bytes returned from inst.

Advertisement

Table of Contents
loading

Table of Contents