Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1052

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

Advertisement

38
Sample Programs
# Clear status and load the default setup.
do_command("*CLS")
do_command("*RST")
# =========================================================
# Capture:
# =========================================================
def capture():
# Set probe attenuation factor.
do_command(":CHANnel1:PROBe 1.0")
qresult = do_query_string(":CHANnel1:PROBe?")
print "Channel 1 probe attenuation factor: %s" % qresult
# Use auto-scale to automatically set up oscilloscope.
print "Autoscale."
do_command(":AUToscale")
# Set trigger mode.
do_command(":TRIGger:MODE EDGE")
qresult = do_query_string(":TRIGger:MODE?")
print "Trigger mode: %s" % qresult
# Set EDGE trigger parameters.
do_command(":TRIGger:EDGE:SOURCe CHANnel1")
qresult = do_query_string(":TRIGger:EDGE:SOURce?")
print "Trigger edge source: %s" % qresult
do_command(":TRIGger:LEVel CHANnel1,-2E-3")
qresult = do_query_string(":TRIGger:LEVel? CHANnel1")
print "Trigger level, channel 1: %s" % qresult
do_command(":TRIGger:EDGE:SLOPe POSitive")
qresult = do_query_string(":TRIGger:EDGE:SLOPe?")
print "Trigger edge slope: %s" % qresult
# Save oscilloscope setup.
setup_bytes = do_query_ieee_block_UI1(":SYSTem:SETup?")
nLength = len(setup_bytes)
f = open("setup.stp", "wb")
f.write(bytearray(setup_bytes))
f.close()
print "Setup bytes saved: %d" % nLength
# Change oscilloscope settings with individual commands:
# Set vertical scale and offset.
do_command(":CHANnel1:SCALe 0.1")
qresult = do_query_number(":CHANnel1:SCALe?")
print "Channel 1 vertical scale: %f" % qresult
do_command(":CHANnel1:OFFSet 0.0")
qresult = do_query_number(":CHANnel1:OFFSet?")
print "Channel 1 offset: %f" % qresult
1052
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents