Communication
FPΣ User's Manual
202
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.)
7. F159_MTRN is executed at the same time the end code is received from the external
device. F159_MTRN turns the "reception done" flag to FALSE. Therefore, this flag will
not be detected.
NOTE
• Resetting the receive buffer sets the number of bytes received in offset 0 to
0 and moves the write pointer back to offset 1. Subsequent data will be
stored in the receive buffer starting at offset 1.
• If two start codes are received from the external device, data following the
second start code overwrites the data in the receive buffer.
Sending data:
b
a
b
a
<2> <1> <2> <1> <0>
b
a
<0>
b
a
<0>
d
e
c
<3>
STX
ETX
ETX STX
a
b
c d e
<0>
d
e
c
d
e
c
d
e
c
d
e
c
1
2
3
4
5
TRUE
FALSE
TRUE
FALSE
6
1
Data to be sent
4
Send buffer
2
"Transmission done" flag
5
Number of bytes to be sent
3
F159_MTRN execution
6
Write pointer