Binary output status read (code 2) - Function allows, with one message, to read many subsequent
addressed binary output statuses. The attempt to read an non-existing binary input leads to error message
Example: 1-5 output read
Request
Response
Field name
Hex
Field name
Hex
Function code
0x02
Function code
0x02
Register address – high part
0x00
Bytes
0x01
Register address – low part
0x00
5-1 input status
0x19
Number of binary inputs – high part
0x00
Number of binary inputs – low part
0x05
Table 5: Exemplary binary input read
Input No.,
-
-
-
5
4
3
2
1
Value read
Hex
0x19
Bit
0
0
0
1
1
0
0
1
Input status
-
-
- ON ON OFF OFF ON
Table 6: Interpretation of binary input statuses
Memory Register read (code 3) – the Function allows, with one message, to read subsequently
addressed registers . An attempt to read a non-existing register leads to an error message.
Example: 108-110 register read
Request
Response
Field name
Hex
Field name
Hex
Function Code
0x03
Function Code
0x03
Register address – high part
0x00
Bytes
0x06
Register address – low part
0x6B
Register value – high part (108)
0x02
Number of registers – high part
0x00
Register value – low part (108)
0x2B
Number of registers – low part
0x03
Register value – high part (109)
0x00
Register value – low part (109)
0x00
Register value – high part (110)
0x00
Register value – low part (110)
0x64
Table 7: Exemplary memory register read.
4