What is the "FORM1" data format?
When transferring trace data over GPIB to and from the 8753/8720 family of
network analyzers, you must first specify the data format to be used -
FORM1, FORM2, etc. The fastest GPIB data transfers occur using FORM1, the
analyzer's internal binary format, but the specifics of this format are
not detailed in the manuals.
The FORM1 data array consists of a four byte header, and six bytes per
frequency point. The first two bytes in the header are the ASCII characters
"#H", and the second two bytes are an integer representing the
number of bytes in the rest of the array. The format of each six byte data
point depends on what data you have requested from the analyzer.
If you use the OUTPDATA command, the data comes out in real and imaginary
format. The first two bytes are a 2's complement, 16-bit integer for the
imaginary part; call this number "B". The next two bytes are a 2's
complement, 16-bit integer for the real part; call this number "A".
The fifth byte is not used, and the last byte is a 2's complement, 8-bit
exponent; call it "E". Then...
REAL data = (A / 2^15) * 2^E
IMAGINARY data = (B / 2^15) * 2^E
For example, a data point with value 0.2 -j 0.1 would be represented as:
CC CD 66 66 00 FE
When using the OUTPFORM command to get the analyzer's formatted data,
the FORM1 format depends on what display format is selected on the network
analyzer. For POLAR and SMITH format, you get real and
imaginary data in
the same format as given above for the OUTPDATA command.
If the analyzer's display format is LINEAR MAG or SWR, you get only a
single number per frequency. The format is almost the same as above, but
the imaginary part is zero and the real part contains the number. For
example, a SWR of 2.2 would be represented as:
00 00 46 66 00 02
If the network analyzer is in LOG MAG format, the first two bytes are
zero, and the last four bytes are a 2's complement, 32-bit integer; call
this number "F". Then...
LOGMAG(dB) = (F / 2^16) * 10*log(2)
For example, a data point with value -10dB would be represented as:
00 00 FF FC AD 96
If the network analyzer is in PHASE format when you use the
OUTPFORM command, the first two bytes are
zero, and the last four bytes are a 2's complement, 32-bit integer; call
this number "F". Then...
PHASE(degrees) = (F / 2^18) * 360
For example, a data point with value 45 degrees would be represented as:
00 00 00 00 80 00
|