Synchronizing Acquisitions
36
Keysight P9241/42/43A Oscilloscopes SCPI Programmer's Guide
1189
#
can reflect states for other oscilloscope properties, for
#
example, if the oscilloscope is armed, thus it can produce
#
values other than 0 (stopped) or 8 (running).
#
#
To handle that, the result of :OPERation:Condition? is bitwise
#
ANDed (& in Python) with an 8.
This is called "unmasking".
#
#
Here, the "unmasking" is done in the script.
On the other
#
hand, it is possible to "mask" which bits get passed to the
#
summary bit to the next register below on the instrument
#
itself.
However, this method it typically only used when
#
working with the Status Byte, and not used here.
#
#
-
Why 8 = running = not done?
#
#
The Run bit is the 4th bit of the Operation Status Condition
#
(and Event) Registers.
#
#
The registers are binary and start counting at zero, thus the
#
4th bit is bit number 3, and 2^3 = 8, and thus it returns an
#
8 for high and a 0 for low.
#
#
-
Why the CONDITION and NOT the EVENT register?
#
#
The Condition register reflects the CURRENT state, while the
#
EVENT register reflects the first event that occurred since it
#
was cleared or read (as in: has it EVER happened?), thus the
#
CONDITION register is used.
#
#
Note that with this method using :SINGle, for InfiniiVision
#
X-Series oscilloscopes only, :SINGle itself forces the trigger
#
sweep mode into NORMal.
This does not happen with the blocking
#
method, using :DIGitize, or on the InfiniiVision notXs.
# ====================================================================
def polling_method():
MAX_TIME_TO_WAIT = SCOPE_ACQUISITION_TIME_OUT/float(1000)
# Time in seconds to wait for the oscilloscope to arm, trigger,
# and finish acquisition.
#
# Note that this is NOT a property of the device interface,
# KsInfiniiVisionX, but rather some constant in the script to be
# used later with the Python module "time", and will be used with
# time.clock().
# Define "mask" bits.
#
# Mask condition for Run state in the Operation Status Condition
# (and Event) Register.
#
# Refer to Programmer's Guide chapters on Status Reporting and
# Synchronizing Acquisitions.
RUN_BIT = 3
# The run bit is the 4th bit (see next set of comments @
# Completion Criteria).
RUN_MASK = 1<<RUN_BIT
# This basically means:
2^3 = 8, or rather, in Python 2**3
Содержание 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...