Omron NJ Series User Manual page 377

Machine automation controller, cpu unit built-in ethernet/ip port
Hide thumbs Also See for NJ Series:
Table of Contents

Advertisement

3
The SktGetTCPStatus instruction is used to read the status of the TCP socket.
4
The SktTCPSend instruction is used to make a send request The data in SendSocketDat[] is
sent.
5
The SktTCPRcv instruction is executed to make a receive request. The received data is stored
in RcvSocketDat[].
6
The SktClose instruction is used to close the socket.
ST
Internal
varia-
bles
Trigger
DoTCP
Stage
RcvSocketDat
WkSocket
SendSocketDat
SktTCPConnect_in-
stance
SktClearBuf_instance
SktGetTCPStatus_in-
stance
SktTCPSend_instance
SktTCPRcv_instance
SktClose_instance
External
variable
_EIP_EtnOnlineSta
*1.
For an NX701 CPU Unit and an NX102 CPU Unit, replace the variable with _EIP1_EtnOnlineSta (Port1 On-
line) or _EIP2_EtnOnlineSta (Port2 Online), depending on the built-in EtherNet/IP port which is used.
For an NX1P2 CPU Unit, replace the variable with _EIP1_EtnOnlineSta (Port1 Online).
// Start sequence when Trigger changes to TRUE.
IF ((Trigger=TRUE) AND (DoTCP=FALSE) AND (_EIP_EtnOnlineSta=TRUE)) THEN
DoTCP
Stage
SktTCPConnect_instance(Execute:=FALSE);
SktClearBuf_instance(Execute:=FALSE);
NJ/NX-series CPU Unit Built-in EtherNet/IP Port User's Manual (W506)
Variable
Data type
BOOL
BOOL
INT
ARRAY[0..1999] OF
BYTE
_sSOCKET
ARRAY[0..1999] OF
BYTE
SktTCPConnect
SktClearBuf
SktGetTCPStatus
SktTCPSend
SktTCPRcv
SktClose
Variable
Data type
BOOL
*1
:=TRUE;
:=INT#1;
Initial value
False
False
0
[2000(16#0)]
(Handle:=0, SrcAdr:=(PortNo:=0,
IpAdr:=''), DstAdr:=(PortNo:=0,
IpAdr:=''))
[2000(16#0)]
Constant
// Initialize instance.
// Initialize instance.
9 Socket Service
Comment
Execution
condition
Processing
Status
change
Received
data
Socket
Send data
9
Comment
Online
9-23

Advertisement

Table of Contents
loading

Table of Contents