Synchronizing Acquisitions
36
Keysight P9241/42/43A Oscilloscopes SCPI Programmer's Guide
1187
#
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:
Содержание P9241
Страница 1: ...Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide...
Страница 6: ...6 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide...
Страница 36: ...36 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 1 What s New...
Страница 41: ...Setting Up 2 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 41...
Страница 44: ...44 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 2 Setting Up...
Страница 222: ...222 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 7 Root Commands...
Страница 244: ...244 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 8 ACQuire Commands...
Страница 256: ...256 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 9 CALibrate Commands...
Страница 278: ...278 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 10 CHANnel n Commands...
Страница 328: ...328 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 15 EXTernal Trigger Commands...
Страница 386: ...386 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 17 FUNCtion m Commands...
Страница 390: ...390 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 18 HCOPY Commands...
Страница 416: ...416 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 20 MARKer Commands...
Страница 498: ...498 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 21 MEASure Commands...
Страница 532: ...532 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 22 MTESt Commands...
Страница 572: ...572 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 24 SAVE Commands...
Страница 596: ...596 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 25 SBUS n Commands SBUS n A429 SOURce on page 588...
Страница 900: ...900 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 28 TIMebase Commands...
Страница 1080: ...1080 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 31 WGEN w Commands...
Страница 1142: ...1142 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 34 Error Messages...
Страница 1204: ...1204 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide 37 More About Oscilloscope Commands...
Страница 1344: ...1344 Keysight P9241 42 43A Oscilloscopes SCPI Programmer s Guide Index...