
19
Modbus-RTU message format instruction
Read the status of relay output
(
Function code 0x01
)
Host
request
Frame
structure
Addr
ess
code
Functi
on code
data code
CRC
check
code
initial
relay
address
Number
of relay
Byte
1 byte
1 byte
2 bytes
2 bytes
2 bytes
Data
range
1
~
247
0x01
0x0000
(
fixed
)
0x0001
~
0x0004
CRC16
Messa
ge
example
0x01
0x01
0x00 0x00
0x00 0x02
0xBD
0xCB
slave
response
frame
structure
addre
ss code
functi
on code
data code
CRC
check
code
byte of
register
register
value
Byte
1 byte
1 byte
1 byte
1 byte
2 bytes
Message
example
0x01
0x01
0x01
0x03
0x11
0x89
Remark: the register value in the slave response indicates the state of the
relay. Beginning from the lowest bit of the byte, each number corresponds to
the state of a loop of relay output. “1” indicates the relay is closed, while “0”
indicates the relay is cut off. In the upper list, the register value “0x03”
corresponds to “0000 0011” in binary system which means the first and
second loop of relays are closed.
Read the state of digital input
(
Function code 0x02
)
Host
request
Frame
structure
address
code
function
code
data code
CRC
check
code
initial
switch
address
number
of
switches
Byte
1 byte
1 byte
2 bytes
2 bytes
2 bytes
Data
range
1
~
247
0x02
0x0000
0x0001
~
0x000C
CRC16
Содержание PA19 Series
Страница 9: ...7...