User`s manual
46
FX3U Series Programmable Controllers
User’s Manual - MODBUS Serial Communication Edition
7 MODBUS Standard Commands
7.2 Frame Specifications
b) ASCII mode
In this mode, frames are received or sent in units of 2 characters 2 bytes of ASCII codes.
The frame specifications are compliant with the MODBUS protocol specifications.
Note
The Longitudinal Redundancy Checking (LRC) field is one byte, containing an 8-bit binary value. The LRC
value is calculated by the transmitting device, which appends the LRC to the message. The device that
receives recalculates an LRC during receipt of the message, and compares the calculated value to the actual
value it received in the LRC field. If the two values are not equal, an error results.
A procedure for generating an LRC is:
1) Add all bytes in the message, excluding the starting ‘colon’ and ending CRLF. Add them into an 8-bit field,
so that carries will be discarded.
2) Subtract the final field value from FF hex (all 1’s), to produce the ones-complement.
3) Add 1 to produce the twos-complement.
4) For a transmit frame the LRC is calculated before converting to ASCII.
Start END
Error check calculation range
Address field
:
(3A
H
)
2 bytes
Function code
2 bytes
Data
Error check
n x 2 bytes
(n = 0 to 252)
2 bytes
CR + LF
(0D
H
) (0A
H
)