![Omron Sysmac NY512-1300 User Manual Download Page 287](http://html.mh-extra.com/html/omron/sysmac-ny512-1300/sysmac-ny512-1300_user-manual_742451287.webp)
9-29
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
3 :
// Send request
SendSocketDat:=RcvSocketDat;
SktTCPSend_instance(
Execute
:=TRUE,
Socket
:=WkSocket,
// Socket
SendDat
:=SendSocketDat[0],
// Send data
Size
:=UINT#2000);
// Send data size
IF (SktTCPSend_instance.Done=TRUE) THEN
Stage
:=INT#4;
// Normal end
ELSIF (SktTCPSend_instance.Error=TRUE) THEN
Stage
:=INT#30;
// Error end
END_IF;
4 :
// Request closing data.
SktClose_instance(
Execute
:=TRUE,
Socket
:=WkSocket);
// Socket
IF (SktClose_instance.Done=TRUE) THEN
Stage
:=INT#0;
// Normal end
ELSIF (SktClose_instance.Error=TRUE) THEN
Stage
:=INT#40;
// Error end
END_IF;
0 :
// Normal end
DoTCP
:=FALSE;
Trigger
:=FALSE;
ELSE
// Interrupted by error.
DoTCP
:=FALSE;
Trigger
:=FALSE;
END_CASE;
END_IF;
Summary of Contents for Sysmac NY512-1300
Page 459: ......