I use Python for data acquisition from the RP via SCPI. This works fine but it is to slow. I'm pretty sure that neither the network connections nor Python is the bottleneck because I did something similar with much more data which is quite fast. My acquisition is based on the example from the webpage: http://redpitaya.com/examples-new/singl ... r-acquire/
Here is my code (in parts):
Code: Select all
[...]
import redpitaya_scpi as scpi
rp_s = scpi.scpi('xxx.xxx.xxx.xxx',timeout=5)
# start acquisition
try:
rp_s.tx_txt('ACQ:START')
except:
print('Data acquisition exception ... Is SCPI server running?')
sys.exit(0)
rp_s.tx_txt('ACQ:AVG ON')
# set trigger to channel 2 for TTL trigger signal
rp_s.tx_txt('ACQ:TRIG CH2_PE')
while 1:
rp_s.tx_txt('ACQ:TRIG:STAT?')
if rp_s.rx_txt() == 'TD':
break
# get current
rp_s.tx_txt('ACQ:SOUR1:DATA?')
buff_string = rp_s.rx_txt()
buff_string = buff_string.strip('{}\n\r').replace(" ", "").split(',')
buff = map(float, buff_string)
[...]
Code: Select all
rp_s.tx_txt('ACQ:SOUR1:DATA:STA:END? 1000,5000')
Code: Select all
rp_s.tx_txt('ACQ:SOUR1:DATA?')
Code: Select all
ACQ:SOUR<n>:DATA:STA:END?<start_pos>,<end_pos>
Code: Select all
ACQ:SOUR1:GET:DATA 10,13
Does someone know how to acquire data faster? This seems to be a single shot acquiring only. Is the something like a circular buffer with a fast reading procedure?
Thank you,
Alex