7.6.5.2 Start Code: STX; End Code: ETX
Receiving data:
1
C
A
B
2
3
A
A
A
B
B
4
C
5
<1>
<2>
<3>
1
Data received from external device
2
"Reception done" flag
3
F159_MTRN execution
When receiving data, operation is as follows:
1. Characters A, B, and C received from the external device are stored in the receive
buffer.
2. The start code "STX" resets the receive buffer.
3. Characters D and E received from the external device are stored in the receive buffer.
4. When the end code is received, the "reception done" flag turns to TRUE. Reception of
any further data is prohibited. (Character F is not stored.)
5. When F159_MTRN is executed:
- The number of bytes received is set to 0 in offset 0 of the receive buffer.
- The "reception done" flag turns to FALSE.
- The number of bytes received is set to 0 in offset 0 of the receive buffer.
(Character G is stored.)
6. The start code "STX" resets the receive buffer. (Character H is stored.)
D
E
ETX
STX
A
D
D
D
B
B
E
E
C
C
C
C
<0>
<1>
<2>
<2>
:
4
Receive buffer
5
Number of bytes received
6
Write pointer
F
G
STX
D
G
E
E
C
C
<0>
<1>
<0>
6
Communication
H
ETX
TRUE
FALSE
TRUE
FALSE
G
H
H
E
E
E
C
C
C
<1>
<1>
141