Download  Print this page

Data Examples Of Check Code - Mitsubishi Electric FX5 User Manual

Melsec iq-f series.
Hide thumbs

Advertisement

Data examples of Check Code

Shows the data examples of element check code that can be placed in a packet.
Calculation procedure for horizontal parity
The following show procedures for calculating horizontal parities using the following sample data.
STX
"Q"
For the packet shown above
0101 0001
"Q"
(51H)
XOR
"J"
(4AH)
0100 1010
=
0001 1011
"7"
(37H)
0011 0111
"1"
(31H)
"C"
(43H)
"2"
(32H)
"4"
(34H)
"N"
(4EH)
ETX
(03H)
■Data Flow: Forward Direction (Data Length: 1)
No complement calculation is designated
(Reference) Hexadecimal: 15H, Decimal: 21
Code type
Data length (Values in ( ) indicate ASCII code.)
1 byte
ASCII hexadecimal
5 (35H)
ASCII decimal
1 (31H)
HEX
15H
One's complement is designated (One's complement for 0000 0015H: FFFF FFEAH)
When Code Type is ASCII Decimal, the lower one word is extracted and converted from hexadecimal to decimal.
(hexadecimal: FFEAH, decimal: 65514)
Code type
Data length (Values in ( ) indicate ASCII code.)
1 byte
ASCII hexadecimal
A (41H)
ASCII decimal
4 (34H)
HEX
EAH
Two's complement is designated (Two's complement for 0000 0015H: FFFF FFEBH)
When Code Type is ASCII Decimal, the lower one word is extracted and converted from hexadecimal to decimal.
(hexadecimal: FFEBH, decimal: 65515)
Code type
Data length (Values in ( ) indicate ASCII code.)
1 byte
ASCII hexadecimal
B (42H)
ASCII decimal
5 (35H)
HEX
EBH
"J"
"7"
"1"
Calculating range
XOR
=
0010 1100
XOR
0011 0001
=
0001 1101
XOR
0100 0011
=
2 byte
15 (31H 35H)
21 (32H 31H)
0015H
2 byte
EA (45H 41H)
14 (31H 34H)
FFEAH
2 byte
EB (45H 42H)
15 (31H 35H)
FFEBH
Appendix 2 Operation Image and Data Structure of Predefined Protocol
"C"
"2"
"4"
0101 1110
XOR
0011 0010
=
0110 1100
XOR
0011 0100
=
0101 1000
XOR
0100 1110
3 byte
015 (30H 31H 35H)
021 (30H 32H 31H)
000015H
3 byte
FEA (46H451H 41H)
514 (35H 31H 34H)
FFFFEAH
3 byte
FEB (46H 45H 42H)
515 (35H 31H 35H)
FFFFEBH
Horizontal
"N"
ETX
parity
=
0001 0110
XOR
0000 0011
=
0001 0101
(Binary)
1
5
(Hexadecimal)
4 byte
0015 (30H 30H 31H 35H)
0021 (30H 30H 32H 31H)
00000015H
4 byte
FFEA 846H 46H 45H 41H)
5514 (35H 35H 31H 34H)
FFFFFFEAH
4 byte
FFEB (46H 46H 45H 42H)
5515 (35H 35H 31H 35H)
FFFFFFEBH
APPENDIX
A
225

Advertisement

Table of Contents

Comments to this Manuals

Symbols: 0
Latest comments: