App. - 45 App. - 45
APPENDIXES
Appendix 5.3.4 Check code
(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.
(Data flow)
(Data flow)
Sending data
Receiving data
Swapping
send data
Bin ASCII
conversion of
length value
Calculated
length value
Swapping
receive data
ASCII Bin
conversion of
length value
Calculated
check code
Received
check code
Byte swap (by word)
*Only when the data
length specification is
4 bytes
Byte swap (by word)
*Only when the data length
specification is 4 bytes
ASCII hexadecimal
ASCII hexadecimal
Forward direction (upper byte lower byte)
Forward direction (upper byte lower byte)
Reverse direction (lower byte upper byte)
HEX
C24
(Code type)
(Processing method)
(Data length)
(Calculating range)
(Complement calculation)
(Code type)
(Processing method)
(Data length)
(Calculating range)
(Complement calculation)
Checking
Reverse direction (lower byte upper byte)
ASCII decimal
HEX
ASCII decimal
(2) Procedure for calculating horizontal parity
The following show procedures for calculating horizontal parities using the
following sample data.
STX
"J"
"7"
"1"
"C"
"2"
"4"
"N"
ETX
Horizontal
parity
Calculating range
"Q"
(For the data shown above)
"Q"
(51
H
)
0101 0001
XOR
"J"
(4A
H
)
0100 1010 ==
0001 1011
XOR
"7"
(37
H
)
0011 0111 =
0010 1100
XOR
"1"
(31
H
)
0011 0001 =
0001 1101
XOR
"C"
(43
H
)
0100 0011 = 0101 1110
XOR
"2"
(32
H
)
0011 0010 =
=
0110 1100
XOR
"4"
(34
H
)
0011 0100 = 0101 1000
XOR
"N"
(4E
H
)
0100 1110
0001 0110
XOR
ETX
(03
H
)
0000 0011 =
0101 (Binary)
(Hexadecimal)
Horizontal parity
5
0001
1
=
Summary of Contents for MELSEC LJ71C24
Page 1: ......
Page 2: ......
Page 18: ...A 16 A 16 INDEX REVISIONS WARRANTY...
Page 22: ...A 20 A 20 2 LJ71C24 R2 LJ71C24 R2 Before Using the Product...
Page 23: ...A 21 A 21 MEMO...
Page 38: ...4 2 4 2 4 PROCEDURES PRIOR TO OPERATION MEMO 4...
Page 105: ...7 30 7 30 7 SETTINGS FOR THE C24 MEMO...
Page 425: ......
Page 426: ......
Page 427: ......