328 Keysight CXG, EXG, and MXG X-Series Signal Generators Programming Guide
Creating and Downloading User–Data Files
User File Data (Bit/Binary) Downloads
User File Bit Order (LSB and MSB)
The signal generator views the data from the most significant bit (MSB) to the
least significant bit (LSB). When you create your user file data, it is important
that you organize the data in this manner. Within groups (strings) of bits, a bit’s
value (significance) is determined by its location in the string. The following
shows an example of this order using two bytes.
Bit File Type Data
The bit file is the preferred file type and the easiest to use. When you download
a bit file, you designate how many bits in the file the signal generator can
modulate onto the signal. During the file download, the signal generator adds
a 10–byte file header that contains the information on the number of bits the
signal generator is to use.
Although you download the data in bytes, when the signal generator uses the
data, it recognizes only the bits of interest that you designate in the SCPI
command and ignores the remaining bits. This provides greater flexibility in
designing a data pattern without the concern of using an even number of bytes
as is needed with the binary file data format. The following figure illustrates this
concept. The example in the figure shows the bit data SCPI command
formatted to download three bytes of data, but only 23 bits of the three bytes
are designated as the bits of interest. (For more information on the bit data
SCPI command format, see
“Downloading User Files” on page 334
and
“Commands for Bit File Downloads” on page 338
.)
Most Significant Bit (MSB)
This bit has the highest value (greatest weight) and is located at the far left of
the bit string.
Least Significant Bit (LSB)
This bit has the lowest value (bit position zero) and is located at the far right of
the bit string.
1 0 1 1 0 1 1 1 1 1 1 0 1 0 0 1
LSB
MSB
15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Data
Bit Position
SCPI Command :MEM:DATA:BIT <"file_name">,<bit_interest>,<datablock>
:MEM:DATA:BIT "3byte",23, # 1 3 Z&x
0 1 0 1 1 0 1 0 0 0 1 0 0 1 1 0 0 1 1 1 1 0 0 0
Downloaded Data:
Byte 1
Byte 2
Byte 3
Bits of interest
Ignored bit (LSB)
5A
26
78
Hex Value:
MSB
ASCII representation of the data (3 bytes)
Z
&
x
ASCII Representation:
Start block data
number of bytes
number of decimal digits
Содержание X-Series
Страница 4: ...4 ...
Страница 10: ...10 Contents ...