
13
3.7 Read Status (07)
This function is used for reading the status of eight predetermined bits
with a compacted message. Broadcast mode is not allowed.
Question
The message consists only of the slave address and the function code
(07).
Example: Request of the status of slave 25.
ADDR FUNC CRC
HI
CRC
LO
19 07 4B E2
Answer
In addition to the address of the slave and the function code (07), the
message comprises a character containing the status bits.
Example: Answer to the request indicated above.
ADDR
FUNC
DATA
status
byte
CRC
HI
CRC
LO
19 07 6D 63 DA
3.8 Force Multiple Coils (15)
This function is used for forcing the status of each binary variable in a
consecutive block. Broadcast mode is allowed.
Question
In addition to the address of the slave and the function code (15), the
message contains the starting address expressed in two bytes, the
number of bits to be written, the number of bytes containing the data and
the data characters. 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 written is not a multiple of 8, the last character must be completed
with zeros in the most significant bits. Address numbering starts from
zero (bit1 = 0) for MODBUS, from one (bit1 = 1) for JBUS.
Example: Request to force 4 bits starting from address 1 on slave 12. Bits
1 and 4 forced to "1" and the others to "0".
ADDR
FUNC
DATA
start
Addr HI
DATA
start
Addr LO
DATA
bit #
HI
DATA
bit #
LO
DATA
Byte
Count
DATA
bit
1..4
CRC
HI
CRC
LO
0C 0F 00 00 00 04 01 09 3F 09
Answer
In addition to the address of the slave and the function code (15), the
message contains the starting address and the number of bits written.
Example: Answer to request indicated above.
ADDR
FUNC
DATA
start
Addr HI
DATA
start
Addr LO
DATA
bit #
HI
DATA
bit #
LO
CRC
HI
CRC
LO
0C 0F 00 00 00 04 55 15
Comentários a estes Manuais