HP Sander 16500C manual Tree Traversal Rules

Models: Sander 16500C

1 252
Download 252 pages 12.2 Kb
Page 76
Image 76

Example

Programming and Documentation Conventions

Tree Traversal Rules

Tree Traversal Rules

Command headers are created by traversing down the command tree. A legal command header from the command tree in figure 5-1 would be :MMEMORY:INITIALIZE. This is referred to as a compound header. As shown on the tree, branches are always preceded by colons. Do not add spaces around the colons. The following two rules apply to traversing the tree:

A leading colon (the first character of a header) or a terminator places the parser at the root of the command tree. For example, the colon preceding MMEMORY (:MMEMORY) in the above example places the parser at the root of the command tree.

Executing a subsystem command places you in that subsystem until a leading colon or a terminator is found. The parser will stay at the colon above the keyword where the last header terminated. Any command below that point can be sent within the current program message without sending the keywords(s) which appear above them. For example, the colon separating MMEMORY and INITIALIZE is the location of the parser when this compound header is parsed.

The following examples are written using HP BASIC 6.2 on a HP 9000 Series 300 Controller. The quoted string is placed on the bus, followed by a carriage return and linefeed (CRLF). The three Xs (XXX) shown in this manual after an ENTER or OUTPUT statement represents the device address required by your controller.

In this example, the colon between SYSTEM and HEADER is necessary since SYSTEM:HEADER is a compound command. The semicolon between the HEADER command and the LONGFORM command is the required <program message unit separator> . The LONGFORM command does not need SYSTEM preceding it, since the SYSTEM:HEADER command sets the parser to the SYSTEM node in the tree.

OUTPUT XXX;":SYSTEM:HEADER ON;LONGFORM ON"

5–8

Page 76
Image 76
HP Sander 16500C manual Tree Traversal Rules