VXI 3002 manual Programming, Program messages, Compound headers

Models: 3002

1 136
Download 136 pages 1.74 Kb
Page 32
Image 32

Programming

Program messages

A message consists of one or more message units. Message units are separated by a semi-colon (;). The whole message is ended by the Program Message Terminator (or End Of Message) defined as one of the following:

(1)<newline> (ASCII 10 - often known as 'line feed') or

(2)<newline> + END (the EOI line is asserted as well) or

(3)+ END (EOI is asserted in the last data byte of the message)

A response message is always terminated by <EOM> consisting of <newline> + END.

A message unit consists of a mnemonic header which may be followed by data. If data follows, then it must be separated from its header by at least one space:

<header><SPACE><data> e.g. RFLV:INC 6.0 dB

Spaces may be freely inserted in a message to improve readability, except within a header or within data.

A header may be a command or a query. A query has a '?' as its final character and causes the generation of a response message which will be read by the controller. Common commands and queries (defined in IEEE 488.2) begin with a '*'.

Upper and lower case characters are considered equivalent (i.e. FM fm Fm fM are all interpreted by the instrument in the same way).

Compound headers

The instrument implements compound headers which allows a complex set of commands to be built up from a small set of basic elements in a 'tree and branch' structure. The elements of a compound header are separated by a colon (:). Spaces are not allowed within a header.

Special rules apply when more than one compound header is used in one message. When the separator ';' is encountered, all headers except the trailing element of the previous header in the message are assumed to precede the following header, for example:

AM:DEPTH 30PCT;ON is equivalent to the two commands:

AM:DEPTH 30PCT and AM:ON

This does not apply to common commands (*RST etc.). The rule may be overridden by preceding a header with a colon, for example:

AM:ON;:FM:ON

Most main functions have a short form of header which may be used for clarity and brevity in simple messages, for example:

CFRQ 1.25GHZ is the same as CFRQ:VALUE 1.25GHZ

3-2

Page 32
Image 32
VXI 3002 manual Programming, Program messages, Compound headers