Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1139

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

Advertisement

38
Sample Programs
Private Shared Sub Capture()
Dim strResults As String
Dim fResult As Double
' Set probe attenuation factor.
Dim nChannel As UInteger
nChannel = 1
myScope.SCPI.CHANnel.PROBe.Command(nChannel, 1.0, DBNull.Value)
myScope.SCPI.CHANnel.PROBe.Query(1, fResult, strResults)
Console.WriteLine("Channel 1 probe attenuation factor: {0}", _
fResult)
' Use auto-scale to automatically configure oscilloscope.
myScope.SCPI.AUToscale.Command()
' Set trigger mode.
myScope.SCPI.TRIGger.MODE.Command("EDGE")
myScope.SCPI.TRIGger.MODE.Query(strResults)
Console.WriteLine("Trigger mode: {0}", strResults)
' Set EDGE trigger parameters.
myScope.SCPI.TRIGger.EDGE.SOURce.Command(DBNull.Value, "CHANnel1")
myScope.SCPI.TRIGger.EDGE.SOURce.Query(DBNull.Value, strResults)
Console.WriteLine("Trigger edge source: {0}", strResults)
myScope.SCPI.TRIGger.LEVel.Command("CHANnel1", -0.002)
myScope.SCPI.TRIGger.LEVel.Query("CHANnel1", fResult)
Console.WriteLine("Trigger edge level: {0:F2}", fResult)
myScope.SCPI.TRIGger.EDGE.SLOPe.Command(DBNull.Value, "POSitive")
myScope.SCPI.TRIGger.EDGE.SLOPe.Query(DBNull.Value, strResults)
Console.WriteLine("Trigger edge slope: {0}", strResults)
' Save oscilloscope setup.
Dim byteResultsArray As Byte()
' Results array.
Dim nLength As Integer
' Number of bytes returned from instrument.
Dim strPath As String
' Query and read setup string.
myScope.SCPI.SYSTem.SETup.Query(byteResultsArray)
nLength = byteResultsArray.Length
' Write setup string to file.
strPath = "c:\scope\config\setup.stp"
Dim fStream As FileStream = File.Open(strPath, FileMode.Create)
fStream.Write(byteResultsArray, 0, nLength)
fStream.Close()
Console.WriteLine("Setup bytes saved: {0}", nLength)
' Change settings with individual commands:
' Set vertical scale and offset.
myScope.SCPI.CHANnel.SCALe.Command(1, 0.1)
myScope.SCPI.CHANnel.SCALe.Query(1, fResult)
Console.WriteLine("Channel 1 vertical scale: {0:F4}", fResult)
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
1139

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents