Technical data
586 Agilent N8201A Performance Downconverter Synthetic Instrument Module, 250 kHz to 26.5 GHz
28 Programming Fundamentals
Bit patterns are most often specified as hexadecimal numbers, though octal, binary or
decimal numbers may also be used. In the SCPI language these numbers are specified as:
• Hexadecimal, #Hdddd or #hdddd where ‘d’ represents a hexadecimal digit 0 to 9 and ‘a’
to ‘f’. So #h14 can be used instead of the decimal number 20.
• Octal, #Odddddd or #odddddd where ‘d’ represents an octal digit 0 to 7. So #o24 can be
used instead of the decimal number 20.
• Binary, #Bdddddddddddddddd or #bdddddddddddddddd where ‘d’ represents a 1 or 0.
So #b10100 can be used instead of the decimal number 20.
Block Program Data
Some parameters consist of a block of data. There are a few standard types of block data.
Arbitrary blocks of program data can also be used.
<trace> Is an array of rational numbers corresponding to displayed trace data. See
FORMat:DATA for information about available data formats.
A SCPI command often refers to a block of current trace data with a variable name such as:
Trace1, TRACE2, or trace3, depending on which trace is being accessed.
<arbitrary block data> Consists of a block of data bytes. The first information sent in
the block is an ASCII header beginning with #. The block is terminated with a semi-colon.
The header can be used to determine how many bytes are in the data block. There are no
units. (You will not get block data if your data type is ASCII, using FORMat:DATA ASCII
command. Your data will be comma separated ASCII values.
Block data example: suppose the header is #512320.
• The first digit in the header (5) tells you how many additional digits/bytes there are in
the header.
• The 12320 means 12 thousand, 3 hundred, 20 data bytes follow the header.
• Divide this number of bytes by your current data format (bytes/data point), either 8 (for
real,64), or 4 (for real,32). For this example, if you’re using real64 then there are 1540
points in the block.
Putting Multiple Commands on the Same Line
Multiple commands can be written on the same line, reducing your code space
requirement. To do this:
• Commands must be separated with a semicolon (;).
• If the commands are in different subsystems, the key word for the new subsystem must
be preceded by a colon (:).
• If the commands are in the same subsystem, the full hierarchy of the command key
words need not be included. The second command can start at the same key word level
as the command that was just executed.