542
APPENDICES APPENDIX
Appendix 5 Operation Image and Data Structure of Predefined Protocol
■Check code calculation range
The following shows specification examples of the check code calculation code.
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.
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.
Packet
element 1
Packet
element 2
Packet
element n-2
Packet
element n-1
Packet
element n
Packet
format
Check code
Non-conversion
variable
Header Static data Terminator
Calculating range when specifying 1 to (n-1)
Example 1
Calculating range when specifying 2 to (n-1)
Example 2
Calculating range when specifying 2 to (n-2)
Example 3
STX ETX
Example of format of packet from other device
1 byte 2 byte 2 byte 5 byte 5 byte
Variable
number of
characters
1 byte
Identification
code
Country
code
Manufacturer
code
Product code
Data
to be read
When the data are not needed by
the user and data contents and/or
the number of character vary
Data needed by the user
Set a Non-verified reception
element
Example of packet setting
Variable
number of
characters
1 byte 2 byte 1 byte
Conversion
variable
Header Non-verified reception (variable number of characters) Terminator