Omron CS CJ1W-ETN21 Operation Manual page 172

Sysmac cs and cj series ethernet units construction of applications
Hide thumbs Also See for CS CJ1W-ETN21:
Table of Contents

Advertisement

Using Socket Services with CMND(490)
Continued from previous page.
000002
000002
000202
A20200
000002
000202
A20200
000002
000202
A20200
000003
150913
000003
000203
A20200
000003
000203
A20200
000003
000203
A20200
148
150902
150914
<>(305)
D03010
#0000
A21900
150902
=(300)
D30001
&100
150901
150914
<>(305)
D04020
#0000
A21900
150901
Note When using the above programming example, change the bit and word
addresses as necessary to avoid using the same areas used by other parts of
the user program or the CPU Bus Unit.
TCP Send
@RSET
When the TCP Send Bit (CIO 000002) turns ON, the
000102
TCP Send Error Flag (CIO 000102) is turned OFF and
the TCP Sending Flag (CIO 000202) is turned ON to
initialize processing.
@SET
000202
CMND(490)
When the TCP Sending Flag (CIO 000202) turns ON,
the status of the Port Enabled Flag (A20200) is checked
D02000
to be sure it is ON and a TCP SEND REQUEST com-
D03000
mand is sent using CMND(490).
D02000: First command word
D00020
D03000: First response word
D00020: First control data word
RSET
The TCP Sending Flag (CIO 000202) is also turned
000202
OFF.
SET
If the Port Enabled Flag (A20200) turns ON and the
000102
Sending Flag (CIO 150902) turns OFF while the TCP
Sending Flag (CIO 000202) is OFF, checks are made
and if any of the following are true, the TCP Send Error
Flag (CIO 000102) is turned ON.
The Results Storage Error Flag (CIO 150914) is ON.
The contents of the Response Storage Area set in the
command code (D03010) is not 0000 Hex (normal end).
The Network Communications Error Flag (A21900) is
ON.
RSET
000002
After the execution results have been checked, the TCP
Send Bit (CIO 000002) is turned OFF.
TCP Receive
@RSET
When the TCP Receive Bit (CIO 000003) turns ON, the
000103
TCP Receive Error Flag (CIO 000103) is turned OFF.
The contents of the reception buffer, and the status of the
TCP Data Received/Requested Flag (CIO 150913), and
@SET
the Number of Bytes Received at TCP Socket (D30001)
000203
are checked. If the data is stored in the buffer, the TCP
Receiving Flag (CIO 000203) turns ON.
When the TCP Receiving Flag (CIO 000203) turns ON,
CMND(490)
the status of the Port Enabled Flag (A20200) is checked
D04000
to be sure it is ON and a TCP RECEIVE REQUEST
D04010
command is sent using CMND(490).
D04000: First command word
D00030
D04010: First response word
D00030: First control data word
RSET
The TCP Receiving Flag (CIO 000203) is also turned
OFF.
000203
SET
If the Port Enabled Flag (A20200) turns ON and the Re-
000103
ceiving Flag (CIO 150901) turns OFF while the TCP Re-
ceiving Flag (CIO 000203) is OFF, checks are made and if
any of the following are true, the TCP Receive Error Flag
(CIO 000103) is turned ON.
The Results Storage Error Flag (CIO 150914) is ON.
The contents of the Response Storage Area set in the
command code (D04020) is not 0000 Hex (normal end).
The Network Communications Error Flag (A21900) is ON.
RSET
After the execution results have been checked, the TCP
000003
Receive Bit (CIO 000003) is turned OFF.
END(001)
Section 6-8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs cs1w-etn21Sysmac cs1w-etn21Sysmac cj1w-etn21

Table of Contents