125
CHAPTER 12 COMMUNICATIONS USING A FIXED BUFFER
12
12.4 Data Receiving Procedure
12.4.1 Data receiving using the main program (BUFRCV instruction)
12.4 Data Receiving Procedure
This section describes how an E71 receives data from the connected device. The following methods for receiving data
are offered:
• Data receiving using the main program (BUFRCV instruction)
• Data receiving using an interrupt program (BUFRCVS instruction)
12.4.1 Data receiving using the main program (BUFRCV instruction)
A receive process in the main program is performed using the BUFRCV instruction.
(1) Procedure exists
The following is the data receive process performed in the fixed buffer number 1 area for the connection number
1.
Confirm the normal completion of the initial process. (Initial normal completion signal (X19): ON)
Establish a connection between the E71 and the connected device and confirm the normal completion of the
open process of the connection number 1.
Receive data from the destination.
• Fixed buffer reception status signal (address: 5005
H
(b0)): ON
Execute the BUFRCV instruction to read the receive data length and receive data from the fixed buffer
number 1.
• Fixed buffer reception status signal (address: 5005
H
(b0)): OFF
When the receive data length and the receive data are completely read out, a response is sent to the
destination.
End the receive process. If the data receive process is abnormally ended, execute the BUFRCV instruction
again to repeat the receive process.
1
2
3
5
4
6
Initial process Receiving data
1 scan
ACK
(TCP only)
ACK
(TCP only)
Initial normal completion
signal X19
Open completion signal
(address: 5000
H
[b0])
BUFRCV instruction
BUFRCV instruction
completion device
BUFRCV instruction
completion device + 1
Sending a response
Fixed buffer reception status signal
(Address: 5005
H
[b0])
Open process
Response
Receiving data