Mitsubishi FX3U-USB-BD User Manual page 545

Melsec-f fx series programmable controllers
Hide thumbs Also See for FX3U-USB-BD:
Table of Contents

Advertisement

FX Series PLC User's Manual - Data Communication Edition
Non-Protocol Communication (RS/RS2 Instruction)
8.2.6
Sum check code
The sum check code indicates a two-digit ASCII code converted from the lowest-order byte (8-bit) of the
result (sum) acquired by adding the sum check target data as hexadecimal data.
By setting a parameter, set whether or not the sum check code is added in the message.
• When "sum check provided" is selected, the sum check code is added in the message during sending.
During receiving, the sum check code is compared with the value calculated from the received data to
check the received data.
• When "sum check not provided" is selected, the sum check code is not added, so the received data is not
checked either.
A calculation example of the sum check code is shown below.
Example: When the communication format (parameters) is set as follows
- Control line not provided
- Headers provided [DLE+STX (D8410: 0210H, D8411: 0000H)]
- Terminators provided [DLE+ETX (D8412: 0310H, D8413: 0000H)]
In the case of send data
Send data
In the case of receive data
Receive data
Header
Data area
DLE
STX
31H
32H
D8410
D8410
D100
D100
lowest
highest
lowest
highest
lowest
-order
-order
-order
-order
byte
byte
byte
byte
Sum check code target
D100 lowest-order bits
D100 highest-order byte → 32H
D101 lowest-order byte
D101 highest-order byte → 34H
D8412 lowest-order byte → 10H (DLE)
D8412 highest-order byte → 03H (ETX)
Header
Data area
DLE
STX
35H
36H
D8410
D8410
D200
D200
lowest
highest
lowest
highest
lowest
-order
-order
-order
-order
-order
byte
byte
byte
byte
Sum check code target
D200 lowest-order bits
D200 highest-order byte → 36H
D201 lowest-order byte → 37H
D201 highest-order byte → 38H
D202 lowest-order byte → 10H
D202 highest-order byte → 03H
8 Creating Programs (RS2 Instruction)
Terminator
33H
34H
DLE
ETX
D101
D101
D8412
D8412
highest
highest
lowest
highest
-order
-order
-order
-order
-order
byte
byte
byte
byte
→ 31H
→ 33H
DDH
Terminator
37H
38H
DLE
ETX
D201
D201
D202
D202
D8414
highest
highest
lowest
highest
-order
-order
-order
-order
byte
byte
byte
byte
→ 35H
EDH
Converted into ASCII codes
8.2 How to Use RS2 Instruction
The order is
Sum data
. . . . .
different from
the data area.
44H
44H
Sum
Sum
CR
LF
lowest
-order
byte
byte
Converted into ASCII codes
The order is
Sum data
. . . . .
different from
the data area.
45H
44H
Sum
Sum
D8414
CR
LF
lowest
-order
byte
byte
Compared
4544H
A
B
C
D
E
F
G
H
I
Apx.
F-65

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents