Toshiba T2N Network Card User Manual


 
99
6 F 3 B 0 3 6 2
e. TCP open processing example
Ladder program flowchart Error result
TCP open processing start
Socket status read/verify
Are bits C and D both 0?
(Closed state?)
Yes
Execute a TCP open request
(CMD = 0035H).
Active or passive
open
Hold the input of function block in the
on state until the SEND instruction
completes.
Instruction
completion
Verify the status
Did
the operation
complete before being
timed out?
Yes
Normal complete?
Yes
Terminate TCP open processing
(Connection established)
No
The specified socket is already open
(active or passive).
No
Connection could not be established within
the time limit.
No
An error occurred during open processing
and the connection could not be
established.
Handle the error according to the
completion and socket status.