Options
and
Accessories-2230 Operators
Where
a header has multiple arguments, the arguments
(or argument pairs, if the argument has its own argument)
must
be
separated
by
commas. Two examples of this syn-
tax
are:
DATa ENCdg:BINary,CHAnnel:CH2
and
VMOde?
CH1
,CH2,ADD
NOTE
With
Option
12,
multiple commands (especially
queries) should not
be
used
in
a single programmed
message
line.
Commands (and arguments to
commands) are interpreted and acted
on
by
the
oscilloscope as soon
as
a separator is recognized;
the
oscilloscope does not wait for
the
message
terminator
(CR
or
CR-LF) to signal
the
end
of
the
command
line.
If
one
of
the
commands
in
a
command line requires a response for any reason
(i.e.,
command error, illegal command,
or
unable to
do
the
command),
the
oscilloscope's service-request
status-byte response will
be
asynchronously
sent.
If
the
service request
is
not handled correctly,
the
controller may not
be
able to continue with
its program.
COMMAND SEPARATOR-Multiple commands
may
be
put into
one
command
line
by
separating the individual
commands with a semicolon; for example:
DATa ENCdg:BINary,CHAnnel:CH2;WFMpre XINcr:1.0E-3
Multiple commands
in
a message
are
not recommended
with RS-232-C controller routines for Option
12.
See
the
previous
NOTE.
However, the command separator
is
valid,
and
multiple commands
on
the
same
message
line
may
be
used. A waveform preamble
is
one
example of using
multiple commands
in
a single message. With Option
10,
GPIB controller programs often
use
multiple commands
in
a single line.
GPIB
MESSAGE
TERM
I
NA
TOR-As
previously
explained,
GPIB
messages
may
be
terminated with either
EOI
or
LF.
Some controllers assert
EOI
concurrently with
7-20
the last data byte; others use only the
LF
character as a
terminator.
The
GPIB interface
can
be
set to accept either
terminator. With
EOI
selected, the instrument interprets a
data byte received with
EOI
asserted
as
the
end
of the
input message; it also asserts
EOI
concurrently with the
last byte of
an
output message. With the
LF
setting, the
instrument interprets the
LF
character without
EOI
asserted (or any data byte received with
EOI
asserted)
as
the
end
of
an
input message; it transmits a Carriage
Return character followed
by
Line
Feed
(LF
with
EOI
asserted) to terminate messages.
RS-232-C
MESSAGE
TERMINATOR-RS-232-C
messages from the oscilloscope may
be
terminated with
either carriage return
(CR)
or the
CR
and
line-feed
(LF)
characters.
The
RS-232-C Option
can
be
set to send and
receive either terminator
as
the last byte of a message.
The
instrument does not wait for the end-of-line terminator
when it handles incoming messages. It recognizes a semi-
colon
as
the
end
of
command terminator
and
immediately
begins its response to the preceding command string.
Because of the way the instrument handles commands,
messages should
be
limited to one command per line.
Incoming
and
outgoing messages
are
not stacked. If more
than one command per line
is
sent, responses to the first
commands
in
a
line
may
be
lost
when
the output buffer
is
reinitialized to output the response to the last command
in
a
line.
Even
single command messages should not
be
terminated twice.
The
response to the command may
be
lost when the instrument
sees
the second terminator.
COMMAND FORMATTING-Commands sent to the
oscilloscope must have the proper format (syntax) to
be
understood; however, this format
is
flexible
in
that many
variations
are
acceptable.
The
following paragraphs
describe this format
and
the acceptable variations.
The
oscilloscope expects
all
commands to
be
encoded
as
either upper-case or lower-case ASCII characters.
All
data output
is
in
upper case.
Spaces
can
be
used
as
formatting characters to
enhance the readability of command sequences.
As
a gen-
eral
rule,
spaces
can
be
placed either after commas
and
semicolons or after the space that follows a header.
NUMERIC
ARGUMENTS-
Table 7-16 shows the
number formats for the <NR1
>,
<NR2>,
and
<NR3>
arguments
used
in
a command. Both signed
and
unsigned
numbers
are
accepted, but unsigned numbers
are
taken
as
positive.
--