Mitsubishi Electric MELSEC FX Series User Manual page 127

Programmable logic controllers
Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FX communication
Note : ASCII/HEX conversion
When execution of the ASCII/HEX conversion is specified, the hexadecimal numeric data (0 to
F) inside the send buffers (BFMs #1001 to #1256) is converted into the ASCII code, then sent.
The received ASCII code is converted into hexadecimal numeric data (0 to F), then saved to
the receive buffers (BFMs #2001 to #2256).
At this time, the send/receive byte count indicates the number of hexadecimal data.
a ) Send format when hexadecimal data is converted into ASCII code
Example : When the send data "10AB
b15
0
0
BFM #0
1
b ) Receive format when ASCII code is converted into hexadecimal data
Example : When the receive data "10AB
S
T
A B
X
02 H 41 H 42 H 31 H 30 H 03 H
6 ) b14 (send/receive buffer data length)
The data is treated as follows in accordance with the buffer data length.
• In the case of 16 bits (b14=0)
Send/receive buffer
Upper 8 bits
Example of send buffers
S
BFM
T
#1001
X
lower
• In the case of 8 bits (b14=1)
Send/receive buffer
Ignored
Example of send buffers
S
BFM
T
#1001
X
lower
sent
Send data buffer BFM #1001
0
1
0
0
0
0
1
0
0
A
are received
E
T
1
0
X
Receive data buffer
BFM #2001
16-bit data is divided into
upper 8 bits and lower 8 bits,
Lower 8 bits
then sent and received.
BFM
BFM
BFM
#1001
#1002
#1002
upper
lower
upper
Upper 8 bits are ignored, and
lower 8 bits only are sent and
Lower 8 bits
received as valid data.
BFM
BFM
BFM
#1002
#1003
#1004
lower
lower
lower
", the header "STX" and the terminator "ETX" are
H
b0
1
0
1
0
1
1
B
Converted into ASCII
code before send
", the header "STX" and the terminator "ETX"
H
b15
0
0
0
1
0
1
1 byte
The receive byte count is "2".
E
T
X
E
T
X
FX
S
T
A B
X
02 H 41 H 42 H 31 H 30 H 03 H
The send byte count is "4".
0
0
0
1
0
1
0
1
0
A
1 byte
-232IF 10
2N
E
T
1
0
X
b0
0
1
1
B
10
10-7

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Rs-232cRs-422Rs-485

Table of Contents