beautypg.com

Xylem Expert 7060_7070_Modbus User Manual

Page 5

background image

Communication protocol Serie30

Page 11/37

4.6

Function 6: MODBUS Single Register Write

This function has the same functionality as F16, but writes only 1 register.

Function is implemented in devices Class.Group-Version = 5.20-10.XX and later

A register contains 2 bytes (16 bit).

Use this function for single configuration steps, cause the returned error is easily distinguishable from other register

writes.

Note that single register operations are not allowed in the address ranges 0x03XX and 0xFFXX.

Request:

DevAddr

0x06

StAdd H StAdd L

Data H Data L CRC16_L CRC16_H

Response:

DevAddr

0x06

StAdd H StAdd L

Data H Data L CRC16_L CRC16_H

Error:

DevAddr

0x86

Error

CRC16_L CRC16_H

Error codes:

2

Illegal data address

- address not accessible by function 6

- Start-address not defined (for writing)

3

Illegal data value

- frame length incorrect

4

Slave Device Failure

- The data written is outside the defined data range

4.7

Function 8: MODBUS Echo Test

This function may be used to perform a quick line check. It just returns the data received.

Function is implemented in devices Class.Group-Version = 5.20-10.XX and later

Data may be any 2 byte value

Request:

DevAddr

0x08

0x00

0x00

Data H Data L CRC16_L CRC16_H

Response:

DevAddr

0x08

0x00

0x00

Data H Data L CRC16_L CRC16_H

Error:

DevAddr

0x88

Error

CRC16_L CRC16_H

Error codes:

3

Illegal data value:

- The data following the function code was not the fixed data (0x00, 0x00).