×
Siemens Industry Online Support
Siemens AG
Entry type: Application example, Entry ID: 21605954, Entry date: 02/13/2015
(3)
Rate

FTP communication with S7-300/400

  • Entry
  • Associated product(s)
Task The File Transfer Protocol (FTP) is one of the classic, standardized options of exchanging data with PCs or any heterogeneous computer system. This entry shows how FTP communication is realized in a SIMATIC S7-300/400 station. ...

Task
The File Transfer Protocol (FTP) is one of the classic, standardized options of exchanging data with PCs or any heterogeneous computer system. This entry shows how FTP communication is realized in a SIMATIC S7-300/400 station.

Solution
This application example introduces an example project which illustrates how to realize FTP communication with an S7-300 or S7-400 and CP x43-1 Advanced. Based on two scenarios, we show you how to handle the FTP server and FTP client functionality.

S7-300/400 as FTP server:
The S7-300/400 station is the FTP server via CP x43-1 Advanced and can either receive data from an FTP client or send data to an FTP client upon request.

S7-300/400 as FTP client:
The S7-300/400 station is FTP client via CPx43-1 Advanced and can execute the following FTP commands:

  • STORE (the client saves a file on the server)
  • RETRIEVE (the client requests a file from the server)
  • DELETE (the client deletes a file from the server)
  • APPEND (the client attaches data to a file on the server)
  • RETRIEVE_PART (the client requests parts of the data of a file from the server)

The FTP client functionality is encapsulated in a compact function block (“FTP_1500_Communication”), which performs all the necessary steps for coordinating the FTP communication for you. This function block can be easily integrated into some programs. The scenarios can be easily demonstrated via a simple user interface.

The figure below shows the pictorial schematic and the hardware combination of this example application.

 

Content of Downloads

Download

Documentation  21605954_FTP_300_DOKU_V20_en.pdf ( 3425 KB )
Code 
STEP 7 V13 example project with S7-300/400 and CP x43-1 Advanced
21605954_FTP_300_CODE_V20.zip ( 4397 KB )

Additional Information

Title

Link

FTP communication with S7-1500 Entry ID: 103550797
FTP communication with S7-1200 Entry ID: 81367009


Last Changes
V2.0 Update to the latest software and hardware version.


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
http://www.siemens.com/industrialsecurity.