EasyManuals Logo

Keysight Technologies InfiniiVision DSOX1204A User Manual

Keysight Technologies InfiniiVision DSOX1204A
946 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
Page #911 background imageLoading...
Page #911 background image
Programming Examples 36
Keysight InfiniiVision DSOX1204A/G Oscilloscopes Programmer's Guide 911
print "Waveform format: %s" % wav_form_dict[int(wav_form)]
print "Acquire type: %s" % acq_type_dict[int(acq_type)]
print "Waveform points desired: %s" % wfmpts
print "Waveform average count: %s" % avgcnt
print "Waveform X increment: %s" % x_increment
print "Waveform X origin: %s" % x_origin
print "Waveform X reference: %s" % x_reference # Always 0.
print "Waveform Y increment: %s" % y_increment
print "Waveform Y origin: %s" % y_origin
print "Waveform Y reference: %s" % y_reference
# Get numeric values for later calculations.
myScope.WriteLine(":WAVeform:XINCrement?")
x_increment = myScope.ReadLineDouble()
myScope.WriteLine(":WAVeform:XORigin?")
x_origin = myScope.ReadLineDouble()
myScope.WriteLine(":WAVeform:YINCrement?")
y_increment = myScope.ReadLineDouble()
myScope.WriteLine(":WAVeform:YORigin?")
y_origin = myScope.ReadLineDouble()
myScope.WriteLine(":WAVeform:YREFerence?")
y_reference = myScope.ReadLineDouble()
# Get the waveform data.
myScope.WriteLine(":WAVeform:DATA?")
data_bytes = myScope.ReadLineBinaryBlockOfByte()
nLength = len(data_bytes)
print "Number of data values: %d" % nLength
# Open file for output.
strPath = "waveform_data.csv"
writer = File.CreateText(strPath)
# Output waveform data in CSV format.
for i in xrange(0, nLength - 1):
time_val = x_origin+i*x_increment
voltage = (data_bytes[i] - y_reference) * y_increment + y_origin
writer.WriteLine("%E, %f" % (time_val, voltage))
# Close output file.
writer.Close()
print "Waveform format BYTE data written to %s." % strPath
# =========================================================
# Main program:
# =========================================================
addr = "USB0::0x2A8D::0x1797::CN56240004::0::INSTR"
session = GlobalResourceManager.Open(addr)
session.TimeoutMilliseconds = 20000
myScope = MessageBasedFormattedIO(session)
# Initialize the oscilloscope, capture data, and analyze.
initialize()
capture()
analyze()

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Keysight Technologies InfiniiVision DSOX1204A and is the answer not in the manual?

Keysight Technologies InfiniiVision DSOX1204A Specifications

General IconGeneral
BrandKeysight Technologies
ModelInfiniiVision DSOX1204A
CategoryTest Equipment
LanguageEnglish

Related product manuals