7 Programming FCs (Functions) and FBs for S7 Ethernet CPs
A-193
S7-CPs for Industrial Ethernet Configuring and Commissioning
Release 01/2007
C79000-G8976-C182-07
7.3.1 FC5 AG_SEND / FC50 AG_LSEND
Meaning of the Block
The FCs AG_SEND / AG_LSEND pass data to the Ethernet CP for transfer over a
configured connection.
The selected data area can be a memory bit area or a data block area.
Error-free execution of the function is indicated when the entire user data area
could be sent over Ethernet.
The way in which the FC functions depends on the CP type you are using. Please
note the differences in the following section.
Note:
Unless otherwise stated, all the following information applies to both the FCs
AG_SEND and AG_LSEND.
Call
Call interface in FBD representation
ACT
LADDR
DONE
AG_SEND / AG_LSEND
ID
SEND
LEN
ERROR
STATUS
BOOL
INT
WORD
ANY
INT
WORD
BOOL
BOOL
Example in STL representation
STL Explanation
call fc 5
ACT := M 10.0
ID := MW 12
LADDR := W#16#0100
SEND := P#db99.dbx10.0 byte 240
LEN := MW 14
DONE := M 10.1
ERROR := M 10.2
STATUS := MW 16
//AG_SEND / AG_LSEND block call
//Job triggered by memory bit
//Connection ID acc. to configuration
//=LADDR 256 dec. in hw configuration
//Buffer with send data
//Length for send data
//Execution code
//Error code
//Status code