EasyManuals Logo

Keysight Technologies InfiniiVision DSOX1204A User Manual

Keysight Technologies InfiniiVision DSOX1204A
946 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #840 background imageLoading...
Page #840 background image
840 Keysight InfiniiVision DSOX1204A/G Oscilloscopes Programmer's Guide
36 Programming Examples
# Check for instrument errors:
# =========================================================
def check_instrument_errors(command):
while True:
myScope.WriteString(":SYSTem:ERRor?", True)
error_string = myScope.ReadString()
if error_string: # If there is an error string value.
if error_string.find("+0,", 0, 3) == -1: # Not "No error".
print "ERROR: %s, command: '%s'" % (error_string, command)
print "Exited because of error."
sys.exit(1)
else: # "No error"
break
else: # :SYSTem:ERRor? should always return string.
print "ERROR: :SYSTem:ERRor? returned nothing, command: '%s'" \
% command
print "Exited because of error."
sys.exit(1)
# =========================================================
# Main program:
# =========================================================
rm = CreateObject("VISA.GlobalRM", \
interface=VisaComLib.IResourceManager)
myScope = CreateObject("VISA.BasicFormattedIO", \
interface=VisaComLib.IFormattedIO488)
myScope.IO = \
rm.Open("USB0::0x2A8D::0x1797::CN56240004::0::INSTR")
# Clear the interface.
myScope.IO.Clear
print "Interface cleared."
# Set the Timeout to 15 seconds.
myScope.IO.Timeout = 15000 # 15 seconds.
print "Timeout set to 15000 milliseconds."
# Initialize the oscilloscope, capture data, and analyze.
initialize()
capture()
analyze()
print "End of program"

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies InfiniiVision DSOX1204A and is the answer not in the manual?

Keysight Technologies InfiniiVision DSOX1204A Specifications

General IconGeneral
BrandKeysight Technologies
ModelInfiniiVision DSOX1204A
CategoryTest Equipment
LanguageEnglish

Related product manuals