12-3
IM 2558A-01EN
Programming Overview
3
2
1
4
5
6
7
8
9
10
11
12
13
14
15
16
App
Index
Example A portion of the commands from the
frequency sweep command group
:FREQuency:INTernal:FMETer:
MAXimum
:FREQuency:INTernal:FMETer:
MINimum
• When Concatenating Commands of the Same
Group
The 2558A stores the hierarchical level of the
command that is currently being executed and
processes the next command on the assumption
that it belongs to the same level. Therefore,
the common header section can be omitted for
commands that belong to the same group.
Example
:FREQuency:INTernal:FMETer:
MAXimum 400Hz;MINimum 40Hz
• When Concatenating Commands of Different
Groups
If the subsequent command does not belong to the
same group, place a colon in front of the header (this
colon cannot be omitted).
Example
:FREQuency:INTernal:FMeter:
MAXimum 400Hz;
:FREQuency:INTernal:VARiable 40Hz;
• When Concatenating Simple Headers
If a simple header follows another command, place
a colon in front of the simple header (this colon
cannot be omitted).
Example
:SOURce:LEVel 1A;:OUTPut ON
• When Concatenating Common Commands
Common commands that are defined in IEEE 488.2-
1992 are independent of hierarchy. A colon is not
needed before a common command.
Example
:SOURce:RANGe 10A ;*CLS;
:SOURce:LEVel 1A <PMT>
• When Separating Commands with <PMT>
If you separate two commands with a terminator,
two program messages will be sent. Therefore,
the common header must be specified for each
command even when commands belonging to the
same command group are being concatenated.
Example
:FREQuency:INTernal:FMETer:
MINimum 40Hz
:FREQuency:INTernal:FMETer:
MAXimum 400Hz
12.2 Commands
Commands
There are three types of commands (program
headers) that a controller may send to the 2558A. The
commands differ in their program header formats.
Common Command Header
Commands that are defined in IEEE 488.2-1992 are
called common commands. The common command
header syntax is shown below. Be sure to include an
asterisk (
*
) at the beginning of a common command.
*
<Mnemonic>
?
Common command example
*CLS
Compound Header
Commands, other than common commands, that are
specific to the 2558A are classified and arranged in a
hierarchy according to their functions. The compound
header syntax is shown below. Be sure to use a colon
to specify a lower hierarchical level.
:
<Mnemonic>
?
:
Compound header example
:SOURce:FUNCtion
Simple Header
These commands are functionally independent and are
not contained within a hierarchy. The format of a simple
header is shown below.
<Mnemonic>
?
:
Simple header example
:OUTput
Note
A <mnemonic> is an alphanumeric character string.
When Concatenating Commands
• Command Groups
A command group is a group of commands that
have common compound headers arranged in a
hierarchy. A command group may contain sub-
groups.