beautypg.com

2 socket communications flow, Tcp „ udp – Yaskawa MP920 Communications Module User Manual

Page 181

background image

7.7 Connection with Devices Manufactured by Other Companies

7-35

7

7.7.2

Socket Communications Flow

The following diagram shows the logical programming flow using a socket interface.

„

TCP

„

UDP

Note: With the 218IF Module, the sequence in the Master is automatically performed

by the MSG-SND system function, and the sequence in the Slave is automatically
performed by the MSG-RCV system function.

socket

bind

Socket created

Socket created

Connected

IP address and port
No.allocation

IP address and port
No.allocation

connect

Connected

send

Data sending

recv

Data receiving

close

Disconnected

Start

socket

bind

accept

Connection preparations

recv

send

close

Disconnected

Start

listen

Data sending

Data receiving

Connection established

Connection closed

Master

Slave

socket

bind

send to

rev from

Data sending

Data receiving

Data receiving

close

Disconnected

Start

socket

bind

Socket created

Socket created

IP address and port
No. allocation

IP address and port
No. allocation

send to

close

Disconnected

Start

rev from

Data sending

Master

Slve

Connection closed