6F8C1048 37
5.5Communication FB Request Sequence
5
5.5 Communication FB Request Sequence
Messages are sent and received to and from the S3CPU and the AN712 module using
FB (communication function block) by the sequence shown in figure 5-12 and figure 5-
13.
Figure 5-12 Communication FB Request and Execution Sequence
(Message Transmission)
The FB sequence for message transmission to other stations via the AN721 module is
based on a combination of communication function block instructions USEND_T and
URCV_T, and is posted to the AN712 module via socket interface processing by the S3.
Before sending a message, the sequence begins with creating a socket using the UDP
communication open function. The socket is a unit which can be parallel-processed. Up
to 12 sockets can be created per AN712 module (or per other communication module).
When a socket has been created normally, a message to the created socket (socket
number acquired) can be requested to the ADMAP-5M station. When message
transmission is completed, the application uses URCV_T instruction to receive a
response message to the request message, and thus obtains the result of normal
completion, or failure, of the request made by the application.
To receive a response message or a management/control message, check the socket
unit information (offset 0x7F80 and up) in the AN712 module for the receive data yes/no
flag (RCV) for each socket, and issue URCV_T instruction for receive request.
Note: To access socket unit information, it is necessary, after socket opening, to refer to
the socket numbers managed by the S3 controller, which may be obtained by
issuing URCV_T instruction to acquire the AN712 module management socket
identifier (16#001).
The application can receive the services of the AN712 module message transmission
function using the communication FB as described above.
USEND_T
UDP open
Application
FB
S3 module
AN712 module
Transmission
line
EN_Socket()
URCV_T
Socket Ph-ID
acquire
UDP send request
USEND_T
EN_SendTo()
URCV_T
MMS/LLC
Request message
UDP receive
request
MMS/LLC
Response message
EN_RCVFrom()
S3 socket processing
(Message data)