Synchronizing Acquisitions
38
Keysight InfiniiVision M9241/42/43A PXIe Oscilloscopes SCPI Programmer's Guide
1361
#
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
Содержание InfiniiVision M9241A
Страница 1: ...Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide ...
Страница 52: ...52 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 2 Setting Up ...
Страница 178: ...178 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 5 Commands Quick Reference ...
Страница 246: ...246 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 7 Root Commands ...
Страница 268: ...268 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 8 ACQuire Commands ...
Страница 280: ...280 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 9 CALibrate Commands ...
Страница 354: ...354 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 15 EXTernal Trigger Commands ...
Страница 412: ...412 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 17 FUNCtion m Commands ...
Страница 416: ...416 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 18 HCOPY Commands ...
Страница 442: ...442 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 20 MARKer Commands ...
Страница 588: ...588 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 23 MTESt Commands ...
Страница 692: ...692 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 24 POWer Commands ...
Страница 1062: ...1062 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 30 TIMebase Commands ...
Страница 1250: ...1250 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 33 WGEN w Commands ...
Страница 1306: ...1306 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 35 Obsolete and Discontinued Commands ...
Страница 1314: ...1314 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 36 Error Messages ...
Страница 1376: ...1376 Keysight InfiniiVision M9241 42 43A PXIe Oscilloscopes SCPI Programmer s Guide 39 More About Oscilloscope Commands ...