Programming instructions
Downloading and Using Files
User File Data Downloads
Chapter 4 175
Preliminary Setup
No preliminary setup is required for user file downloads.
Bit Memory Downloads
Bit memory accepts data in any integer number of bits, up to the maximum available memory.
The data length in bytes for files downloaded to bit memory is equal to the number of
significant bits plus seven, divided by eight, then rounded down to the nearest integer. Each
file has a 16-byte header associated with it.
You must have enough bytes to contain the bits you specify. If the number of bits is not a
multiple of 8, the least significant bits of the last byte will be ignored.
For example, specifying 14 bits of a16-bit string using the command :MEMory:DATA:BIT
"file_name", 14, #12Qz results in the last 2 bits being ignored. See the following figure.
Bit memory provides more versatility and is preferred for user file downloads.
SCPI Commands Send the following command to download the user file data into the
signal generator’s bit memory.
:MEMory:DATA:BIT "<file_name>", <bit count>, <datablock>
Example :MEMory:DATA:BIT "file_name", 16, #12Qz
file_name provides the user file name as it will appear in the signal generator’s binary
memory catalog
#1 defines the number of decimal digits to follow in “B”
2 denotes how many bytes of data are to follow
Qz the ASCII representation of the 16 bits of data that are downloaded to the
signal generator. This variable is represented by “C” in the sample command
line
010 0001 0111 1010 original user-defined data contains 2 bytes, 16 bits total
SCPI command sets bit count to 14; the last 2 bits are ignored
010 0001 0111 1010