Omron sysmac NX102-9 Series Owner's Manual page 348

Machine automation controller, cpu unit built-in ethernet/iptm port
Table of Contents

Advertisement

9 Socket Service
TCP Communications Procedure
You execute socket communications instructions in sequence to perform TCP communications for the
built-in EtherNet/IP port.
SktTCPConnect Instruction
• Execution of the Socket Function
Connect()
The connection is established by
the normal completion of the
SktTCPConnect instruction.
SktSetOption Instruction
• Execution of the Socket Function
setsoketopt()
The option for TCP socket is set
by the normal completion of the
SktSetOption instruction. (Note)
SktTCPSend Instruction
• Execution of the Socket Function
Send()
The data is stored in the send
buffer by the normal completion of
the SktTCPSend instruction.
SktClose Instruction
• Execution of the Socket Function
Close()
The acknowledgment (ACK) of
FIN from the remote node is
received by the normal comple-
tion of the SktClose instruction.
However, RST (not FIN) is sent if
the Linger Option is specified.
Note Set the socket option as required. Refer to the NJ/NX-series Instructions Reference Manual
(Cat. No. W502) for the socket option.
9-4
Client
Socket
Connect
SYN
SYN ACK
Instruction
completed.
ACK
Setopt
Send
Instruction
completed.
ACK
Close
FIN
ACK
Instruction
completed.
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User's Manual (W506)
Server
Socket
Bind
SktTCPAccept Instruction
Listen
• Execution of Socket Functions
Socket(), Bind(), Listen(), and
Accept
Accept()
• Timeout monitoring until Connect is
completed
The connection is established by the
normal completion of the SktTCPAc-
cept instruction.
Instruction
completed.
SktSetOption Instruction
• Execution of the Socket Function
Setopt
setsoketopt()
The option for TCP socket is set
by the normal completion of the
SktSetOption instruction. (Note)
SktTCPRcv Instruction
Recv
• Execution of Socket Function Recv()
• Timeout monitoring until data is
received from the remote node
Writing the received data to the variable
is completed by the normal completion
of the SktTCPRcv instruction.
Socket interface
Packets sent by the TCP/IP layer
Packets sent by higher layers

Advertisement

Table of Contents
loading

Table of Contents