![background image](http://html1.mh-extra.com/html/smc-networks/hrs100-series/hrs100-series_operation-manual_1299247044.webp)
HRX-OM-S010
Chapter 4 MODBUS communication function
4.6
Function codes
HRS100/150 Series
4-10
4.6 Function codes
Table 4.6-1 shows function codes to read or write register.
Table 4.6-1
Function codes
NO
Code
Name
Function
1
03(03h) Read holding registers
Reading multiple registers
2
06(06h) Preset single register
Writing registers
1
3
16(10h) Preset multiple registers
Writing multiple registers
4
23(17h) Read/write 4x registers
Reading/writing multiple registers
1
:
Broadcast is not supported.
4.7 LRC
LRC checks the content of the message other than [:] of START and
[CR][LF] of END. The sending side calculates and sets. The receiving side
calculates based on the received message, and compares the calculation
result with the received LRC. The received message is deleted if the
calculation result and received LRC do not match.
Add up the byte number of the message consisting of 8 consecutive bits. The
result except the carry (overflow) is converted to 2’s complement.
Calculation example
LRC
message for calculation
]
0106000B00FE
Calculation
○Addition
01h
+
06h
+
00h
+
0Bh+00h+FEh
=
110h
○Object
110h→10h
○complement of 2
10h→EFh→F0h
LRC is F0h
Sending message
[:]0106000B00FEF0[CR][LF]