2 Instruction Descriptions
2-790
NJ-series Instructions Reference Manual (W502)
The data type of Socket is structure _sSOCKET. The specifications are as follows:
* These members are not used for this instruction.
Refer to the NJ-series CPU Unit Built-in EtherNet/IP Port User’s Manual (Cat. No. W506) for details on
socket services.
• Execution of this instruction is continued until processing is completed even if the value of Execute
changes to FALSE or the execution time exceeds the task period. The value of Done changes to
TRUE when processing is completed. Use this to confirm normal completion of processing.
• Refer to Using this Section on page 2-2 for a timing chart for Execute, Done, Busy, and Error.
• This instruction can be used only for the built-in EtherNet/IP on NJ-series CPU Units.
• This instruction must be used in ST. It cannot be used in a ladder diagram.
• You can execute a maximum of 32 of the following instructions at the same time: SktUDPCreate,
SktUDPRcv, SktUDPSend, SktTCPAccept, SktTCPConnect, SktTCPRcv, SktTCPSend, SktGetTCP-
Status, SktClose, and SktClearBuf.
• An error occurs in the following cases. Error will change to TRUE.
• The value of a member of Socket is outside of the valid range.
• The socket that is specified by Socket does not exist.
• The handle specified by Socket.Handle does not exist.
Name Meaning Description Data type Valid range Unit Default
Socket Socket Socket _sSOCKET
--- --- ---
Handle Handle The handle of the socket
for which to clear the
receive buffer
UDINT Depends on
data type.
--- ---
SrcAdr* Local address Local IP address and
port number
_sSOCKET_
ADDRESS
--- --- ---
PortNo* Port number Port number UINT 1 to 65535
--- ---
IpAdr* IP address IP address or host
name. A DNS or Hosts
setting is required to use
a host name.
STRING Depends on
data type.
DstAdr* Destination
address
Destination IP address
and port number
_sSOCKET_
ADDRESS
--- --- ---
PortNo* Port number Port number UINT 1 to 65535
--- ---
IpAdr* IP address IP address or host
name. A DNS or Hosts
setting is required to use
a host name.
STRING Depends on
data type.
Related System-defined Variables
Name Meaning
Data
type
Description
_EIP_EtnOnlineSta Online BOOL Status of built-in EtherNet/IP port communications
TRUE: Can be used.
FALSE: Cannot be used.
Additional Information
Precautions for Correct Use