General Information : Cable & Antenna Commands : :FORMat Subsystem

:FORMat Subsystem
This subsystem contains commands that determine the formatting of numeric data when it is transferred.
The format setting affects data in specific commands only. If a command is affected, it is noted in the command description.
:FORMat[:READings][:DATA] ASCii|INTeger,32|REAL,32
:FORMat[:READings][:DATA]?
Title
Numeric Data Format
Description
This command specifies the format in which data is returned in certain commands.
ASCii format returns the data in comma-separated ASCII format. The units are the current instrument units. This format requires many more bytes so it is the slowest format. INTeger 32 values are signed 32-bit integers in little-endian byte order. This format returns the data in 4-byte blocks.
The units are always mdBm. For example, if the measured result was -12.345 dBm, that value would be sent as -12345.) REAL,32 values are 32-bit floating point numbers conforming to the IEEE 754 standard in little-endian byte order. This format returns the data in 4-byte binary format. The units are the current instrument units.
Both INTeger,32 and REAL,32 formats return a definite block length. Each transfer begins with an ASCII header such as #42204. The first digit represents the number of following digits in the header (in this example, 4). The remainder of the header indicates the number of bytes that follow the header (in this example, 2204). You then divide the number of following bytes by the number of bytes in the data format you’ve chosen (4 for both INTeger,32 and REAL,32Öso 2204/4) to get the number of data points (in this example, 551).
Parameter
ASCii|INTeger,32|REAL,32
Parameter Type
<char>
Default Value
ASCii
Related Command
:TRACe[:DATA]
 
Interpreting Returned Data Pair
The following section provides two conversion examples on interpreting returned data pairs. Examples are provided for both integer and real number formats.
 
Converting INTeger,32 and REAL,32 Values
Converting INTeger,32 Example:
The instrument returns the following S11 RL data point in INT,32 format:
4d 15 fc ff [real], ef a2 f8 ff [imag]
1.
ff fc 15 4d [real], ff f8 a2 ef [imag]
2.
3.
11111111111111000001010101001101 [real], 11111111111110001010001011101111 [imag]
4.
111110101010110011 [real], 1110101110100010001 [imag]
5.
256691 [real], 482577 [imag]
6.
0.256691 [real], 0.482577 [imag]
7.
10*log(0.256691^2 + 0.482577^2) = –5.25 dB
 
Converting REAL,32 Example:
The instrument returns the following values in REAL,32 format:
00 31 2a 47 [real], 00 e8 6a c6 [imag]
1.
47 2a 31 00 [real], c6 6a e8 00 [imag]
2.
01000111 00101010 01110001 00000000
3.
4.
0, the MSb is the sign bit
10001110, exponent. The actual exponent value is this value minus 127. So, it is 142 – 127 = 15.
0101010 01110001 00000000 (as normalized value) and adding 1 and multiplying by 2^exponent results in 1+(0/2+1/4+0/8+1/16+0/32+1/64+...) * 2^15 = 43520 (approx.)
5.
c6 6a e8 00 in binary is 11000110 01101010 11101000 00000000
The MSb is the sign bit
The next 8 bits is the exponent, which is 10001100. The actual value is 140 – 127 = 13
Converting the remaining bits and multiplying by exponent and accounting for sign, results in –(1+(1/2+1/4+0/8+1/16+0/32+1/64...) * 2^13) = –14976 (approx).
6.
.043520 [real], –.014976 [imag]
7.
10*log((.043520)^2 + (-.014976)^2) = –26.7401848 dB
 

Copyright 2010 Anritsu Company
Anritsu Company
1-800-ANRITSU
10450-00024, Rev. B
mmdtechpubs@anritsu.com