Socket Services And Socket Status - Omron CJ1W-ETN11 Operation Manual

Sysmac cs/cj series ethernet units
Hide thumbs Also See for CJ1W-ETN11:
Table of Contents

Advertisement

Using Socket Services with CMND(490)
6-3-2

Socket Services and Socket Status

Program Flow
Check socket status.
Is Bit 15 (Open Flag) in the socket status word for
the socket being used OFF?
(Checks to see if the socket is open before com-
munications and close processing.)
Check the Port Enabled Flag.
Is the Port Enabled Flag in A502 for communica-
tions port ON?
Execute FINS command (via CMND(490)) for Ethernet Unit.
Use the CMND(490) to send the UDP OPEN RE-
QUEST command (2701) to the Ethernet Unit.
Check response.
Is the response code = 0000 (normal) for the
UDP OPEN REQUEST command?
Check Opening Flag status.
Wait until bit 00 in the socket status turns OFF
(open complete).
Check results storage area response code.
Is response code = 0000?
When using socket services, it is important to consider the timing of the status
changes in the socket status area. The diagram below shows a program flow-
chart for opening UDP.
Program flow is similar for other socket services. Replace the names of the
appropriate flags in the flowchart to adapt it to other socket services.
Start UDP Open
YES
YES
YES
YES
UDP opened
OFF?
The specified UDP socket is
NO
already open.
ON?
The specified port is running
NO
network communications.
An error occurred. The Ethernet
0000?
Unit did not receive the UDP
NO
OPEN REQUEST command.
(Socket status bit 00)
ON/OFF
An error occurred. The specified
0000?
socket could not be opened.
NO
Section 6-3
Error Evaluation
143

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cs1w-etn11Cs/cj seriesCs1w-etn01W343-e1-07

Table of Contents