Just about everything about Red Pitaya
#4218 by raptrick
Fri Feb 12, 2016 9:58 pm
Hello All,

I'm trying to speed up the read out process of a recorded trace. Here I want to avoid ascii read out since it is very inefficient. I'm looking for a binary read. The change in format might bring up some clues.

For the command ACQ:DATA:FORMAT, what is the difference between parameter ASCII and FLOAT?

What is then the precision of FLOAT?

If I read data in ASCII, can I reread the same data in FLOAT for verification purposes?

Thanks in advanced.

#4219 by Nils Roos
Fri Feb 12, 2016 10:51 pm
Well, it looks like you found another inconsistency in the documentation of the scpi-server.

The actual options for ACQ:DATA:FORMAT are ASCII and BIN.

In ASCII mode, the values are floating point voltages that are calibrated with the DC offset and gain. The precision is that of the C type float.
In BIN mode, the values are 16bit two's complement ADC count values that are calibrated with DC offset only and then clamped to [-8192..8191].

You should be able to read the same data again in the new format after switching.
#7847 by JohnnyMalaria
Tue Aug 08, 2017 5:21 pm
I can't get this to work.

If I do this:

Code: Select allrp_s.tx_txt('ACQ:RST')
rp_s.tx_txt('ACQ:DATA:UNITS RAW')
rp_s.tx_txt('ACQ:DATA:FORMAT BIN')
rp_s.tx_txt('ACQ:DEC 65536')
rp_s.tx_txt('ACQ:TRIG:LEVEL 100')
rp_s.tx_txt('ACQ:TRIG:DLY 8192')
rp_s.tx_txt('ACQ:TRIG NOW')

while 1:
    if rp_s.rx_txt() == 'TD':

buff_string = rp_s.rx_txt()

then it stalls indefinitely at the last SCPI command.


Code: Select allrp_s.tx_txt('ACQ:DATA:UNITS FLOAT')

instead of RAW (or omitting the ACQ:DATA:UNITS command completely) gives the following error in redpitaya_scpi.py:

File "C:\...\redpitaya_scpi.py", line 35, in rx_txt
chunk = self._socket.recv(chunksize + len(self.delimiter)).decode('utf-8') # Receive chunk size of 2^n preferably

UnicodeDecodeError: 'utf-8' codec can't decode byte 0xae in position 8: invalid start byte

What am I doing wrong?



Who is online

Users browsing this forum: No registered users and 3 guests