Technical data

234 Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference
13 Common Commands
*LRN?
(Learn)
Query
*LRN?
The *LRN? query returns a block of data that contains the oscilloscope's
current setup. You can store the oscilloscope's setup and send it back to
the oscilloscope at a later time. This block of setup data should be sent to
the oscilloscope just as it is. It works because of its embedded ":SYST:SET"
header.
Returned Format :SYST:SET<setup><NL>
<setup> This is a definite- length, arbitrary block response specifying the current
oscilloscope setup. The block size is subject to change with different
firmware revisions.
Example This Python and PyVISA example saves the *LRN? string to a file and then
restores the oscilloscope setup from the file.
# ********************************************************************
# Using the *LRN? string to save and restore the oscilloscope setup.
# ********************************************************************
# Import modules.
# ---------------------------------------------------------
import visa
import string
import sys
# =========================================================
# Check for instrument errors:
# =========================================================
def check_instrument_errors():
while True:
error_string = Infiniium.ask(":SYSTem:ERRor? STRing\n")
if error_string: # If there is an error string value.
if error_string.find("0,", 0, 2) == -1: # Not "No error".
print "ERROR: %s." % error_string
print "Exited because of error."
sys.exit(1)
else: # "No error"
break
else: # :SYSTem:ERRor? STRing should always return string.
print "ERROR: :SYSTem:ERRor? STRing returned nothing."
print "Exited because of error."
sys.exit(1)
# =========================================================
# Main program:
# =========================================================