R&S AFQ100A
AFQ Commands - Signal Generation
1401.3084.32 6.22
E-3
{WAVEFORM-Length: #I
0
Q
0
I
1
Q
1
...I
x
Q
x
...I
N-1
Q
N-1
…}
(mandatory for waveforms)
The tag contains the actual waveform data and consists of the following:
Length
"Length"specifies the number of bytes in a WAVEFORM tag and consists of the
following:
+ Length of ",#"
(1 byte)
+ Number of I/Q pairs * 4
(2 bytes per I and per Q value).
I
x
Q
x
… represents binary data (16-bit signed integer in 2's complement notation)
containing the I and Q component alternately and starting with the I component.
Each component consists of two bytes, least significant byte (LSB) first.
The values of the two bytes in an I component and a Q component are in the
range -32767 to +32767. This value is transferred to the D/A converter.
At 50 between the inner and outer conductors of the I and Q outputs, an
amplitude V
p
of +/-0.5 Volt arises on the I/Q output connectors of the Instrument.
When a PEP offset is defined (PEP OFFSET tag) the amplitude is
correspondingly reduced.
I
V
V
p
0.5
-0.5
V
t
(The illustration also applies to the Q output)
Example:
{WAVEFORM-401:#I,Q,I,Q,I,Q...I,Q} (100 I/Q pairs with 4
bytes each
are
transmitted are transmitted)
IEC bus query:
The data is transmitted using GPIB command
WAVE:DATA
.
We will use the example of a sine function in the I channel and a cosine function in the Q channel, each
with 20 points, to explain how a waveform file SICO.WV is generated.
The sine and cosine values are calculated by a short program written in the programming language C
(see the following example for creating a C-program). They are stored in the file SICO.TXT as follows:
Contents of SICO.TXT:
Sine (I) Cosine (Q)
0.000000 1.000000
0.309017 0.951057
0.587785 0.809017
0.809017 0.587785
0.951057 0.309017
1.000000 -0.000000
0.951056 -0.309017
0.809017 -0.587785
0.587785 -0.809017
0.309017 -0.951056
-0.000000 -1.000000
-0.309017 -0.951057
-0.587785 -0.809017
-0.809017 -0.587785
-0.951056 -0.309017
-1.000000 0.000000
-0.951056 0.309017
-0.809017 0.587785
-0.587785 0.809017
-0.309017 0.951057
The decimal values in SICO.TXT should be normalized such
that they are between –1.0 and +1.0.
The waveform file SICO.WV will be based on the contents of
this file.