FTP Data Exchange Between FTP Server And SIMATIC S7-1200

2y ago
1.55 MB
25 Pages
Last View : 5d ago
Last Download : 1y ago
Upload by : Maxine Vice

FTP Data Exchangebetween FTP Serverand SIMATIC S7-1200/ S7-1500SIMATIC S7-1200, SIMATIC S7-1500, FTP n/view/81367009SiemensIndustryOnlineSupport

Legal informationLegal informationUse of application examplesApplication examples illustrate the solution of automation tasks through an interaction of severalcomponents in the form of text, graphics and/or software modules. The application examples area free service by Siemens AG and/or a subsidiary of Siemens AG ("Siemens"). They are nonbinding and make no claim to completeness or functionality regarding configuration andequipment. The application examples merely offer help with typical tasks; they do not constitutecustomer-specific solutions. You yourself are responsible for the proper and safe operation of theproducts in accordance with applicable regulations and must also check the function of therespective application example and customize it for your system.Siemens grants you the non-exclusive, non-sublicensable and non-transferable right to have theapplication examples used by technically trained personnel. Any change to the applicationexamples is your responsibility. Sharing the application examples with third parties or copying theapplication examples or excerpts thereof is permitted only in combination with your own products.The application examples are not required to undergo the customary tests and quality inspectionsof a chargeable product; they may have functional and performance defects as well as errors. It isyour responsibility to use them in such a manner that any malfunctions that may occur do notresult in property damage or injury to persons. Siemens AG 2018 All rights reservedDisclaimer of liabilitySiemens shall not assume any liability, for any legal reason whatsoever, including, withoutlimitation, liability for the usability, availability, completeness and freedom from defects of theapplication examples as well as for related information, configuration and performance data andany damage caused thereby. This shall not apply in cases of mandatory liability, for exampleunder the German Product Liability Act, or in cases of intent, gross negligence, or culpable loss oflife, bodily injury or damage to health, non-compliance with a guarantee, fraudulent nondisclosure of a defect, or culpable breach of material contractual obligations. Claims for damagesarising from a breach of material contractual obligations shall however be limited to theforeseeable damage typical of the type of agreement, unless liability arises from intent or grossnegligence or is based on loss of life, bodily injury or damage to health. The foregoing provisionsdo not imply any change in the burden of proof to your detriment. You shall indemnify Siemensagainst existing or future claims of third parties in this connection except where Siemens ismandatorily liable.By using the application examples you acknowledge that Siemens cannot be held liable for anydamage beyond the liability provisions described.Other informationSiemens reserves the right to make changes to the application examples at any time withoutnotice. In case of discrepancies between the suggestions in the application examples and otherSiemens publications such as catalogs, the content of the other documentation shall haveprecedence.The Siemens terms of use (https://support.industry.siemens.com) shall also apply.Security informationSiemens provides products and solutions with industrial security functions that support the secureoperation of plants, systems, machines and networks.In order to protect plants, systems, machines and networks against cyber threats, it is necessaryto implement – and continuously maintain – a holistic, state-of-the-art industrial security concept.Siemens' products and solutions constitute one element of such a concept.Customers are responsible for preventing unauthorized access to their plants, systems, machinesand networks. Such systems, machines and components should only be connected to anenterprise network or the internet if and to the extent such a connection is necessary and onlywhen appropriate security measures (e.g. firewalls and/or network segmentation) are in place.For additional information on industrial security measures that may be implemented, please emens' products and solutions undergo continuous development to make them more secure.Siemens strongly recommends that product updates are applied as soon as they are availableand that the latest product versions are used. Use of product versions that are no longersupported, and failure to apply the latest updates may increase customer's exposure to cyberthreats.To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feedat: http://www.siemens.com/industrialsecurity.FTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/20182

Table of ContentsTable of ContentsLegal information . 21Introduction . ."Ftp1X00Cmd" interface description . 9Configuring the FTP server . 11Integration into the user project . 14Using "Ftp1X00Cmd" . 17Error handling of "Ftp1X00Cmd" . 19Valuable Information . 213.13.24Overview. 4How the function block works . 6Components used . 8Basics . 21Alternative solutions . 23Appendix . 24Service and Support . 24Links and literature . 25Change documentation . 25 Siemens AG 2018 All rights reserved4.14.24.3FTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/20183

1 Introduction1Introduction1.1OverviewInitial situationThe widely used File Transfer Protocol (FTP) provides you with the option to storedata on server systems. FTP supports almost all server and operating systems.Via special communications processors (CPs), all controllers of the S7-300, S7-400and S7-1500 product families support FTP communication.This application example shows you how, based on open user communication(TCON, TSEND, TRCV and TDISCON), even an S7-1200 or S7-1500 can use FTPcommunication without a special CP with certain FTP servers.NoteThe function of this application example can only be guaranteed with the FTPservers tested (Configuring the FTP server chapter).Overview of the application example Siemens AG 2018 All rights reservedThe following figure provides an overview of the automation example.Figure 1-1Integrating the S7-1200 / S7-1500into the existing FTP environmentFTP serverFTPPROFINET IE S7-1500S7-300 withCP 343-1S7-400 withCP 443-1Standard solutionFTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/2018S7-1500 withCP 1543-1S7-1200ET 200SPCPUSolution without CP4

1 IntroductionDescriptionIn many projects and plants, it is necessary to exchange process data betweencontrollers and servers or PCs so that the data produced there can also be usedoutside the control level. This is made possible by standardized protocols. FTP is asimple protocol that operates on the client-server principle and fulfills this task.Until now, users who used an S7-300, S7-400 or S7-1500 could exchange processdata only with a CP via FTP using an FTP server. This application exampleintegrates the S7-1200 and S7-1500 into the existing FTP environment without acommunications processor.AdvantagesThe solution presented here offers the following advantages:Simple and easy to understand FTP communication with an S7-1200 orS7-1500 via the "Ftp1X00Cmd" block. The command set of the block corresponds to that of FTP communication viaS7-300, S7-400 or S7-1500 controllers with a CP.The FTP function block supplied with this application example exclusivelyperforms FTP client functions.Note Siemens AG 2018 All rights reserved Comparison of the most important FTP features in the SIMATIC S7 environmentThe following table lists the different options for using FTP in the SIMATIC S7environment.Table 1-1FTP featureS7-300 or S7-400(CP 343-1 / 443-1)S7-1500(CP 1543-1)S7-1200 and S7-1500("Ftp1X00Cmd" FB) (CP 343-1 / 443-1)(CP 1543-1) 10/20324 With a special CPFTP serverNumber ofsimultaneous clientconnectionsActive FTPPassive FTPFTPSFull S7 FTP commandsetFTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/20185

1 Introduction1.2How the function block worksFigure showing how the "Ftp1X00Cmd" block worksThe following figure shows how the "Ftp1X00Cmd" function block works, itsstructure and states.Figure 1-21Datainput2Connect3EstablishconnectionControl on9NotConnected10Done11Terminateconnection17 Siemens AG 2018 All rights reservedError;7error status4Userauthentication5Send nnectionfaultyConnected 6Data connectionfaultyfaultyError;error statusfaultyDatatransferFTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/2018166

1 IntroductionDescription of the itemsThe following table describes the different items of Figure 1-2.Table 1-2 Siemens AG 2018 All rights reservedNo.ActionDescription1.Store connection data inDB.The following connection data is specified by theuser:Server IP address; hardware ID of the interface used;username; password; file name; FTP mode; FTPcommand; FTP data; connection ID of controlconnection (ID and ID 1 are required for each"Ftp1X00Cmd").2.Select connect.The user initiates the control connection.3.Establish controlconnection.The control connection (port 21) to the FTP server isbeing established.4.User authentication.The FTP client logs in with the user data specified bythe user (username, password).5.Send types to server.The type of the file to be transferred is sent to theFTP server.6.Connected set.The control connection is now ready. FTP jobs cannow be run (no. 12) until the control connection isclosed.7.Error set; output errorstatus.An error occurred while processing. The error-specificstatus is output (see Chapter 2.5)8.Reset connect.The user initiates 'disconnect control connection'.9.Disconnect controlconnection.The control connection (port 21) to the FTP server isbeing disconnected.10.Connected reset.The control connection has been disconnected.11.Done set.Connection establishment or triggered job has beenexecuted.12.Select execute.The user initiates 'run FTP job'.13.Send mode to server.The mode selected by the user (active, passive) issent to the FTP server.14.Send FTP command toserver.The FTP command selected by the user is sent to theFTP server.The following commands are available:STORE (save data)APPEND (attach data)RETRIEVE (fetch data)DELETE (delete file)15.Establish data connection.The data connection (active FTP: port 20) to the FTPserver is being established.16.Data transfer from or tothe server.Either storage of data on the FTP server or theassigned area on the controller (FTP client).17.Disconnect dataconnection.The data connection (active FTP: port 20) to the FTPserver is being disconnected.FTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/20187

1 Introduction1.3Components usedHardware components for data exchange with the S7-1200The following table shows the components used for the application example for thesolution with the S7-1200 and S7-1500.Table 1-3ComponentNo.Article no.NoteSIMATIC S7-1200CPU 1214C DC/DC/DC16ES7 214-1AG310XB0Alternatively, any otherSIMATIC S7-1200 withfirmware V4.2 or highercan be used.SIMATIC S7-1500CPU 1513-1 PN16ES7 513-1AL01-0AB0Alternatively, any otherSIMATIC S7-1500 orET 200SP CPU withfirmware V2.0 or highercan be used.Software components Siemens AG 2018 All rights reservedThe following table shows the software components used for the applicationexample.Table 1-4ComponentNo.Article numberNoteSTEP 7PROFESSIONAL V1516ES7 822-1AA05-0YA5Alternatively, a smallerpackage can be used.FileZilla ServerV0.9.601Freeware (GPL)For the FileZilla Serverdownload link, seeChapter 4.2: \4\Project and documentationThis application example consists of the following components:Table 1-5ComponentFile nameProject81367009 FTP S71X00 PROJ V3 4.zipDocumentation81367009 FTP S71X00 DOKU V3 4 en.pdfFTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/2018NoteThis zip file contains the STEP 7project of the sample project for theS7-1500 and S7-1200.This document.8

2 Engineering2Engineering2.1"Ftp1X00Cmd" interface descriptionFunctional descriptionThe "Ftp1X00Cmd" FTP function block emulates FTP based on open usercommunication. It can execute the following FTP commands: CONNECT (connect and log in) DISCONNECT (disconnect and log out) STORE (save data) APPEND (attach data) RETRIEVE (fetch data) DELETE (delete file)Block interfaceThe following figure shows the interfaces of the "Ftp1X00Cmd" function block.Figure 2-1: Ftp1X00Cmd Siemens AG 2018 All rights reservedFtp1X00CmdBoolconnectConnection connectionDataTCON IP v4VariantTCON IP v4The following table describes the interfaces of the "Ftp1X00Cmd" function block.Table 2-1: Parameters of Ftp1X00CmdNameP typeData typeCommentconnectINBoolTRUE establish control connection to FTPserverFALSE disconnect control connectionexecuteINBoolFTP job trigger at positive edgeconnectionIdINWordFreely selectable connection ID of the TCPconnections.NOTICE: ID and ID 1 are reserved. Theseare unique throughout the project.ftpActiveModeINBoolFALSE passive FTP modeTRUE active FTP modeftpCmdINInt2 STORE, 3 RETRIEVE, 4 DELETE,FTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/20189

2 EngineeringNameP typeData typeComment6 APPEND Siemens AG 2018 All rights reservedNoteusernameINStringUsername of an FTP server userpasswordINStringPassword of the FTP server userfilenameINStringFile name for FTP communicationconnectedOUTBoolTRUE control connection connectedFALSE control connection disconnecteddoneOUTBoolTRUE job completebusyOUTBoolTRUE job in progresserrorOUTBoolTRUE error occurredstatusOUTWordOutputs the current job status as a HEXcodeftpDataIN OUTVariantUser data for FTP communicationconnectionDataIN OUTTCON IP v4Data for the connection to the FTP server(IP address, hardware ID of the interfaceused)If "connect" and "execute" are not set, the "done" and "error" output values areonly present for one cycle.Function chartThe following function chart shows how the output parameters respond dependingon the input parameters.Figure 2-2connect(manual)execute(manual)connectedpresent forone more cycledonebusyerrorData transfer of user-defined structuresAt the "data" input, the "Ftp1X00Cmd" function block expects an array of bytes.The "Serialize" system function allows you to copy your defined user data (PLCdata types) to the "Data" memory area of the "ftpData" data block. For a detaileddescription of the "Serialize" system function, refer to the TIA Portal Help.active forone cycleFTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/201810

2 Engineering2.2NoteConfiguring the FTP serverThis application example uses the example of FileZilla Server to show theconfiguration of the FTP server. The required configuration steps may differ forother FTP servers.The "Ftp1X00Cmd" function block cannot be used with any FTP server. Thefunction is only guaranteed and tested for the following FTP servers: SIMATICCP, FileZilla and JanaServer.InstallationThe following instructions show you how to install FileZilla Server.Table 2-2 Siemens AG 2018 All rights reservedNo.NoteActionComment1.Download FileZilla Server.For the FileZilla Server download link,see Chapter 4.2.This program is recommended for theapplication example as it is easy to useand structured in a very functional way.2.Install the FTP server software on yourserver.To do this, follow the program'sinstructions.Make sure you have the latest FileZilla Server version.FTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/201811

2 EngineeringConfigurationThe following table shows the steps necessary to configure FileZilla Server. If youare using different FTP server software, follow their manuals for commissioning. Acreated user with password and full access to the files in the user's rootdirectory is important for the application example to work.Table 2-3No.Action1.Start the FileZilla Server interface on your FTPserver and click "OK".You are now logged in to the interface.It displays all the actions running on theserver.2.In the menu bar, click "Edit" and then select"Settings" to go to the server settings.Screenshot Siemens AG 2018 All rights reservedHere you can make all the settings you need,e.g. "Max. number of users" and "Connectiontimeout" (when the FTP server terminates theconnection to the FTP client).For this application example, you can use thedefault settings.3.If you want to use active FTP,select "OK" to confirm and continue with Step4.If you want to use passive FTP, go to themenu bar and open the "Passive modesettings" menu.In "Use the following IP:", enter the IP addressof the computer's used interface.Select "OK" to confirm.4.In the menu bar, click "Edit" and then select"Users" to go to user management.Select "General" and click "Add".In the field, enter an FTP user name, forexample, "ftp user".Select "OK" to confirm.FTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/201812

2 EngineeringNo.Action5.Check the "Password" check box and in thefield next to it, enter the password, forexample, "ftp user".6.Select "Shared folders" and in the "Sharedfolders" section, click "Add".ScreenshotIn Explorer that is now open, navigate to thefolder you want to use as the FTP rootdirectory for the created user. Select the folder(e.g., a previously created folder:"FTP Server") and click "OK" to confirm. Siemens AG 2018 All rights reservedIn "Files", check the "Read", "Write", "Delete"and "Append" check boxes.If you want to create new folder structures anddirectories, go to "Directories" and check the"Create", "Delete", "List" and " Subdirs" checkboxes.Select "OK" to confirm.7.Make sure that the server is online.The online icon must be on.You have now created an FTP user withpassword, root directory and all requiredrights. The FTP server is now ready for theapplication example and for processing userrequests.FTP Communication S7-1200 S7-1500Entry ID: 81367009, V3.4, 04/201813

2 Engineering2.3Integration into the user projectNoteWhen assigning your devices' IP addresses, make sure that the CPU thatoperates as an FTP client and the FTP server are in the same subnet and eachIP address is only

Simple and easy to understand FTP communication with an S7-1200 or S7-1500 via the "Ftp1X00Cmd" block. The command set of the block corresponds to that of FTP communication via S7-300, S7-400 or S7-1500 controllers with a CP. Note The FTP function block supplied with this application example exclusively performs FTP client functions.

Related Documents:

Securing z/OS FTP Transmissions: Agenda 06 November 2019 2 Communications Server FTP Introduction & Overview IBM z/OS FTP: Protocols Functional Comparison z/OS FTP Logs & Analysis Overview z/OS FTP, FTPS & SFTP Functions Overview z/OS FTP Method Comparison: Security vs. Compliance IBM z/OS FTP Security Depl

An sftp client talks to an sftp server and not an RFC959 FTP server FTPS: - Also referred to as RFC4217 FTP, FTP AUTH-TLS, or FTP AUTH-SSL - Secure RFC959 FTP using a standard security mechanism, such as Kerberos or SSL/TLS RFC4217 "Securing FTP with TLS" - The normal FTP protocol but extended with full network security

1. In FTP Manager, Click on the "Anonymous FTP" tab. 2. Check/Uncheck "Enable Anonymous FTP" 3. Click "OK" or "Apply," to accept the changes. Using FTP via a ClientUsing FTP via a Client An FTP client is software/program (i.e. FileZilla/Fetch/CuteFTP/ WS FTP etc) that allows a user to transfer files from one location to another.

1. In FTP Manager, Click on the "Anonymous FTP" tab. 2. Check/Uncheck "Enable Anonymous FTP" Using FTP via a Client An FTP client is software/program (i.e. FileZilla/Fetch/CuteFTP/ WS FTP etc) that allows a user to transfer files from one location to another. 3. Click "OK" or "Apply," to accept the changes.

Proxy FTP PROXY command allows an FTP subcommand to be issued on a secondary control connection FTP client connects simultaneously to two FTP servers Client can then initiate a data connection between the two servers Files are transferred between the servers on ephemeral ports FTP Types - Active, Passive, Proxy

Listing Exchange Exchange Exchange Exchange); Exchange Exchange listing Exchange Exchange listing. Exchange Exchange. Exchange ExchangeExchange Exchange .

FTP Server, the screen will appear as shown in . Figure 2-3. The IP behind . Internet Address. would be used to access the FTP server. Figure 2-3 FTP Server Configuration . 6. Select the . Enable. box to enable . Internet Access. to FTP from WAN port. 7. Specify a . Service Port . for FTP Server. (The default is 21. Do not change it unless .

Homework #4 - Answer key 1. Bargaining with in–nite periods and N 2 players. Consider the in–nite-period alternating-o er bargaining game presented in class, but let us allow for N 2 players. Player 1 is the proposer in period 1, period N 1, period 2N 1, and so on. Similarly, player 2 is the proposer in period 2, period N 2, period 2N 2, and so on. A similar argument applies to any .