Toshiba T2N Network Card User Manual


 
108
6 F 3 B 0 3 6 2
g. TCP reception processing example (Receive request issued first type)
Ladder program flowchart Error result
TCP reception processing start
Socket status read/verify
Are bits B and F both 1?
(Is a connection established?)
Yes
Is bit 9 set to 0?
(In the state other than RCLOSE?)
Yes
Execute a TCP receive request
(CMD = 0038H).
Hold the input of function block in the
on state until the RECV instruction
completes.
Instruction
completion
Verify the status
Did
the operation
complete before being
timed out?
Yes
Normal complete?
Yes
Terminate TCP reception processing
The processing in this section can be
performed at this stage or at the point the
instruction terminates abnormally.
No
No
A connection has not been established with
the specified TCP socket. (Open processing
is required.)
The specified TCP socket is:
Closed by the remote port
(The socket must be closed by the local
port.)
No
Text was not received within the time limit.
No
An error occurred in reception processing.
The specified socket could not receive the
data.
Handle the error according to the
completion and socket status.