Siemens Industry Online Support
Siemens AG
Entry type: Application example Entry ID: 109475508, Entry date: 09/28/2018

TCP-Fileserver for S7 Controller

  • Entry
  • Associated product(s)
If you want to store and process only few, essential PLC data on PCs, then you will get with this example a convenient alternative. This application shows you how the production data of all common S7 CPUs can be stored directly in the files of a Windows computer.

This application shows a convenient alternative to complex SCADA systems in the lower performance range. The application example consists of the following components:

  •  the STEP 7 blocks "TcpClient" in the individual S7 stations, which prepare the data and send it to the PC station.
  •  The "TCP-Fileserver" PC program receives the data from the SIMATIC stations and saves them line by line in the files.

The solution was realized for S7-300, S7-1200 and S7-1500 CPUs.

The following figure shows the configuration of the application.

Image 01

 The user interface is designed as the following:

Image 02

This example offers you the following advantages:

  • Economic alternative for small applications
  • Easy configuration
  • Individual expandability by open source code
  • Transferring and saving of the data in any formats (CSV, XML, binary etc.), since the formatting is performed in the program of the S7 controller.

Documentation und example project 
  Documentation (1,4 MB)
 Registrierung notwendig  Project for TIA Portal (V15) and TCP-Fileserver (1,2 MB)

In the project folder, you also find the SCL-Source for the block "TcpClient". If you use another TIA-Version, you can import the source into your project.

Last Changes
Revision complete.

Security information
In order to protect technical infrastructures, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art IT security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about cyber security, please visit
Rate entry
no rating
Requests and feedback
What do you want to do?
Note: The feedback always relates to the current entry / product. Your message will be forwarded to our technical editors working in the Online Support. In a few days, you will receive a response if your feedback requires one. If we have no further questions, you will not hear from us.