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.
Patrick
SCPI command question about ACQ:DATA:FORMAT
-
- Posts: 1441
- Joined: Sat Jun 07, 2014 12:49 pm
- Location: Königswinter
Re: SCPI command question about ACQ:DATA:FORMAT
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.
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.
-
- Posts: 2
- Joined: Thu Feb 11, 2016 10:03 pm
Re: SCPI command question about ACQ:DATA:FORMAT
thank you!!
-
- Posts: 28
- Joined: Fri Apr 28, 2017 12:43 am
Re: SCPI command question about ACQ:DATA:FORMAT
I can't get this to work.
If I do this:
then it stalls indefinitely at the last SCPI command.
Using
instead of RAW (or omitting the ACQ:DATA:UNITS command completely) gives the following error in redpitaya_scpi.py:
Thanks,
John.
If I do this:
Code: Select all
rp_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:START')
rp_s.tx_txt('ACQ:TRIG NOW')
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()
Using
Code: Select all
rp_s.tx_txt('ACQ:DATA:UNITS FLOAT')
What am I doing wrong?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
Thanks,
John.
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 34 guests