Programming With STEP 7 - Siemens - Free Download PDF

26d ago
2.34 MB
702 Pages

SIMATICProgramming with STEP 7ManualThis manual is part of the documentation packagewith the order oducing the Product andInstalling the Software1Installation2Working Out the AutomationConcept3Basics of Designing aProgram Structure4Startup and Operation5Setting Up and Editing theProject6Editing Projects withDifferent Versions of STEP 77Defining Symbols8Creating Blocks andLibraries9Basics of Creating LogicBlocks10Creating Data Blocks11Parameter Assignment forData Blocks12Creating STL Source Files13Displaying Reference Data14Checking Block Consistencyand Time Stamps as a BlockPropertyContinued an next page15

Siemens AGIndustry SectorPostfach 48 4890026 NÜRNBERGGERMANYA5E02789666-01 05/2010Copyright Siemens AG 2010.Technical data subject to change

ContinuedSIMATICProgramming with STEP 7ManualSetting Up and Editing theProject16Controlling and MonitoringVariables17Establishing an OnlineConnection and Making CPUSettings18Downloading and Uploading19Testing with the VariableTable20Testing Using ProgramStatus21Testing using the SimulationProgram (Optional Package)22Diagnostics23Printing and Archiving24Working with M7Programmable ControlSystemsThis manual is part of the documentation packagewith the order ps and Tricks26Appendix27

Legal informationWarning notice systemThis manual contains notices you have to observe in order to ensure your personal safety, as well as to preventdamage to property. The notices referring to your personal safety are highlighted in the manual by a safety alertsymbol, notices referring only to property damage have no safety alert symbol. These notices shown below aregraded according to the degree of danger.DANGERindicates that death or severe personal injury will result if proper precautions are not taken.WARNINGindicates that death or severe personal injury may result if proper precautions are not taken.CAUTIONwith a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken.CAUTIONwithout a safety alert symbol, indicates that property damage can result if proper precautions are not taken.NOTICEindicates that an unintended result or situation can occur if the corresponding information is not taken intoaccount.If more than one degree of danger is present, the warning notice representing the highest degree of danger willbe used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating toproperty damage.Qualified PersonnelThe product/system described in this documentation may be operated only by personnel qualified for the specifictask in accordance with the relevant documentation for the specific task, in particular its warning notices andsafety instructions. Qualified personnel are those who, based on their training and experience, are capable ofidentifying risks and avoiding potential hazards when working with these products/systems.Proper use of Siemens productsNote the following:WARNINGSiemens products may only be used for the applications described in the catalog and in the relevant technicaldocumentation. If products and components from other manufacturers are used, these must be recommendedor approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation andmaintenance are required to ensure that the products operate safely and without any problems. The permissibleambient conditions must be adhered to. The information in the relevant documentation must be observed.TrademarksAll names identified by are registered trademarks of the Siemens AG. The remaining trademarks in thispublication may be trademarks whose use by third parties for their own purposes could violate the rights of theowner.Disclaimer of LiabilityWe have reviewed the contents of this publication to ensure consistency with the hardware and softwaredescribed. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, theinformation in this publication is reviewed regularly and any necessary corrections are included in subsequenteditions.Siemens AGIndustry SectorPostfach 48 4890026 NÜRNBERGGERMANYA5E02789666-01 02/2010Copyright Siemens AG 2010.Technical data subject to change

PrefacePurposeThis manual provides a complete overview of programming with STEP 7. It is designed to supportyou when installing and commissioning the software. It explains how to proceed when creatingprograms and describes the components of user programs.The manual is intended for people who are involved in carrying out control tasks using STEP 7 andSIMATIC S7 automation systems.We recommend that you familiarize yourself with the examples in the manual "Working withSTEP 7 V5.5, Getting Started." These examples provide an easy introduction to the topic"Programming with STEP 7".Basic Knowledge RequiredIn order to understand this manual, general knowledge of automation technology is required.In addition, you must be familiar with using computers or PC-similar tools (for example,programming devices) with the MS Windows XP, MS Windows Server 2003 or MS Windows 7operating system.Scope of the ManualThis manual is valid for release 5.5 of the STEP 7 programming software package.You can find the latest information on the service packs: in the "readme.rtf" file in the updated STEP 7 online help.The topic "What's new?" in the online help offers an excellent introduction and overview of thenewest STEP 7 innovations.Programming with STEP 7Manual, 05/2010, A5E02789666-015

PrefaceSTEP 7 Documentation PackagesThis manual is part of the documentation package "STEP 7 Basic Information“.The following table displays an overview of the STEP 7 documentation:DocumentationPurposeSTEP 7 Basic Information withBasic information for technical6ES7810-4CA10-8BW0personnel describing the methods ofimplementing control tasks withSTEP 7 and the S7-300/400programmable controllers. Working with STEP 7,Getting Started Manual Programming with STEP 7 Configuring Hardware andCommunication Connections,STEP 7 From S5 to S7, Converter ManualSTEP 7 Reference with6Order NumberProvides reference information anddescribes the programminglanguages LAD, FBD and STL, andstandard and system functionextending the scope of theSTEP 7 basic information.6ES7810-4CA10-8BW1Online HelpsPurposeOrder NumberHelp on STEP 7Basic information on programmingand configuring hardware withSTEP 7 in the form of an onlinehelp.Part of the STEP 7Standard software.Reference helps on AWL/KOP/FUPReference help on SFBs/SFCsReference help on Organization BlocksContext-sensitive referenceinformation.Part of the STEP 7Standard software. Ladder Logic (LAD) / Function BlockDiagram (FDB) / Statement List (STL) forS7-300/400 manuals Standard and System Functionfor S7-300/400Volume 1 and Volume 2Programming with STEP 7Manual, 05/2010, A5E02789666-01

