104
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
A3100H Module designation
A+1 CMD = 0038H Command number
A+2 SportNO Socket identifier (1 to 8)
A+3 WordSize Reception data length: 1000 words
A+4 DRID Reception data storage register type code
A+5 DregNO Reception data storage register number
A+6 TimeCNT 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.)
FEDCBA9876543210
BSportNO TermSTS
B+1 Detailed information (Only valid when TermSTS = 0BH.)
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
SportNO: Socket identifier (1 to 8)
TermSTS:See tables 4.3 and 4.4.
Detail information: See table 4.5.
Reception data storage
register area
Start of the specified
register area