Mitsubishi Electronics QJ71C24N Network Card User Manual


 
7 - 8 7 - 8
MELSEC-Q
7 DATA COMMUNICATIONS USING BIDIRECTIONAL PROTOCOL
(d) Sum check code
The sum check code expresses the numeric value for the lower two bytes
(16 bits) of the results (sum) from the addition of the data length and the
data portion in the message as binary code data.
When "Sum check" is specified with the transmission setting in GX
Developer, it is necessary to add a sum check code at the end of the
message.
1) For data communication from the external device to the Q series C24
The Q series C24 checks and processes the sum check code received.
It cannot be read from the sequence program.
When "No sum check" is specified, once a data portion of message
corresponding to the data length is received, the succeeding data
received will be ignored up to the control code that follows (See (a)).
The following example shows the contents of a sum check code in the
message.
2) For data communication from the Q series C24 to the external device
The sum check code to be transmitted is calculated and added by the Q
series C24. When "No sum check" is specified, no sum check code is
transmitted.
E
N
Q
ABCDEFGH IJ
100
LH LHLH
00 000000 111111 00
b15 b8 b7 b1 b0
(Example) The following shows the sum check code when "ABCDEFGHIJ " and the numeric value 100 are sent as data
(when the unit is in bytes).
External device side
Q series C24
Arbitrary data
Data
Data
length
(000C
H
)
(0064
H
)
Sum
check
code
Contents of 0327
H
memory
03
H
27
H
(L) (H)
(H)
0C
H
+ 00
H
+ 41
H
+ 42
H
+ 43
H
+ 44
H
+ 45
H
+ 46
H
+
47
H
+ 48
H
+ 49
H
+ 4A
H
+ 64
H
+ 00
H
Added value = 0327
H
(L)
toto
0C
H
00
H
41
H
47
H
42
H
43
H
44
H
45
H
46
H
48
H
49
H
4A
H
64
H
00
H
27
H
03
H
05
H