Toshiba T2N Network Card User Manual


 
111
6 F 3 B 0 3 6 2
e. TCP close processing example
Ladder program flowchart Error result
TCP close processing start
Socket status read/verify
Are bits B and F both 1?
(Is a connection established?)
Yes
Execute a TCP close request
(CMD = 0039H).
Hold the input of function block in the
on state until the SEND instruction
completes.
Instruction
completion
Verify the status
Normal complete?
Yes
Terminate TCP close processing
This is not necessary in processing for which
the RCLOSE and NOACK bits have
become 1.
No
The specified UDP socket is already in the
closed state.
No
An error occurred in the close processing
and the specified socket could not be
closed.
Handle the error according to the
completion and socket status.