
11
Example: Request for slave 17 to read bits 0004 to 0015.
ADDR
FUNC
DATA
start
Addr HI
DATA
start
Addr LO
DATA
bit #
HI
DATA
bit #
LO
CRC
HI
CRC
LO
11 01 00 03 00 0C CE 9F
Answer
In addition to the address of the slave and the function code (01), the
message comprises a character containing the number of data bytes and
the characters containing data. The data are compacted, so one byte
contains the status of 8 bits, the least significant bit of the first byte must
contain the bit corresponding to the starting address and so on. If the
number of bits to be read is not a multiple of 8, the last character must be
completed with zeros in the most significant bits.
Example: Answer to the request indicated above.
ADDR
FUNC
DATA
Byte
Count
DATA
bit
04..11
DATA
bit
12..15
CRC
HI
CRC
LO
11 01 02 CD 0B 6D 68
3.2 Read Input Status (02)
This function works in exactly the same way as the previous one.
3.3 Read Output Registers (03)
This function is used for requesting the value of 16-bit (word) registers
containing numeric variables. Broadcast mode is not allowed.
Question
In addition to the address of the slave and the function code (03), the
message contains the starting address expressed in two bytes and the
number of words to be read, also occupying two bytes. The maximum
number of words that may be read is 125. Address numbering starts from
zero (word1 = 0) for MODBUS, or one (word1 = 1) for JBUS.
Example: Request for slave 25 to read registers 069 to 0071.
ADDR
FUNC
DATA
start
Addr HI
DATA
start
Addr LO
DATA
word #
HI
DATA
word #
LO
CRC
HI
CRC
LO
19 03 00 44 00 03 46 06
Answer
In addition to the address of the slave and the function code (03), the
message comprises a character containing the number of data bytes and
the characters containing data. The registers require two bytes each, the
first of which contains the most significant byte.
Example: Answer to the request indicated above.
ADDR
FUNC
DATA
Byte
Count
DATA
word
69 HI
DATA
word
69 LO
DATA
word
70 HI
DATA
word
70 LO
DATA
word
71 HI
DATA
word
71 LO
CRC
HI
CRC
LO
19 03 06 02 2B 00 00 00 64 AF 7A
3.4 Read Input Registers (04)
This function works in exactly the same way as the previous one.
Comentários a estes Manuais