PROGRAMMING
Program
messages
A message
consists of one
or more message units. Message units are separated
by a semi-
colon
(;).
The whole message
is ended by the Program
Message Terminator (or End Of Message)
defined as one of the following:
(1)
<newline>
(ASCII 10
-
often
known as 'line feed') or
(2)
<newline>
+
END (the EOI line is asserted as well)
or
(3)
+
END (EOI is asserted on the last data
byte of the message)
Note ...
A response message is always terminated
by <EOM> consisting
of
<newline>
+ END.
A message unit consists
of a mnemonic header which
may be
followed
by data. If data
follows, then it must
be separated from its header
by at least one space:
<header><SPACExdata>
e.g. RFLV:INC 6.0 dB
Spaces
may be freely inserted in a
message to improve readability, except within
a header
or within
data.
A
header may be a command
or a query.
A
query has a
'?'
as its
final character and causes
the generation
of
a response
message which will be read
by the controller.
Common
commands
and queries
(defined in IEEE
488.2)
begin
with a
Upper and lower
case characters are
considered equivalent
(i.e. FM fm Fm fM are all
interpreted
by the 2040 series
in the same way).
Compound
headers
The 2040 series implements
compound
headers which
allow
a complex set of commands
to be built up
from a small set
of basic elements in a 'tree and branch' structure.
The elements of
a compound header are separated
by a colon
(:).
Spaces are not allowed
within
a header.
Special rules apply when
more than one compound
header is used in one message. When
the separator
is encountered, all
headers except the trailing element
of
the previous
header in
the message are assumed to
precede the following header,
for example:
AM:DEPTH 30PCT;ON
is equivalent
to the two commands:
AM:DEPTH 30PCT
and
AM:ON
This does not apply to
common commands
(*RST
etc.).
The rule may be overridden
by
preceding a header
with a colon, for example:
AM:ON;:FM:ON
3-2-4
46882-074C