Hi,
I am reading some voltage and it is perfectly working fine!
But I am unable to change the decimation factor or read it out...
As soon as I want to do any of these options the script hangs..
Do I have to define the source?
This is not working for all parameters (or at least I tested some...)
Additionally can I handle the decimation factor as a variable (also in the code below).
Here is my code:
import sys
import redpitaya_scpi as scpi
import matplotlib.pyplot as plot
rp_s = scpi.scpi(sys.argv[1])
rp_s.tx_txt('ACQ:START')
rp_s.tx_txt('ACQ:TRIG NOW')
#set decimation factor
#rp_s.tx_txt('ACQ:DEC8')
#would this be possible for a defined variable?:
#rp_s.tx_txt('ACQ:DEC'+str(DecimationFactor))
#readout decimation factor
rp_s.tx_txt('ACQ:DEC?')
dec = rp_s.rx_txt()
print(dec)
while 1:
rp_s.tx_txt('ACQ:TRIG:STAT?')
if rp_s.rx_txt() == 'TD':
break
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))
plot.plot(buff)
plot.ylabel('Voltage')
plot.show()
maybe one can help me!
Thanks
Unable to set/readout decimation factor
-
- Posts: 7
- Joined: Wed Mar 01, 2017 10:02 pm
Re: Unable to set/readout decimation factor
Sorry!
solved!
solved!
-
- Posts: 2
- Joined: Sun Jan 02, 2022 1:57 am
Re: Unable to set/readout decimation factor
Hello! How did you solve this?
All my best
All my best
jadalnie klasyczne ekskluzywne meble wypoczynkowe do salonu ekskluzywne meble tapicerowane ekskluzywne meble do sypialni ekskluzywne meble włoskie
Who is online
Users browsing this forum: No registered users and 32 guests