Mitsubishi Electric MELSEC iQ-R Series User Manual page 544

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

Advertisement

■Check code calculation range
The following shows specification examples of the check code calculation code.
Packet
element 1
Packet
Header
format
Example 1
Example 2
Example 3
Example 1: Calculating range when 1 and n-1 are specified as the start and the end respectively.
Example 2: Calculating range when 2 and n-1 are specified as the start and the end respectively.
Example 3: Calculating range when 2 and n-2 are specified as the start and the end respectively.
Non-verified reception
The usage example for non-verified reception is shown below.
Example of format of packet from other device
1 byte
2 byte
Identification
STX
code
Data needed by the user
Example of packet setting
1 byte
2 byte
Conversion
Header
variable
Using a non-verified reception element has the following advantages in the case of the packet format shown above.
• The only necessary data can be stored in the device memory of a CPU module and buffer memory.
• A single protocol (packet) can handle receive packets that includes data whose contents vary each time.
APPENDICES APPENDIX
542
Appendix 5 Operation Image and Data Structure of Predefined Protocol
Packet
element 2
Non-conversion
Static data
Calculating range when specifying 1 to (n-1)
Calculating range when specifying 2 to (n-1)
Calculating range when specifying 2 to (n-2)
2 byte
5 byte
Country
Manufacturer
code
code
Data
to be read
Set a Non-verified reception
element
Non-verified reception (variable number of characters)
Packet
Packet
element n-2
element n-1
Terminator
variable
Variable
number of
5 byte
characters
Product code
When the data are not needed by
the user and data contents and/or
the number of character vary
Variable
number of
characters
Packet
element n
Check code
1 byte
ETX
1 byte
Terminator

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents