1362
Keysight InfiniiVision M9241/42/43A PXIe Oscilloscopes SCPI Programmer's Guide
38
Synchronizing Acquisitions
# (<< is a left shift; left shift is fastest); this is used later
# to "unmask" the result of the Operation Status Event Register
# as there is no direct access to the RUN bit.
# Define completion criterion:
ACQ_DONE = 0
# Means the oscilloscope is stopped
ACQ_NOT_DONE = 1<<RUN_BIT
# Means the oscilloscope is running; value is 8.
This is the
# 4th bit of the Operation Status Condition (and Event) Register.
# The registers are binary and start counting at zero, thus the
# 4th bit (4th position in a binary representation of decimal
# 8 = 2^3 = (1 left shift 3).
This is either High (running = 8)
# or low (stopped and therefore done with acquisition = 0).
print "Acquiring signal(s)..."
# Define acquisition start time.
This is in seconds.
StartTime = time.clock()
# Begin Acquisition with *CLS and the non-blocking :SINGle
# command, concatenated together. The *CLS clears all (non-mask)
# registers & sets them to 0;
KsInfiniiVisionX.write("*CLS;:SINGle")
# Initialize the loop entry condition (assume Acq. is not done).
Acq_State = ACQ_NOT_DONE
# Poll the oscilloscope until Acq_State is a one. (This is NOT a
# "Serial Poll.")
while Acq_State == ACQ_NOT_DONE and (time.clock() - StartTime
<= MAX_TIME_TO_WAIT):
# Ask oscilloscope if it is done with the acquisition via the
# Operation Status Condition (not 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, thus the CONDITION register
# is used.
#
# DO NOT do:
# KsInfiniiVisionX.query("*CLS;SINGle;OPERegister:CONDition?")
# as putting :OPERegister:CONDition? right after :SINgle
# doesn't work reliably
#
# The oscilloscope SHOULD trigger, but it sits there with the
# Single hard key on the oscilloscope lit yellow; pressing
# this key causes a trigger.
Status = int(KsInfiniiVisionX.query(":OPERegister:CONDition?"))
# Bitwise AND of the Status and RUN_MASK.
This exposes ONLY
# the 4th bit, which is either High (running = 8) or low
# (stopped and therefore done with acquisition = 0)
Acq_State = (Status & RUN_MASK)
if Acq_State == ACQ_DONE:
break # Break out of while loop so that the 100 ms pause
# below is not incurred if done.
Содержание 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 ...