7.6. Writing Data to the Instrument

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

[EOT](ADR_H)(ADR_H)(ADR_L)(ADR_L)[STX](C1)(C2)<DATA>[ETX](BCC)

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 in Section 7.4. The bracketed item in normal type 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.

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.



Example of a Parameter Write

For example, when writing a value of 15.0Kg to the SV(setting tension) to an instrument at address 01, the following sequence of character will be sent and received:

Host:

ASCII: EOT 0 0 1 1 STX S L 1 5 . 0 ETX BCC
HEX: 04 30 30 31 31 02 53 4C 31 35 2E 30 03 06

If the modification of SV was successful, the instrument returns:

[ACK] Parameter write was successful.

ASCII: ACK
HEX: 06

If a parity or a address format error is detected, the instrument will not reply. Otherwise, the instrument will reply with the code in the following table:

Error Code(HEX) Error
15 01 Bad parameter name
15 02 BCC is incorrect
15 05 Read only parameter
15 07 Parameter locked, modification denied
15 08 Exceeds limits