User`s guide
1-11
Introduction to Programming
Program Data Syntax Rules
Program Data Syntax Rules
Prog ram data is used to convey a par am eter information related to the com mand
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, :CHANNEL:THRESHOLD POD1,TTL has two program data:
POD1 and TTL.
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, delayed, XY, or ROLL. The character program data in this case
may be NORMAL, DELAYED, XY, or roll. The command :TIMEBASE:MODE
DELAYED sets the time base mode to delayed.
The available mnemonics for character program data are always included with
the instruction’s syntax definition. See the online Programmer’s Reference for
more information. 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 be ignored, truncating the
number. Numeric data parameters accept fractional values are called real
numbers.