Tree Traversal Examples - Agilent Technologies Infiniium 90000 Series Programmer's Manual

Oscilloscopes
Hide thumbs Also See for Infiniium 90000 Series:
Table of Contents

Advertisement

8
Programming Conventions
Tree Traversal Rules
N O T E
A leading colon or a program message terminator (<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 the oscilloscope in
that subsystem until a leading colon or a program message terminator is found.
In the command tree, use the last mnemonic in the compound header as a
reference point (for example, RANGE). Then find the last colon above that
mnemonic (TIMEBASE:). That is the point where the parser resides. You
can send any command below this point within the current program
message without sending the mnemonics which appear above them (for
example, REFERENCE).

Tree Traversal Examples

The WriteString() methods in the following examples are written using
Visual Basic for Application (VBA) with the VISA COM library.
Example 1
Consider the following command:
myScope.WriteString ":CHANNEL1:RANGE 0.5;OFFSET 0"
The colon between CHANNEL1 and RANGE is necessary because
:CHANNEL1:RANGE is a compound command. The semicolon between the
RANGE command and the OFFSET command is required to separate the
two commands or operations. The OFFSET command does not need
:CHANNEL1 preceding it because the :CHANNEL1:RANGE command sets
the parser to the CHANNEL1 node in the tree.
Example 2
Consider the following commands:
myScope.WriteString ":TIMEBASE:REFERENCE CENTER;POSITION 0.00001"
or
myScope.WriteString ":TIMEBASE:REFERENCE CENTER"
myScope.WriteString ":TIMEBASE:POSITION 0.00001"
In the first line of example 2, the "subsystem selector" is implied for the
POSITION command in the compound command.
A second way to send these commands is shown in the second part of the
example. Because the program message terminator places the parser back
at the root of the command tree, you must reselect TIMEBASE to re- enter
the TIMEBASE node before sending the POSITION command.
Example 3
Consider the following command:
myScope.WriteString ":TIMEBASE:REFERENCE CENTER;:CHANNEL1:OFFSET 0"
140
Agilent Infiniium 90000 Series Oscilloscopes Programmer's Reference

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents