EasyManua.ls Logo

Keysight Technologies InfiniiVision 4000 X Series

Keysight Technologies InfiniiVision 4000 X Series
1762 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
Loading...
Synchronizing Acquisitions 42
Keysight InfiniiVision 4000 X-Series Oscilloscopes Programmer's Guide 1601
# is NOT blocked (unless the front panel is otherwise locked by
# ":SYSTem:LOCK ON").
# ====================================================================
def blocking_method():
KsInfiniiVisionX.timeout = SCOPE_ACQUISITION_TIME_OUT
# Time in milliseconds (PyVisa uses ms) to wait for the
# oscilloscope to arm, trigger, finish acquisition, and finish
# any processing.
#
# Note that this is a property of the device interface,
# KsInfiniiVisionX.
#
# If doing repeated acquisitions, this should be done BEFORE the
# loop, and changed again after the loop if the goal is to
# achieve the best throughput.
print("Acquiring signal(s)...")
# Set up a try/except block to catch a possible timeout and exit.
try:
KsInfiniiVisionX.query(":DIGitize;*OPC?")
# Acquire the signal(s) with :DIGItize (blocking) and wait
# until *OPC? comes back with a one.
print("Signal acquired.")
# Reset timeout back to what it was, GLOBAL_TOUT.
KsInfiniiVisionX.timeout = GLOBAL_TOUT
# Catch a possible timeout and exit.
except Exception:
print "The acquisition timed out, most likely due to no " \
"trigger or improper setup causing no trigger. " \
"Properly closing the oscilloscope connection and " \
"exiting script.\n"
KsInfiniiVisionX.clear() # Clear communications interface;
# A device clear also aborts digitize.
KsInfiniiVisionX.close() # Close communications interface
sys.exit("Exiting script.")
# ====================================================================
# Define a function using the non-blocking :SINGle command and polling
# on the Operation Status Condition Register
# --------------------------------------------------------------------
#
# Benefits of this method:
#
# - Don't have to worry about interface timeouts.
# - Easy to expand to know when the oscilloscope is armed.
# - Don't have to worry about interface timeouts
# - Easy to expand to know when scope is armed, and triggered
# - MAY result in a higher sample rate than the blocking method
# - Always fills max available memory
# - Can use with a socket connection if desired
#
#
# Drawbacks of this method:

Table of Contents

Related product manuals