Omron V460-H Series Connection Manual page 30

Industrial handheld dpm reader
Hide thumbs Also See for V460-H Series:
Table of Contents

Advertisement

9.1.2.
TCP Socket Communications Using Socket Service Instructions
This section provides an overview of function blocks for TCP socket services (hereinafter
referred to as "socket service instructions") and the general movement of send and receive
messages.
Note
For details, refer to EtherNet/IP Communications Instructions in Section 2 Instruction
Descriptions of the Machine Automation Controller NJ/NX-series Instructions Reference
Manual (Cat. No. W502).
● TCP Socket Services Using Socket Service Instructions
This project file uses the following five standard instructions to implement socket
communications.
Name
TCP Socket
Connect
TCP Socket
Send
TCP Socket
Receive
TCP/UDP Socket
Close
Get TCP Socket
Status
* The Socket obtained by the Connect TCP Socket instruction (SktTCPConnect:
SktTCPConnect_instance) is used as an input parameter for other socket service
instructions. The specifications of the data type structure _sSOCKET of Socket are as
follows.
Variable
Name
Socket
Socket
Handle
Handle
SrcAdr
Source
Address
PortNo
Port No.
IpAdr
IP Address
DstAdr
Destination
Address
PortNo
Port No.
IpAdr
IP Address
*1: "Address" refers to an IP address and a port number.
*2: DNS or Hosts settings are required to use a host name.
Function block
Description
SktTCPConnect
Connects to a TCP port on the code reader by
active open.
SktTCPSend
Sends data from the specified TCP socket.
SktTCPRcv
Reads data received from the specified TCP
socket.
SktClose
Closes the specified TCP socket.
SktGetTCPStatus
Reads the status of the specified TCP socket.
The project file uses this instruction to check the
completion of receiving in receive processing
and to check the closed status in close
processing.
Description
Socket
Handle for
sending/receiving data
Local node address
Port number
IP address or host name
Remote node address
Port number
IP address or host name
Data type
Valid range
_sSOCKET
---
UDINT
Depends on
data type.
*1
_sSOCKET_
---
ADDRESS
UINT
0 to 65535
*2
STRING
Depends on
data type.
*1
_sSOCKET_
---
ADDRESS
UINT
1 to 65535
STRING
Depends on
*2
data type.
9. Project File
Initial
value
---
---
---
---
27

Advertisement

Table of Contents
loading

Table of Contents