MODBUS communication function
5-7 HECR
5.6 Function codes
The table berow function codes to read or write register.
Reading multiple registers
Preset multiple registers
Writing multiple registers
Reading/writing multiple registers
*1:Broadcast is not supported.
5.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
1) Addition
01H+06H+00H+0BH+00H+FEH=110H
2) Object
110H→10H
3) complement of 2
10H→EFH→F0H
LRC is F0H
[:]0106000B00FEF0[CR][LF]