PrefaceOnline HelpThe manual is complemented by an online help which is integrated in the software.This online help is intended to provide you with detailed support when using the software.The help system is integrated in the software via a number of interfaces: There are several menu commands which you can select in the Help menu:The Contents command opens the index for the Help on STEP 7. Using Help provides detailed instructions on using the online help. The context-sensitive help offers information on the current context, for example, an opendialog box or an active window. You can open the contextsensitive help by clicking the "Help"button or by pressing F1. The status bar offers another form of context-sensitive help. It displays a short explanation foreach menu command when the mouse pointer is positioned on the menu command. A brief explanation is also displayed for each icon in the toolbar when the mouse pointer ispositioned on the icon for a short time.If you prefer to read the information from the online help in printed format, you can print outindividual help topics, books, or the entire online help.This manual, as well as the manuals "Configuring Hardware and Communication ConnectionsSTEP 7", "Modifiying the System During Operation via CiR" and "Automation System S7-400H Fault-Tolerant Systems" is an extract from the HTML-based Help on STEP 7. For detailedprocedures please refer to the STEP 7 help. As the manuals and the online help share an almostidentical structure, it is easy to switch between the manuals and the online help.You can find the electronic manuals after installing STEP 7 via the Windows Start menu: Start SIMATIC Documentation.Programming with STEP 7Manual, 05/2010, A5E02789666-017

PrefaceFurther SupportIf you have any technical questions, please get in touch with your Siemens representative orresponsible agent.You will find your contact person at: will find a guide to the technical documentation offered for the individual SIMATIC Productsand Systems The online catalog and order system is found under: CentersSiemens offers a number of training courses to familiarize you with the SIMATIC S7 automationsystem. Please contact your regional training center or our central training center in D 90026Nuremberg, Germany for details:Internet: http://www.sitrain.com8Programming with STEP 7Manual, 05/2010, A5E02789666-01

PrefaceTechnical SupportYou can reach the Technical Support for all Industry Automation and Drive Technology products Via the Web formula for the Support equestAdditional information about our Technical Support can be found on the Internet ice & Support on the InternetIn addition to our documentation, we offer our Know-how online on the internet rtwhere you will find the following: The newsletter, which constantly provides you with up-to-date information on your products. The right documents via our Search function in Service & Support. A forum, where users and experts from all over the world exchange their experiences. Your local representative for Industry Automation and Drive Technology. Information on field service, repairs, spare parts and consulting.Programming with STEP 7Manual, 05/2010, A5E02789666-019

Preface10Programming with STEP 7Manual, 05/2010, A5E02789666-01

Contents1Introducing the Product and Installing the 23Automation License Manager .43User Rights Through The Automation License Manager .43Installing the Automation License Manager.46Guidelines for Handling License Keys .47Installing STEP 7 .48Installation Procedure .50Setting the PG/PC Interface .53Uninstalling STEP 7 .55User Rights .55User Rights in MS Windows XP/Server 2003.55User Rights in MS Windows 7 .56Working Out the Automation Concept.593. of STEP 7.23The STEP 7 Standard Package.28What's New in STEP 7, Version 5.5? .33Extended Uses of the STEP 7 Standard Package .35Engineering Tools .37Run-Time Software .39Human Machine Interface.41Basic Procedure for Planning an Automation Project.59Dividing the Process into Tasks and Areas .60Describing the Individual Functional Areas .62Listing Inputs, Outputs, and In/Outs .64Creating an I/O Diagram for the Motors.65Creating an I/O Diagram for the Valves.66Establishing the Safety Requirements.67Describing the Required Operator Displays and Controls.68Creating a Configuration Diagram .69Basics of Designing a Program Structure . in a CPU .71Blocks in the User Program .72Organization Blocks and Program Structure .73Call Hierarchy in the User Program .80Block Types .82Organization Block for Cyclic Program Processing (OB1) .82Functions (FC) .88Function Blocks (FB).90Instance Data Blocks .93Shared Data Blocks (DB).96System Function Blocks (SFB) and System Functions (SFC) .97Programming with STEP 7Manual, 05/2010, A5E02789666-0111 and STEP 7 .113Starting STEP 7 with Default Start Parameters .114Calling the Help Functions .117Objects and Object Hierarchy .118Project Object.119Library Object.121Station Object.122Programmable Module Object .124S7/M7 Program Object .126Block Folder Object.128Source File Folder Object .131S7/M7 Program without a Station or CPU .132User Interface and Operation.133Operating Philosophy.133Window Arrangement .134Elements in Dialog Boxes .135Creating and Managing Objects .136Selecting Objects in a Dialog Box.142Session Memory .143Changing the Window Arrangement.143Saving and Restoring the Window Arrangement.144Keyboard Operation.145Keyboard Control .145Key Combinations for Menu Commands .145Key Combinations for Moving the Cursor .147Key Combinations for Selecting Text.149Key Combinations for Access to Online Help .149Key Combinations for Toggling between Windows .150Setting Up and Editing the Project .

STEP 7", "Modifiying the System During Operation via CiR" and "Automation System S7-400H - Fault-Tolerant Systems" is an extract from the HTML-based Help on STEP 7. For detailed ... Training Centers Siemens offers a number of training courses to familiarize you with the SIMATIC S7 automation