5-16
IM XL100C-E
• Calculating the Sum Value
If you set the parameter of the CS command to “1 (enabled),” the checksum value is
output only during serial communications. The check sum is the same as that used in
the TCP/IP and is derived according to the following algorithm.
Buffer on Which the Sum Value Is Calculated
• For the header sum, it is calculated from “data flag + identifier” (fixed to 6
bytes).
• The data sum is binary data.
1 byte
0
(1)
(2)
(3)
(4)
(6)
(5)
Padding
If the data length of the buffer is odd, a “0” is padded so that it is even. (1) through (6)
are summed as unsigned two-byte integers (unsigned short). If the digit overflows a
“1” is added. Finally, the result is bit-wise inverted.
Measured/Calculated Binary Data Syntax
• The FD command is used to output the measured/calculated data.
• The ID number of the output format is 1.
• The measured data is output using signed 16-bit integer; the calculated data is output
using signed 32-bit integer. These integers can be understood as physical values by
adding the decimal point and the unit. The decimal point position can be determined
using the FE command.
Example of Deriving Physical Values from Binary Data
Binary Data
Decimal Position Code
Physical Value (Measured Value)
10000
0
10000
10000
1
1000.0
10000
2
100.00
10000
3
10.000
10000
4
1.0000
• Binary Data Format
Number of bytes
2 bytes
Number of blocks
•••
Binary data of block n
2 bytes
Binary data of block 1
• Number of Blocks
This is the number of blocks.
• Number of Bytes
This is the size of one block in bytes.
5.2 Response Syntax