Omron CJ1W-ETN21 Network Card User Manual


 
138
Using Socket Services with CMND(490) Section 6-8
6-8-3 Basic FINS Command Format
The basic format for FINS commands used for socket services is shown in the
following diagram.
Command Code:
Specifies the process code requested from the socket.
Socket Option
For the TCP OPEN REQUEST (ACTIVE or PASSIVE) command, specifies
whether or not the keep-alive function is to be used.
Socket Number
Specifies the socket number for the process, between 1 and 8.
Results Storage Area
Specifies the area to store the results of the requested process.
Parameters
Specifies the parameters defined for the command code.
An error occurred. The Ethernet
Unit did not receive the UDP
OPEN REQUEST command.
Check socket status.
Start UDP Open
OFF?
ON/OFF
The specified UDP socket is
already open.
Program Flow
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.)
YES
Error Evaluation
Check the Port Enabled Flag.
Check response.
Check Opening Flag status.
Check results storage area response code.
ON?
The specified port is running
network communications.
Is the Port Enabled Flag in A502 for communica-
tions port ON?
YES
Use the CMND(490) to send the UDP OPEN RE-
QUEST command (2701) to the Ethernet Unit.
Is the response code = 0000 (normal) for the
UDP OPEN REQUEST command?
Wait until bit 00 in the socket status turns OFF
(open complete).
Is response code = 0000?
0000?
YES
0000?
YES
UDP opened
(Socket status bit 00)
An error occurred. The specified
socket could not be opened.
NO
NO
NO
NO
Execute FINS command (via CMND(490)) for Ethernet Unit.
0123456789101112
Command
code
Socket option
Socket number
Results storage area Parameters
Byte order from the
beginning of the frame