15 Ethernet
15-44
CP2E CPU Unit Software User’s Manual(W614)
z TCP Socket Services
Note W: Written by user
RW: Written by user at execution and then read for results at completion
R: Read by user for results at completion
n---: Not used.
z Socket Option
For the TCP OPEN REQUEST (ACTIVE or PASSIVE) command, specifies whether or not the keep-
alive function is to be used. When the keep-alive function is used, bit 8 is ON.
z UDP/TCP Socket No.
Specify the number of the UDP or TCP socket to open.
z Local UDP/TCP Port No.
Specify the number of the UDP or TCP port for the socket to use for communications.
• Do not specify the port being used as the FINS UDP port (default: 9600) in an open request for a
UDP socket.
• Do not specify the port being used as the FINS TCP port (default: 9600) in an open request for a
TCP (active or passive) socket.
• Do not specify auto connection UDP port number 9600 in an open request for a UDP socket.
• Do not specify auto connection TCP port number 9600 in an open request for a TCP (active or
passive) socket.
• As a rule, use port numbers 1,024 and higher.
If port number 0 is specified when for an active TCP open, the TCP port number will be automati-
cally allocated and the number of the port that was opened will be stored in the local UDP/TCP port
number in the Socket Service Parameter Area (i.e., the actual port number will be overwritten on the
value of 0 set by the user).
Parameter No. of
words
Range
(decimal values in parentheses)
Socket service
TCP
passive
open
TCP
active
open
TCP
receive
TCP
send
TCP
close
Socket option 1 Specified bit W W --- --- ---
UDP/TCP socket
No.
0001 to 0003 hexadecimal
(1 to 3)
W W W W W
Local UDP/TCP port
No.
1 0000 to FFFF hexadecimal
(0 to 65,535)
W RW --- --- ---
Remote IP address 2 00000000 to FFFFFFFF
hexadecimal
(0.0.0.0 to 255.255.255.255)
RW W --- --- ---
Remote UDP/TCP
port No.
1 0000 to FFFF hexadecimal
(0 to 65,535)
RW W --- --- ---
Number of bytes to
send/ receive
1 0000 to 04D0 hexadecimal
(0 to 1,024 bytes)
--- --- RW RW ---
Send/Receive data
address
2 Memory area address --- --- W W ---
Time out time (Unit:
100 ms)
1 0000 to FFFF hexadecimal
(0 to 65,535)
(0: No limit, 0.1 to 6,553.5 s)
W --- W --- ---
Response code 1 --- R R R R R
Parameters