Siemens Industry Online Support
Siemens AG
Entry type: Application example, Entry ID: 109475508, Entry date: 03/07/2017

TCP File Server for S7 Controller

  • Entry
  • Associated product(s)
This application shows you how the production data of all common S7 CPUs can be stored in CSV format directly in the files of a Windows computer.

With the help of the “TCP Client” function block in the individual S7 stations, the data is prepared and sent to the PC station via the TCP protocol. The “TCP file server” PC program receives the data records from the SIMATIC stations and saves it line by line in the files.

The following figure shows the configuration and the user interface of the application.


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

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,5 MB)
 Registrierung notwendig  Project for STEP 7 V14 and TCP-File Server (4,1 MB)
 Registrierung notwendig  Archive for STEP 7 V13 SP1 (5,8 MB)

Last Changes
Improvements in Windows Application, updated to STEP 7 V14

Security information
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one element of such a concept. For more information about industrial security, please visit