Tree Traversal Rules; Examples - HP 54501A Programming Reference Manual

Digitizing oscilloscope
Hide thumbs Also See for 54501A:
Table of Contents

Advertisement

Tree Traversal
Rules
Command
headers are created
by
traversing down the command tree.
A
legal command header
from
the command tree in figure 4-1 would be
":CHANNEL1:RANGE".
This
is
referred
to
as
a
compound header.
A
compound header
is
a
header made of two or more mnemonics separated
by
colons.
The mnemonic
created contains no
spaces.
The following
rules
apply to
traversing the tree:
A
leading
colon
or
a
<
program message terminator
>
(either
a
<
NL
>
or
EOI
true on the
last
byte)
places the parser
at
the root
of
the
command
tree.
A
leading
colon is
a
colon that
is
the first
character of
a
program header.
Executing
a
subsystem command places you in that subsystem
(until
a
leading colon or
a <
program
message
terminator
>
is
found).
In
the
Command Tree, figure
4-1,
use
the
last
mnemonic
in
the compound
header
as
a
reference point (for example,
RANGE).
Then find the
last
colon
above that
mnemonic
(CHANNELl:),
and that
is
where the
parser will be.
Any command below
that point can be sent within the
current program
message
without sending the
mnemonic(s) which
appear above them
(OFFSET).
Examples
The
OUTPUT
statements are written using
HP BASIC
4.0 on
a
HP
9000
Series
200/300 Controller. The quoted string
is
placed on the
bus,
followed
by
a
carriage return and linefeed
(CRLF).
Example
1:
OUTPUT
707;":CHANNEL1:RANGE
0.5
;OFFSET
0"
Comments:
The
colon between
CHANNELl
and
RANGE
is
necessary,
CHANNEL1:RANGE
is
a
compound command.
The
semicolon between
the
RANGE
command and the
OFFSET
command
is
the
required
<
program message unit separator
>.
The
OFFSET
command does not
need
CHANNELl
preceding
it, since
the
CHANNEL1:RANGE
command
set
the parser to the
CHANNELl
node in the tree.
HP 54501A
Programming
Programming
and Documentation
Conventions
4-5

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents