6 F 3 B 0 3 6 2
e. TCP close processing example
Ladder program flowchart
TCP close processing start
Socket status read/verify
Are bits B and F both 1? | No |
(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
Error result
This is not necessary in processing for which the RCLOSE and NOACK bits have become 1.
The specified UDP socket is already in the closed state.
Verify the status
Normal complete?
Yes
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.
Terminate TCP close processing
⎯ 111 ⎯