beautypg.com

Micromod MOD: Modcell 2050R MODBUS Communications User Manual

Page 42

background image

IB-23C650M

MODBUS PROTOCOL

Preset Multiple Registers

Master Message Format Bytes

0

1

2 & 3

4 & 5

6

7 & 8

...

x &

x+1

x +2

& x+3

Device
Address

Function
Code

Starting
Register
Number

Number
of
Registers

Number
of Data
Bytes

Register
Data 1

... Register

Data n

CRC

Slave Response Bytes

0

1

2 & 3

4 & 5

6 & 7

Device Address Function Code

Starting Register Number Number of Registers CRC

Coil Data Example

Coil data is packed 1 bit per coil. The low order bit of the first data byte
contains the addressed coil and unused bits are zero filled. For instance, if
coils 22 through 33 are requested, two data bytes will be returned with the coil
data located as follows; (coils 22,24,25,26,29,30,32 and 33 are on).

coil #

29

26 25 24

22

33 32

30

data bytes 1 & 2 1

0

0

1

1

1

0

1

0

0

0

0

1

1

0

1

38