Technical data
SCPI Basics 6
Agilent N8211A/N8212A Performance Upconverter Synthetic Instrument Module, 250 kHz to 20 / 40 GHz 167
However, when a string is the parameter for a SCPI command, additional quotes or other
delimiters may be required to identify the string. Your programming language may use two
sets of double quotes, one set of single quotes, or back slashes with quotes to signify the
string parameter. The following examples illustrate these different formats:
"MEMory:LOAD:LIST ""myfile"""
used in BASIC programming languages
"MEMory:LOAD:LIST \"myfile\""
used in C, C++, Java, and PERL
"MEMory:LOAD:LIST 'myfile'"
accepted by most programming languages
Consult your programming language reference manual to determine the correct format.
Binary, Decimal, Hexadecimal, and Octal Formats
Command values may be entered using a binary, decimal, hexadecimal, or octal format.
When the binary, hexadecimal, or octal format is used, their values must be preceded with
the proper identifier. The decimal format (default format) requires no identifier and the
N8211A/N8212A assumes this format when a numeric value is entered without one. The
following list shows the identifiers for the formats that require them:
• #B identifies the number as a binary numeric value (base-2).
• #H identifies the number as a hexadecimal alphanumeric value (base-16).
• #Q identifies the number as a octal alphanumeric value (base-8).
The following are examples of SCPI command values and identifiers for the decimal value
45:
#B101101 binary equivalent
#H2D hexadecimal equivalent
#Q55 octal equivalent
The following example sets the RF output power to 10 dBm (or the equivalent value for the
currently selected power unit, such as DBUV or DBUVEMF) using the hexadecimal value
000A:
:POW #H000A
A unit of measure, such as DBM or mV, will not work with the values when using a format
other than decimal.