Agilent Technologies Infiniium 90000 Series Programmer's Manual page 1053

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

Advertisement

# Set horizontal scale and offset.
do_command(":TIMebase:SCALe 200e-6")
qresult = do_query_string(":TIMebase:SCALe?")
print "Timebase scale: %s" % qresult
do_command(":TIMebase:POSition 0.0")
qresult = do_query_string(":TIMebase:POSition?")
print "Timebase position: %s" % qresult
# Set the acquisition mode.
do_command(":ACQuire:MODE RTIMe")
qresult = do_query_string(":ACQuire:MODE?")
print "Acquire mode: %s" % qresult
# Or, configure by loading a previously saved setup.
f = open("setup.stp", "rb")
setup_bytes = f.read()
f.close()
do_command_ieee_block(":SYSTem:SETup", array.array('B', setup_bytes))
print "Setup bytes restored: %d" % len(setup_bytes)
# Set the desired number of waveform points,
# and capture an acquisition.
do_command(":ACQuire:POINts 32000")
do_command(":DIGitize")
# =========================================================
# Analyze:
# =========================================================
def analyze():
# Make measurements.
# --------------------------------------------------------
do_command(":MEASure:SOURce CHANnel1")
qresult = do_query_string(":MEASure:SOURce?")
print "Measure source: %s" % qresult
do_command(":MEASure:FREQuency")
qresult = do_query_string(":MEASure:FREQuency?")
print "Measured frequency on channel 1: %s" % qresult
do_command(":MEASure:VAMPlitude")
qresult = do_query_string(":MEASure:VAMPlitude?")
print "Measured vertical amplitude on channel 1: %s" % qresult
# Download the screen image.
# --------------------------------------------------------
image_bytes = do_query_ieee_block_UI1(":DISPlay:DATA? PNG")
nLength = len(image_bytes)
f = open("screen_image.png", "wb")
f.write(bytearray(image_bytes))
f.close()
print "Screen image written to 'screen_image.png'."
# Download waveform data.
# --------------------------------------------------------
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
38
Sample Programs
1053

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents