Mitsubishi FX3U Series User Manual page 50

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
Series Programmable Controllers
3U
User's Manual - MODBUS Serial Communication Edition
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.
Start
:
(3A
)
H
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.
46
Address field
Function code
2 bytes
2 bytes
Error check calculation range
7 MODBUS Standard Commands
Data
Error check
n x 2 bytes
2 bytes
(n = 0 to 252)
7.2 Frame Specifications
END
CR + LF
(0D
) (0A
)
H
H

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents