SEND/RECEIVE Interface in the User Program
75
SIMATIC NET NCM S7 for Industrial Ethernet
C79000-G8976-C129–06
3.2 Programming the SEND/RECEIVE Interface

Principle of Job and Data Transfer

The user program triggers the transfer of the user data areas with FC calls and
monitors the transfer by evaluating the return codes of the FCs.
The following parameters are transferred when the FCs are called:
SThe number of the connection (ID)
SThe location of the user data area in the CPU
For detailed information about the call interface see Chapter 5.

Purpose of the FCs

Calling the function blocks has the following effects:
SThe user data area is transferred to the Ethernet CP or received from the
Ethernet CP.
SThe execution of the job is confirmed positively or negatively in a status
message.

Programming Connections

Program the SEND/RECEIVE interface in the user program as follows:
1. Use the following functions (FCs) for data transmission on connections:
AG_SEND/AG_LSEND for transferring the user data area to the Ethernet
CP
AG_RECV/AG_LRECV for entering data received from the Ethernet CP in
the user data area
2. Evaluate the following bits in the FCs:
for AG_SEND/AG_LSEND the parameters DONE, ERROR, STATUS
for AG_RECV/AG_LRECV the parameters NDR, ERROR, STATUS
Notice
Connection numbers (IDs) must be taken from the configuration when
programming.
To ensure correct parameter settings for the block calls, The LAD/STL/FBD editor
in STEP 7 provides you with the option of accepting all the relevant parameters
from the hardware configuration (HW Config) and from the connection
configuration. For more information, refer to Section 5.2