Mitsubishi Electric MELSEC iQ-R Series User Manual page 257

Serial communication module
Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

■C24 processing to registered codes FFH+11H and FFH+17H
The two's complement sum check code that calculates the range for data (message) to be transmitted/received is expressed
as two character data in ASCII code, then transmitted and received from the upper digit.
The difference between (FFH+11H) and (FFH+17H) is the difference in the calculating ranges.
An example of the contents (arrangement) of the transmission and reception of the two's complement sum check code is
shown below.
Ex.
Arrangement of data transmitted and received with the registered code FFH+17H (The start frame and final frame are
equivalent to one frame respectively.)
User frame
(first frame)
User frame register
02H FFH+01H
code
S
T
X
Transmission/rec
eption data code
02H
00H
• How to calculate the two's complement sum check code
The lower 1 byte of the value obtained by adding the subject data as binary data is converted to a two's complement, then
converted to a hexadecimal ASCII code.
Ex.
For message example above
02H+00H+3BH+31H+32H+33H+34H+03H=10AH
Arbitrary data
User frame
(last frame)
3BH
03H
FFH+17H
0DH 0AH
E
C
;
1
2
3
4
T
X
R
3BH
31H
32H
33H 34H
03H
46H 36H
0DH
Calculation range
Data in the subject range are added as binary data (hexadecimal)
00001010
The lower 1 byte of the above numeric value
is expressed as a binary number
11110110
Reversed, then converted to a two's complement
F6H
Converted to a hexadecimal ASCII code
"F"
"6"
(46H) (36H)
13 CONTENTS AND REGISTRATION OF USER FRAMES FOR DATA COMMUNICATION
L
F
0AH
13.1 User Frame Types and Contents During Communication
13
255

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents