6 F 3 B 0 3 6 2
7.TCP receive request (using the RECV instruction)
a.Function
If an opened TCP socket receives data, read the received data into registers on the local T2N.
If no data has been received, wait until data arrives (the wait time can be set) and then, after reception, read the received data into the local T2N registers.
Reception data size: 1000 words (fixed)
b.Transfer parameters
A | 3100H |
A+1 | CMD = 0038H |
A+2 | SportNO |
A+3 | WordSize |
A+4 | DRID |
A+5 | DregNO |
A+6 | TimeCNT |
Module designation Command number Socket identifier (1 to 8) Reception data length: 1000 words Reception data storage register type code Reception data storage register number Reception wait timeout time
Reception data length: | This parameter must be set to 1000 words. |
Reception data storage register type code: | Type code for the register that holds the received |
| data. (See Figure 5.1) |
Reception data storage register number:
Starting number of the registers that hold the received data.
Reception wait timeout time: | specified in 0.1 second units. (1 to 65535) |
| If zero is specified, the system is set to an unlimited |
| (infinite) wait state. |
c.Status (See figure 4.3 for details on bits C, D, E and F.)
B B+1
F E D C B A 9 8 7 6 5 4 3 2 1 0
|
|
|
| SportNO | TermSTS |
Detailed information (Only valid when TermSTS = 0BH.)
SportNO: Socket identifier (1 to 8)
TermSTS: See tables 4.3 and 4.4.
Detail information: See table 4.5.
d.Methods for storing reception data
∙Applications must allocate a reception data storage area of 1001 words. The reception data count and the reception data (the data received by the object socket at the point the receive request was issued) will be stored in this area as shown below.
Reception data count (bytes)
Reception data
←Start of the specified register area
Reception data storage register area
⎯ 104 ⎯