7.5. Reading Data from the Instrument

To read data, a 'poll' message is issued to the instrument. This message takes the following format:

[EOT](ADR_H)(ADR_H)(ADR_L)(ADR_L)(C1)(C2)[ENQ]

Each item in the above description represents a single ASCII character. The items in square brackets are control characters used to frame the message, whose values may be determined by reference to the table on the previous page. The bracketed item have the following significance:

ADR_H

The first digit of the instrument address, the ADR_H is sent twice, as a validation mechanism.

e.g. '1'(31 HEX) for instrument address 12.

'0'(30 HEX) for instrument address 01.

ADR_L

The second digit of the instrument address, the ADR_L is sent twice, as a validation mechanism.

e.g. '2'(32 HEX) for instrument address 12.

'1'(31 HEX) for instrument address 01.

C1

The first character of the mnemonic for the parameter being accessed, e.g. 'P' for Process Variable.

C2

The second character of the mnemonic for the parameter being accessed, e.g. 'V' for Process Variable.

If the instrument receives the message correctly and the mnemonic is valid it will reply with:

[STX](C1)(C2)<DATA>[EXT](BCC)

C1, C2

Echo of the mnemonic from the poll message.

DATA

The value of the parameter in a given display format.

e.g. 99.9, 1.2, -999, etc.

BCC

This is a block checksum that is generated for data validation. It is computed by XORing(exclusive or) all the characters after and excluding the STX, and including the ETX. Note that it may take the value of 'EOT' and care must be take when writing a protocol driver to ensure that this is not seen as an 'End of Transmission' sequence.

Example of a Parameter Read

For example, when reading PV(i.e. measured tension) from instrument at address 01, the following sequence of character will be sent and received:

Host:

ASCII: EOT 0 0 1 1 P V ENQ
HEX: 04 30 30 31 31 50 56 05

If the measured tension is 24.8 Kg at address 01, the instrument returns:

Instrument:

ASCII: STX P V   2 4 . 8 ETX BCC
HEX: 02 50 53 20 32 34 2E 38 03 35