This is the code I came up with. Note, I commented out the line for burst, and the sample rate, because they still need some tuning (see comments):
# Drive the Wave Generatorwavegen = instrument.Keysight33600A("/dev/usbtmc0")wavegen.write('*RST;*CLS;*OPC?') #reset instrumenttime.sleep(2) #wait 2 seconds for the reset to completewavegen.read(1000) #read *OPC? responsewavegen.write('SOUR1:DATA:VOL:CLE') #clear volatile waveformswavegen.write('SOUR1:FUNC ARB') #tell the instrument to use the arb feature#use the chirp_w signal, format it for the instrument, send to instrumentdataString = 'SOUR1:DATA:ARB1 chirp_w'for datapoint in chirp_w: dataString += ',' + str(datapoint) wavegen.write(dataString)wavegen.write('SOUR1:FUNC:ARB chirp_w') #set some parameters for the arb and output itwavegen.write('SOUR1:VOLT 2') # wavegen.write('SOUR1:VOLT:OFFS 0')wavegen.write('OUTP1:LOAD 50')#wavegen.write('SOUR1:BURS:STAT ON') #need to set burst rate before turning on#wavegen.write('SOUR1:FUNC:ARB:SRAT fs') #need to provide a value, not 'fs' wavegen.write('OUTP1 ON')
Also, check out the 33600 programming guide. A lot of the commands are different than the 33200 guide you referenced - http://www.keysight.com/main/redirector.jspx?action=ref&cname=EDITORIAL&ckey=2197440&lc=eng&cc=US&nfr=-32907.1082253.00
Retrieving data ...