Fluke 8842a instruction manual Syntax Rules, Incorrect example

Models: 8842a

1 269
Download 269 pages 45.95 Kb
Page 64
Image 64

Remote Programming 3

INPUT SYNTAX

Illegal commands (e.g., F9) generate an error message, but are otherwise ignored, and do not affect the instrument’s configuration.

Example

Explanation

"* F9"

This would load the output buffer with an error message and select F1

 

(established by the * command).

3-39. Syntax Rules

Four syntax rules should be followed when constructing input command strings. They are:

RULE 1: Read output data only once.

To prevent old (previously read) data from being read a second time by mistake, the output buffer is always cleared after it has been read. If the output buffer is read twice without an intervening output command, the 8842A will not respond to the second attempt to read the output buffer. (However, if the 8842A is in T0, no intervening command is necessary.)

RULE 2: Use no more than one output command per input command string.

Because the 8842A has only one output buffer, it writes new data over old. If an input command string contains more than one output command, only the data from the last command can be read.

Example

Explanation

"F1 T3 ? F2 ?" Improper construction. The second trigger writes over the first. To

 

 

obtain two readings, send two complete command strings (separated by

 

 

terminators).

"F2 R3

S0 T3 ?"

Correct construction. The string contains only one output command.

"F2 R3

S0"

Correct construction. It is permissible for a string not to contain an

 

 

output command.

RULE 3: Read the output data generated by one input command string before sending the next input command string.

Output data remains available in the output buffer until it is read, or until the next input command string is received. As soon as the controller finishes reading the output buffer, or as soon as the 8842A receives a new input terminator, the Data Available bit in the serial poll register is set false. When this bit is false, data can no longer be read from the output buffer. Therefore, an output string which is available must be read by the controller before, rather than after, the next input command string is sent.

Rule 3 is most evident in the external trigger mode, and is best demonstrated by a programming example. The following program is written first incorrectly, and then correctly, in Fluke BASIC using the 1722A Instrument Controller.

Incorrect example

100PRINT @3, "T1 ?"

200PRINT @3, "F4"

300INPUT @3, A

3-23

Page 64
Image 64
Fluke 8842a instruction manual Syntax Rules, Incorrect example