I'm confused about the results I am getting when trying to make a signal via the AWG (output 1) and reading it back via input 1.
Image is attached.

Code is below and *should* generate a sine with 2 periods. But the measurement goes completely wrong.
Any ideas are welcome!
Greetings Matthijs
Code: Select all
#!/usr/bin/python
import time
import sys
import redpitaya_scpi as scpi
import matplotlib.pyplot as plot
rp_s = scpi.scpi("192.168.3.150")
rp_s.tx_txt('GEN:RST');
rp_s.tx_txt('SOUR1:FUNC SINE');
rp_s.tx_txt('SOUR1:FREQ:FIX 1000')
rp_s.tx_txt('SOUR1:VOLT 1');
rp_s.tx_txt('SOUR1:BURS:STAT BURST')
rp_s.tx_txt('SOUR1:BURS:NCYC 1')
rp_s.tx_txt('SOUR1:BURS:NOR 1')
rp_s.tx_txt('SOUR1:TRIG:SOUR INT')
rp_s.tx_txt('OUTPUT1:STATE ON')
rp_s.tx_txt('ACQ:RST');
rp_s.tx_txt('ACQ:DEC 64')
rp_s.tx_txt('ACQ:TRIG:DLY 0')
rp_s.tx_txt('ACQ:TRIG:LEV 0')
rp_s.tx_txt('ACQ:START');
rp_s.tx_txt('ACQ:TRIG AWG_PE');
time.sleep(1)
rp_s.tx_txt('SOUR1:TRIG:IMM')
while 1:
rp_s.tx_txt('ACQ:TRIG:STAT?')
tmp = rp_s.rx_txt()
print(tmp)
if tmp == 'TD':
break
time.sleep(1)
rp_s.tx_txt('ACQ:SOUR1:DATA?')
buff_string = rp_s.rx_txt()
buff_string = buff_string.strip('{}\n\r').replace(" ", "").split(',')
buff = list(map(float, buff_string))
rp_s.close()
plot.plot(buff)
plot.ylabel('Voltage')
plot.show()