Data Examples Of Packet Elements - Mitsubishi Electric MELSEC iQ-R Series User Manual

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

Advertisement

Data examples of packet elements

This section explains the processing procedures and practical data examples of elements that can be placed in a packet.
Length
■Processing procedure
C24 processes length according to the following procedure.
C24
Data transmission
Byte swap
Data reception
(by word)
*Only when the data length
specification is 4 bytes
■Data example
The following is an example in the case where the calculated value of length is 258 bytes in decimal (258 is 102H in
hexadecimal).
• Data flow is "Forward direction"
Code type
Data length
1 byte
ASCII hexadecimal
'2' (32H)
ASCII decimal
'8' (38H)
HEX
02H
*1 Values in '( )' indicate ASCII code.
• Data flow is "Reverse direction"
Code type
Data length
1 byte
ASCII hexadecimal
ASCII decimal
HEX
*1 Values in '( )' indicate ASCII code.
• Data flow is "Byte swap"
Code type
Data length
1 byte
ASCII hexadecimal
ASCII decimal
HEX
*1 Values in '( )' indicate ASCII code.
(Data flow)
Forward direction (upper byte lower → byte)
Reverse direction (lower byte upper → byte)
Swapping send data
Byte swap
(by word)
*Only when the data length
specification is 4 bytes
(Data flow)
Forward direction (upper byte lower → byte)
Reverse direction (lower byte upper → byte)
Swapping receive data
ASCII hexadecimal
ASCII decimal
*1
2 bytes
'02' (30H 32H)
'58' (35H 38H)
0102H
*1
2 bytes
'20' (32H 30H)
'85' (38H 35H)
0201H
*1
2 bytes
Appendix 5 Operation Image and Data Structure of Predefined Protocol
(Code type)
HEX
BIN → ASCII
conversion of
length value
ASCII hexadecimal
ASCII decimal
(Code type)
HEX
BIN → ASCII
conversion of
length value
3 bytes
'102' (31H 30H 32H)
'258' (32H 35H 38H)
000102H
3 bytes
'201' (32H 30H 31H)
'852' (38H 35H 32H)
020100H
3 bytes
APPENDICES APPENDIX
(Data length)
(Calculating range)
Calculated
length value
(Data length)
(Calculating range)
Received length
value
4 bytes
'0102' (30H 31H 30H 32H)
'0258' (30H 32H 35H 38H)
00000102H
4 bytes
'2010'(32H 30H 31H 30H)
'8520' (38H 35H 32H 30H)
02010000H
4 bytes
'1020' (31H 30H 32H 30H)
'2085' (32H 30H 38H 35H)
00000201H
527
A

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents