![Omron Sysmac NY512-1300 Скачать руководство пользователя страница 285](http://html.mh-extra.com/html/omron/sysmac-ny512-1300/sysmac-ny512-1300_user-manual_742451285.webp)
9-27
9 Socket Service
NY-series Industrial Panel PC / Industrial Box PC Built-in EtherNet/IP Port User’s Manual (W563)
9-
6 Det
ails on
Usin
g t
h
e Soc
ket Services
9
9-6-
5 TC
P S
a
mple Pr
ogramming
0 :
// Normal end
DoTCP
:=FALSE;
Trigger
:=FALSE;
ELSE
// Interrupted by error.
DoTCP
:=FALSE;
Trigger
:=FALSE;
END_CASE;
END_IF;
Remote Node Programming
In this example, programming is also required in the remote node. The order of sending and receiv-
ing is reversed in comparison with the above procedure.
1
The SktTCPAccept instruction is executed to request accepting a TCP socket.
2
The SktTCPRcv instruction is executed to request receiving data. The receive data is stored in
RcvSocketDat[]
.
3
The SktTCPSend instruction is executed to request sending data. The data in
SendSocketDat[]
is sent.
4
The SktClose instruction is executed to close the socket.
ST
*1 Replace the variable name with
_EIP1_EtnOnlineSta
(Port1 Online) or
_EIPIn1_EtnOnlineSta
(Internal Port1
Online), depending on which communications port you use.
Internal
Variables
Variable
Data type
Initial value
Comment
Trigger
BOOL
False
Execution condi-
tion
DoTCP
BOOL
False
Processing
Stage
INT
0
Status change
RcvSocketDat
ARRAY[0..1999] OF
BYTE
[2000(16#0)]
Receive data
WkSocket
_sSOCKET
(Handle:=0,
SrcAdr:=(PortNo:=0,IpAdr:=’’),
DstAdr:=(PortNo:=0,IpAdr:=’’))
Socket
SendSocketDat
ARRAY[0..1999] OF
BYTE
[2000(16#0)]
Send data
SktTCPAccept_instance
SktTCPAccept
SktTCPSend_instance
SktTCPSend
SktTCPRcv_instance
SktTCPRcv
SktClose_instance
SktClose
External
Variables
Variable
Data type
Constant
Comment
_EIP_EtnOnlineSta
*1
BOOL
Online
Содержание Sysmac NY512-1300
Страница 290: ...9 Socket Service 9 32 NY series Industrial Panel PC Industrial Box PC Built in EtherNet IP Port User s Manual W563 ...
Страница 310: ...10 FTP Server 10 20 NY series Industrial Panel PC Industrial Box PC Built in EtherNet IP Port User s Manual W563 ...
Страница 324: ...11 FTP Client 11 14 NY series Industrial Panel PC Industrial Box PC Built in EtherNet IP Port User s Manual W563 ...
Страница 452: ...Appendices A 66 NY series Industrial Panel PC Industrial Box PC Built in EtherNet IP Port User s Manual W563 ...
Страница 453: ...Index 1 NY series Industrial Panel PC Industrial Box PC Built in EtherNet IP Port User s Manual W563 I Index ...
Страница 459: ......