Programming FCs (Functions) and FBs for S7 Ethernet CPs
165
SIMATIC NET NCM S7 for Industrial Ethernet
C79000-G8976-C129–06
Parameter RemarksPossible
Values
TypeDeclara-
tion
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.
SNote 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 8FxxH 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 5-3 AG_RECV / AG_LRECV Codes
NDR ERROR STATUS Meaning
1 0 0000 H New data accepted.
0 0 8180HThere are not yet any data available.
0 0 8181HJob active.
0 1 8183HNo configuration or the ISO transport service has not yet started
on the Ethernet CP.
0 1 8184HSystem error (the source data area is incorrect).
0 1 8185HDestination buffer (RECV) is too short.
0 1 8186HID parameter invalid.
ID != 1,2....16 (S7-300).
ID != 1,2....64.(S7-400)