Formats for returned values: ASCII format and binary format
R&S
®
FSWP-B1
120
User Manual 1177.5862.02 ─ 09
B
Formats for returned values: ASCII format
and binary format
When trace data is retrieved using the
TRAC:DATA
or
TRAC:IQ:DATA
command, the
data is returned in the format defined using the
on page 108. The
possible formats are described here.
●
ASCII Format (FORMat ASCII):
The data is stored as a list of comma-separated values (CSV) of the measured val-
ues in floating point format.
●
Binary Format (FORMat REAL,16/32/64):
The data is stored as binary data (definite length block data according to IEEE
488.2), each measurement value being formatted in 16-bit/32-bit/64-bit IEEE 754
floating-point-format.
The schema of the result string is as follows:
#<Length of length><Length of data><value1><value2>…<value n>
with:
<Length of length>
Number of digits of the following number of data bytes
<Length of data>
Number of following data bytes
<Value>
2-byte/4-byte/8-byte floating point value
Example
:
#41024
<Data>... contains 1024 data bytes
Data blocks larger than 999,999,999 bytes
According to SCPI, the header of the block data format allows for a maximum of 9
characters to describe the data length. Thus, the maximum REAL 32 data that can be
represented is 999,999,999 bytes. However, the R&S
FSWP is able to send larger data
blocks. In this case, the length of the data block is placed in brackets, e.g.
#(1234567890)
<value1><value2>…
Reading out data in binary format is quicker than in ASCII format. Thus, binary format
is recommended for large amounts of data.