6 F 3 B 0 3 6 2

e.TCP open processing example

Ladder program flowchart

TCP open processing start

Socket status read/verify

Are bits C and D both 0?

No

(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 operationNo complete before being

Error result

The specified socket is already open (active or passive).

Connection could not be established within the time limit.

timed out?

Yes

Normal complete?

Yes

No

An error occurred during open processing and the connection could not be established.

Handle the error according to the completion and socket status.

Terminate TCP open processing

(Connection established)

99

Page 100
Image 100
Toshiba T2N instruction manual TCP open processing example Ladder program flowchart, Error result