Programming FCs (Functions) and FBs for S7 Ethernet CPs
161
SIMATIC NET NCM S7 for Industrial Ethernet
C79000-G8976-C129–06
5.3.2
FC6 AG_RECV / FC60 AG_LRECV
Meaning of the Block
The AG_RECV / AG_LRECV function receives the data transferred on a
configured connection from the Ethernet CP.
The data area specified for the receive data can be a process image area, a bit
address area or a data block area.
Error-free execution is indicated when the data could be received from the
Ethernet CP.
Note:
Unless otherwise stated, all the following information applies to both the FCs
AG_RECV and AG_LRECV.
Call
Call interface in LAD representation
LADDR
AG_RECV / AG_LRECV
ID
RECV
LEN
ERROR
STATUS
INT
WORD
ANY
INT
WORD
NDR
BOOL
BOOL
Example in STL representation
STL
Explanation
call fc 6
ID
:=
MW 40
LADDR
:=
W#16#0100
RECV
:=
P#M 0.0 BYTE 100
NDR
:=
DB 110.DBX 0.6
ERROR
:=
DB 110.DBX 0.7
STATUS
:=
DB 110.DBW 2
LEN
:=
DB 110.DBW 4
//AG_RECV/AG_LRECV block call
//Connection ID acc. to configuration
//=LADDR 256 dec. in hw configuration
//Buffer for received data
//Receive code
//Execution code
//Error code
//Status code