7 Programming FCs (Functions) and FBs for S7 Ethernet CPs
A-206
S7-CPs for Industrial Ethernet Configuring and Commissioning
Release 01/2007
C79000-G8976-C182-07
Parameter RemarksPossible
Values
TypeDeclaratio
n
LEN OUTPUT INT On ISO
Transport and
ISO-on-TCP:
1,2...8192
Specifies the number of bytes accepted from
the Ethernet CP and entered in the data area.
Note the block type:
- S7-300
On UDP:
1,2...2048
With older versions of FC AG_RECV (up
to V3.0), the data area is always
restricted to a maximum of 240 bytes.
The current versions allow up to 8192
bytes (2048 bytes for UDP).
- S7-400
With FC AG_RECV, the data area is
restricted to a maximum of 240 bytes.
Condition Codes
The following table shows the codes formed by the DONE, ERROR and STATUS
parameters that must be evaluated by the user program.
Note
For entries coded with 8Fxx
H
in STATUS, refer to the information in the STEP 7
Standard and System Functions reference manual. The chapter describing error
evaluation with the RET_VAL output parameter contains detailed information.
To find out which SFCs are used and are relevant for error evaluation, display the
properties dialog of the FC described here in the “Calls” tab.
Table 7-3 AG_RECV / AG_LRECV Codes
NDR ERROR STATUS Meaning
1 0 0000H New data accepted.
0 0 8180H No data available yet.
0 0 8181H Job active.
0 1 8183H The configuration is missing;
The ISO transport service has not yet started on the Ethernet
CP;
The connection is not established.
0 1 8184H Illegal type specified for the RECV parameter;
System error.
0 1 8185H Destination buffer (RECV) is too short.
FC6 AG_RECV / FC60 AG_LRECV - continued