Xylem Expert 7060_7070_Modbus User Manual

Page 4

Advertising
background image

Communication protocol Serie30

Page 10/37

4.3

Description of MODBUS functions

This section describes the MODBUS functions supported by Series 30 transmitters (device Class.Group = 5.20)
Overview:

F3:

Read registers on MODBUS address space

F6:

Write single register on MODBUS address space

F8:

MODBUS Echo function

F16: Write multiple registers on MODBUS address space

4.4

Modbus Communication Examples

address

request

response

received value

250

250 3 0 2 0 2 112 64 250 3 4 63 117 228 166 102 72

0.96052 bar

Read P1

1

1 3 0 2 0 2 101 203 1 3 4 63 117 240 123 227 222

0.960701 bar

Read P2

1

1 3 0 4 0 2 133 202 1 3 4 63 118 6 224 21 213

0.961042 bar

250

250 3 0 8 0 2 80 66 250 3 4 65 181 99 178 29 163

22.6737 °C

Read

TOB1

1

1 3 0 8 0 2 69 201 1 3 4 65 181 192 121 110 11

22.719 °C

Read P1

and

TOB1

1

1 3 1 0 0 4 69 245 1 3 8 63 117 227 210 65 182

28 32 160 119

0.960508 bar

22.7637 °C

Purple = MODBUS register address

4.5

Function 3: MODBUS Register Read

Read a number of subsequent registers in the MODBUS address space starting with StAdd. Note, that the data returned has to

be interpreted according the definitions in “4.9 MODBUS Register Map”.

•

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

•

The number of registers read in one cycle is limited:

4 registers for devices Class.Group-Version = 5.20-10.XX and later

2 registers for earlier versions than Class.Group-Version = 5.20-10.XX

•

Byte-count of the answer will be an even number (1 register = 2 bytes)

•

Addresses that are part of double sized registers, return 0x0000 if only one register is requested

•

Returns NaN or Exception 4 in case of a channel error, depending on accessing a “float” or “integer” address.

Request:

DevAddr

0x03

StAdd H StAdd L # Reg H # Reg L CRC16_L CRC16_H

Response:

DevAddr

0x03

# Bytes Data H Data L

…

Data L CRC16_L CRC16_H

Error:

DevAddr

0x83

Error

CRC16_L CRC16_H

Error codes:

2

Illegal data address:

- Wrong starting-address or wrong number of registers

- Start-address not defined, register exceeding defined range return 0x0000

3

Illegal data value:

- Quantity of requested registers out of bound

- Must be <= 4 for devices Class.Group-Version = 5.20-10.XXand later

- Must be <= 2 for devices Class.Group-Version = 5.20-2.40 - 5.20-10.XX

4

Slave Device Failure:

- Value not valid (=> check status)

- Over/Underflow when requesting value as int

- Channel not active and requesting value as int

Advertising