Toshiba T2N Network Card User Manual


 
103
6 F 3 B 0 3 6 2
e. TCP transmission processing example
Ladder program flowchart Error result
TCP transmission processing start
Socket status read/verify
Are bits B and F both 1?
(Is a connection established?)
Yes
Are bits 8 and 9 both 0?
(In neither the RCLOSE nor NOACK
state?)
Yes
Execute a TCP send request
(CMD = 0037H).
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 transmission
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 either:
Closed by the remote port, or
Not responding.
(The socket must be closed by the local
port.)
No
An error occurred in transmission
processing.
Transmission from the specified socket is
not possible.
Handle the error according to the
completion and socket status.