6F8C1048 31
5.4Communication FB Interface
5
[Socket service command]
Three commands, that is, UDP open request (16#0031), UDP send request (16#0032),
and UDP close request, can be used. If a TCP command, usable in Ethernet
communication requests in general, is requested, the return value (-54) is sent back.
[Request commands]
(1) UDP open request
• This command opens a socket (makes it active).
• Communication protocol: UDP/IP
<Request command structure>
S-UDP Port No.: Specify a service port number of the specified socket of the local station
in the following ranges. Client: 1024 to 65534 Server: 65535
Note: The client sends a request message and receives a response message.
The server receives the request message and sends the response message.
<Socket No. or error status>
Error status details
When UDP is completed normally (DONE=ON), the Socket No. is set in STATUS. This
Socket No. implements transmission, reception, and close.
<Transmitting data: P; transmitting data word number: N>
A message transformed into a capsule as described in section 5.5 is set in the
transmitting and its word number is taken as P.
Error status No. Description of error
-15 Socket cannot be opened because of a short buffer area.
-54 Protocol unsupported
-5000 Number of sockets in use over limits
-5004 Socket No. of the ADMAP-5M module to which the request is made, or
Socket No., is not within the specified range.
-5006 Port No. duplicated
-5099 Other error (Socket response data not fully received)
15
Slot No. of requested ADMAP-5M module (AN712)
Command (16#0031)
S-UDP Port No.
0
15
Socket No. (0 to 11), error status
0