Communication 
 
FPΣ User's Manual 
194 
communication port from an external device, operation takes place as follows. (The "reception 
done" flag turns to FALSE after switching to RUN mode.) 
•  Incoming data is stored in the receive buffer. Start and end codes are not stored in the 
receive buffer. The storage area for the data received starts with the second word of 
the receive buffer (offset 1). Offset 0 contains the number of bytes received. The initial 
value of offset 0 is 0. 
1
 
Storage area for the number of bytes 
received 
0
1
2
n
Offset
2
1
3
4
2n 2n-1
 
2
 
Storage area for the data received 
Bold numbers indicate the order of reception. 
•  When the end code is received, the "reception done" flag turns to TRUE. Reception of 
any further data is prohibited. The "reception done" flag only turns to TRUE if an end 
code, e.g. CR, has been selected in the system registers. 
3. Processing the data in the receive buffer 
•  Verify the end of reception. 
•  Copy the data in the receive buffer to a target area defined in the program using a 
transfer instruction, e.g. F10_BKMV. 
 
NOTE
 
For details on the operation of the "reception done" flag, see page 198 
4. Preparing the system for the reception of further data 
In order to receive the next data, reset the receive buffer. This is done automatically when 
sending the next data with F159_MTRN: 
•  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. (The receive buffer is not cleared). 
•  The "reception done" flag turns to FALSE.  
To reset the receive buffer without sending further data, execute F159_MTRN with n_Number 
= 0.