SCPI Basics
SCPI Basics
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 signal generator 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:
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.
Keysight EXG and MXG X-Series Signal Generators SCPI Command Reference
"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
#B101101
binary equivalent
#H2D
hexadecimal equivalent
#Q55
octal equivalent
47