1372
Keysight InfiniiVision M9241/42/43A PXIe Oscilloscopes SCPI Programmer's Guide
39
More About Oscilloscope Commands
Program Data Syntax Rules
Program data is used to convey a parameter information related to the command
header. At least one space must separate the command header or query header
from the program data.
<program mnemonic><separator><data><terminator>
When a program mnemonic or query has multiple program data, a comma
separates sequential program data.
<program mnemonic><separator><data>,<data><terminator>
For example, :MEASure:DELay CHANnel1,CHANnel2 has two program data:
CHANnel1 and CHANnel2.
Two main types of program data are used in commands: character and numeric.
Character Program
Data
Character program data is used to convey parameter information as alpha or
alphanumeric strings. For example, the :TIMebase:MODE command can be set to
normal, zoomed (delayed), XY, or ROLL. The character program data in this case
may be MAIN, WINDow, XY, or ROLL. The command :TIMebase:MODE WINDow
sets the time base mode to zoomed.
The available mnemonics for character program data are always included with the
command's syntax definition.
When sending commands, you may either the long form or short form (if one
exists). Uppercase and lowercase letters may be mixed freely.
When receiving query responses, uppercase letters are used exclusively.
Numeric Program
Data
Some command headers require program data to be expressed numerically. For
example, :TIMebase:RANGe requires the desired full scale range to be expressed
numerically.
For numeric program data, you have the option of using exponential notation or
using suffix multipliers to indicate the numeric value. The following numbers are
all equal:
28 = 0.28E2 = 280e-1 = 28000m = 0.028K = 28e-3K.
When a syntax definition specifies that a number is an integer, that means that the
number should be whole. Any fractional part will be ignored, truncating the
number. Numeric data parameters accept fractional values are called real
numbers.
All numbers must be strings of ASCII characters. Thus, when sending the number
9, you would send a byte representing the ASCII code for the character 9 (which is
57). A three-digit number like 102 would take up three bytes (ASCII codes 49, 48,
and 50). This is handled automatically when you include the entire instruction in a
string.