Introduction to Programming

Device Address

Device Address

The location where the device address must be specified also depends on the host language that you are using. In some languages, this could be specified outside the output command. In BASIC, this is always specified after the keyword OUTPUT. The examples in this manual use a generic address of

XXX.When writing programs, the number you use will depend on the protocol you use, in addition to the actual address. If you are using HP-IB, see chapter 2, "Programming Over HP-IB." If you are using RS-232-C, see chapter 3, "Programming Over RS-232-C." If you are using Ethernet LAN, see chapter 4, "Programming Over LAN."

Instructions

Instructions (both commands and queries) normally appear as a string embedded in a statement of your host language, such as BASIC, Pascal or C. The only time a parameter is not meant to be expressed as a string is when the instruction’s syntax definition specifies <block_data>. There are just a few instructions which use block data.

Instructions are composed of two main parts: the header, which specifies the command or query to be sent; and the parameters, which provide additional data needed to clarify the meaning of the instruction. Many queries do not use any parameters.

Instruction Header

The instruction header is one or more keywords separated by colons (:). The command tree for the mainframe in figure 5-1 illustrates how all the keywords can be joined together to form a complete header (see chapter 5, "Programming and Documentation Conventions").

The example in figure 1-1 shows a command. Queries are indicated by adding a question mark (?) to the end of the header. Many instructions can be used as either commands or queries, depending on whether or not you have included the question mark. The command and query forms of an instruction usually have different parameters.

1–7

Page 21
Image 21
HP Sander 16500C manual Device Address, Instructions, Instruction Header