Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1145

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

Advertisement

# Get and display the device's *IDN? string.
idn_string = scope.SCPI.IDN.Query()
print "Identification string '%s'" % idn_string
# Clear status and load the default setup.
scope.SCPI.CLS.Command()
scope.SCPI.RST.Command()
# =========================================================
# Capture:
# =========================================================
def capture():
# Set probe attenuation factor.
scope.SCPI.CHANnel.PROBe.Command(1, 1.0, None)
(qresult, probe_units) = scope.SCPI.CHANnel.PROBe.Query(1)
print "Channel 1 probe attenuation factor: %s" % qresult
# Use auto-scale to automatically set up oscilloscope.
print "Autoscale."
scope.SCPI.AUToscale.Command()
# Set trigger mode.
scope.SCPI.TRIGger.MODE.Command("EDGE")
qresult = scope.SCPI.TRIGger.MODE.Query()
print "Trigger mode: %s" % qresult
# Set EDGE trigger parameters.
scope.SCPI.TRIGger.EDGE.SOURce.Command(None, "CHANnel1")
qresult = scope.SCPI.TRIGger.EDGE.SOURce.Query(None,)
print "Trigger edge source: %s" % qresult
scope.SCPI.TRIGger.LEVel.Command("CHANnel1", -0.002)
qresult = scope.SCPI.TRIGger.LEVel.Query("CHANnel1")
print "Trigger edge level: %s" % qresult
scope.SCPI.TRIGger.EDGE.SLOPe.Command(None, "POSitive")
qresult = scope.SCPI.TRIGger.EDGE.SLOPe.Query(None,)
print "Trigger edge slope: %s" % qresult
# Save oscilloscope setup.
setup_bytes = scope.SCPI.SYSTem.SETup.Query()
nLength = len(setup_bytes)
File.WriteAllBytes("setup.stp", setup_bytes)
print "Setup lines saved: %d" % nLength
# Change oscilloscope settings with individual commands:
# Set vertical scale and offset.
scope.SCPI.CHANnel.SCALe.Command(1, 0.1)
qresult = scope.SCPI.CHANnel.SCALe.Query(1)
print "Channel 1 vertical scale: %f" % qresult
scope.SCPI.CHANnel.OFFSet.Command(1, 0.0)
qresult = scope.SCPI.CHANnel.OFFSet.Query(1)
print "Channel 1 offset: %f" % qresult
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
38
Sample Programs
1145

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents