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 Generator wavegen = instrument.Keysight33600A("/dev/usbtmc0") wavegen.write('*RST;*CLS;*OPC?')#reset instrument time.sleep(2)#wait 2 seconds for the reset to complete wavegen.read(1000)#read *OPC? response wavegen.write('SOUR1:DATA:VOL:CLE')#clear volatile waveforms wavegen.write('SOUR1:FUNC ARB')#tell the instrument to use the arb feature
#use the chirp_w signal, format it for the instrument, send to instrument dataString ='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 it wavegen.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'
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):
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