2 Modbus protocol description
14
2.4.3 Writing n words
Data query
Response
Example
Starting from Modbus address 0x13EE, the four values 1,0,1,0 should be written on the first
four external digital inputs.
Chapter 7.3.17 "External analog and digital signals", page 78
Slave address Function
code
0x10
Address of
first word
Number of
words
Number of
bytes
Word
value(s)
Checksum
CRC
1 byte 1 byte 2 bytes 2 bytes 1 byte x bytes 2 bytes
Slave address Function
code
0x10
Address of
first word
Number of
words
Checksum
CRC
1 byte 1 byte 2 bytes 2 bytes 2 bytes
Hex code for the data query: Word 1 Word 2 Word 3 Word 4
01 10 13 EE 00 04 08 00 01 00 00 00 01 00 00 A7 00
Slave Function
code
Address
1st word
Num-
ber of
words
Number
of bytes
CRC
Hex code for the response:
01 10 13 EE 00 04 A5 7B
Slave Function code Address
1st word
Number of
words
CRC