Programming FCs (Functions) and FBs for S7 Ethernet CPs

Parameter

Declara-

Type

Possible

 

Remarks

 

tion

 

Values

 

 

 

 

 

 

 

LEN

OUTPUT

INT

On ISO

Specifies the number of bytes accepted from

 

 

 

Transport and

the Ethernet CP and entered in the data area.

 

 

 

ISO-on-TCP:

S Note the block type:

 

 

 

1,2...8192

S7-300

 

 

 

On UDP:

 

With older versions of FC AG_RECV (up

 

 

 

 

to V3.0), the data area is always

 

 

 

1,2...2048

 

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

8180H

There are not yet any data available.

 

 

 

 

0

0

8181H

Job active.

 

 

 

 

0

1

8183H

No configuration or the ISO transport service has not yet started

 

 

 

on the Ethernet CP.

 

 

 

 

0

1

8184H

System error (the source data area is incorrect).

 

 

 

 

0

1

8185H

Destination buffer (RECV) is too short.

 

 

 

 

0

1

8186H

ID parameter invalid.

 

 

 

ID != 1,2....16 (S7-300).

 

 

 

ID != 1,2....64.(S7-400)

 

 

 

 

SIMATIC NET NCM S7 for Industrial Ethernet

165

C79000-G8976-C129–06

Page 165
Image 165
Siemens S7 appendix NDR Error Status, LEN Output INT

S7 specifications

The Siemens S7 series represents a cornerstone in the realm of programmable logic controllers (PLCs), developed by Siemens, a leading company in industrial automation. Widely used across various industries, the S7 series offers robust solutions for controlling machinery and processes, thanks to its reliable performance, flexibility, and scalable architecture.

One of the key features of Siemens S7 PLCs is the modularity of their design. Each system can be configured to meet specific application requirements due to the ability to mix various input/output modules, CPUs, and communication processors. This modular approach allows for the customization of systems to suit diverse automation tasks, providing end users with the adaptability required for modern manufacturing environments.

The S7 series encompasses several models, including the S7-1200, S7-300, and S7-1500. The S7-1200 is particularly suited for small to medium-sized applications, offering a compact design and integrated communication interfaces. In contrast, the S7-300 is designed for more extensive and complex control systems, making it ideal for large-scale industrial applications. The S7-1500 stands out with its advanced performance metrics, rich feature set, and high-speed processing capabilities, making it perfect for demanding applications that require real-time control and extensive data handling.

Siemens also emphasizes the importance of communication technologies within the S7 series. With options such as PROFINET, PROFIBUS, and EtherNet/IP, the S7 PLCs can seamlessly integrate into existing automation infrastructures, ensuring smooth data exchange between devices. The incorporation of web-based technologies and cloud connectivity further enables remote monitoring and control of systems, enhancing operational efficiency.

Another notable characteristic of Siemens S7 PLCs is the use of TIA Portal (Totally Integrated Automation Portal), an innovative software platform that simplifies the engineering process. TIA Portal allows users to program, configure, and diagnose their automation devices in a single environment, reducing setup times and improving productivity.

In conclusion, the Siemens S7 series stands out due to its modular design, range of models suitable for various applications, advanced communication technologies, and user-friendly programming software. This combination of features and characteristics makes S7 PLCs a preferred choice for industries seeking reliable and efficient automation solutions. As industrial demands continue to evolve, Siemens S7 PLCs remain at the forefront, adapting to technological advancements and setting benchmarks in the automation field.