6 F 3 B 0 3 6 2

e.TCP transmission processing example

Ladder program flowchart

TCP transmission processing start

Socket status read/verify

Are bits B and F both 1?

No

(Is a connection established?)

 

Yes

 

Are bits 8 and 9 both 0?

No

(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

Error result

The processing in this section can be performed at this stage or at the point the instruction terminates abnormally.

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.)

Verify the status

Normal complete?

Yes

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.

Terminate TCP transmission

processing

103

Page 104
Image 104
Toshiba T2N instruction manual TCP transmission processing example Ladder program flowchart