
12
3.5 Force Single Coil (05)
This function is used for forcing the status of a single binary variable ON
or OFF. Broadcast mode is allowed.
Question
In addition to the address of the slave and the function code (05), the
message contains the address of the variable to be forced in two bytes
and two characters of which the first is set to FFh (255) to force it ON and
00h to force it OFF, while the second is always set to zero. Address
numbering starts from zero (bit1 = 0) for MODBUS, from one (bit1 = 1) for
JBUS.
Example: Request to force bit 4 on slave 47 ON.
ADDR
FUNC
DATA
bit #
HI
DATA
bit #
LO
DATA
ON/OFF
DATA
(zero)
CRC
HI
CRC
LO
2F 05 00 03 FF 00 7A 74
Answer
The answer consists in retransmitting the message received once the
variable has been changed.
Example: Answer to request mentioned above.
ADDR
FUNC
DATA
bit #
HI
DATA
bit #
LO
DATA
ON/OFF
DATA
(zero)
CRC
HI
CRC
LO
2F 05 00 03 FF 00 7A 74
3.6 Preset Single Register (06)
This function is used for setting the value of a single 16-bit register.
Broadcast mode is allowed.
Question
In addition to the slave and the function code (06), the message contains
the address of the variable expressed in two bytes and the value to be
assigned. Address numbering starts from zero (word1 = 0) for MODBUS,
from one (word1 = 1) for JBUS.
Example: Request to force address 26 of slave 38 to 926.
ADDR
FUNC
DATA
bit #
HI
DATA
bit #
LO
DATA
WORD
HI
DATA
WORD
LO
CRC
HI
CRC
LO
26 06 00 19 03 9E DF 82
Answer
The answer consists in retransmitting the message received once the
variable has been changed.
Example: Answer to request indicated above.
ADDR
FUNC
DATA
bit #
HI
DATA
bit #
LO
DATA
WORD
HI
DATA
WORD
LO
CRC
HI
CRC
LO
26 06 00 19 03 9E DF 82
Komentáře k této Příručce