Appendix 5.3.4 Check Code - Mitsubishi Melsec-L Series User Manual

Communication module
Hide thumbs Also See for Melsec-L Series:
Table of Contents

Advertisement

Appendix 5.3.4 Check code

Sending data
Receiving data
STX
"Q"
"Q"
(51
)
0101 0001
H
XOR
"J"
(4A
)
0100 1010 = =
H
"7"
(37
)
H
"1"
(31
)
H
"C"
(43
)
H
"2"
(32
)
H
"4"
(34
)
H
"N"
(4E
)
H
ETX
(03
)
H
App. - 45
(1) Processing procedure
The C24 processes Check code according to the following procedure.
1) Calculates value according to the selection of "Processing method".
2) When "Complement calculation" is 'One's complement' or 'Two's
complement', performs a 2-word-wise complement operation on the
value calculated in 1).
3) When "Code type" is 'ASCII decimal', extracts the lowest one word from
the value calculated in 2) and performs the hexadecimal decimal
conversion.
C24
(Data flow)
Forward direction (upper byte
Reverse direction (lower byte
Swapping
send data
(Data flow)
Forward direction (upper byte
Reverse direction (lower byte
Swapping
receive data
Byte swap (by word)
*Only when the data length
specification is 4 bytes
(2) Procedure for calculating horizontal parity
The following show procedures for calculating horizontal parities using the
following sample data.
"J"
"7"
(For the data shown above)
0001 1011
XOR
0011 0111 =
0010 1100
XOR
0011 0001 =
0001 1101
XOR
0100 0011 = 0101 1110
(Code type)
lower byte)
upper byte)
Bin
conversion of
Byte swap (by word)
length value
*Only when the data
length specification is
4 bytes
(Code type)
lower byte)
HEX
upper byte)
ASCII
conversion of
length value
ASCII hexadecimal
ASCII decimal
"1"
"C"
"2"
Calculating range
XOR
0011 0010 =
0110 1100
XOR
0011 0100 =
(Processing method)
(Data length)
(Calculating range)
(Complement calculation)
HEX
ASCII
Calculated
length value
ASCII hexadecimal
ASCII decimal
(Processing method)
(Data length)
(Calculating range)
(Complement calculation)
Calculated
check code
Bin
Received
check code
"4"
"N"
ETX
0101 1000
XOR
0100 1110
=
0001 0110
XOR
0000 0011 =
0001
Horizontal parity
=
1
APPENDIXES
Checking
Horizontal
parity
0101 (Binary)
5
(Hexadecimal)
App. - 45

Advertisement

Table of Contents
loading

This manual is also suitable for:

Lj71c24Lj71c24-r2

Table of Contents