1 Getting Started - Commissioning a CPU ___________________ Introduction 31xC: Closed-loop control SIMATIC 2 ___________________ Preparation 3 ___________________ Learning units 4 ___________________ Further Information S7-300 Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started 08/2011 A5E00105534-03 Legal information Legal information Warning notice system This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage to property. The notices referring to your personal safety are highlighted in the manual by a safety alert symbol, notices referring only to property damage have no safety alert symbol. These notices shown below are graded according to the degree of danger. DANGER indicates that death or severe personal injury will result if proper precautions are not taken. WARNING indicates that death or severe personal injury may result if proper precautions are not taken. CAUTION with a safety alert symbol, indicates that minor personal injury can result if proper precautions are not taken. CAUTION without a safety alert symbol, indicates that property damage can result if proper precautions are not taken. NOTICE indicates that an unintended result or situation can occur if the relevant information is not taken into account. If more than one degree of danger is present, the warning notice representing the highest degree of danger will be used. A notice warning of injury to persons with a safety alert symbol may also include a warning relating to property damage. Qualified Personnel The product/system described in this documentation may be operated only by personnel qualified for the specific task in accordance with the relevant documentation, in particular its warning notices and safety instructions. Qualified personnel are those who, based on their training and experience, are capable of identifying risks and avoiding potential hazards when working with these products/systems. Proper use of Siemens products Note the following: WARNING Siemens products may only be used for the applications described in the catalog and in the relevant technical documentation. If products and components from other manufacturers are used, these must be recommended or approved by Siemens. Proper transport, storage, installation, assembly, commissioning, operation and maintenance are required to ensure that the products operate safely and without any problems. The permissible ambient conditions must be complied with. The information in the relevant documentation must be observed. Trademarks All names identified by (R) are registered trademarks of Siemens AG. The remaining trademarks in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owner. Disclaimer of Liability We have reviewed the contents of this publication to ensure consistency with the hardware and software described. Since variance cannot be precluded entirely, we cannot guarantee full consistency. However, the information in this publication is reviewed regularly and any necessary corrections are included in subsequent editions. Siemens AG Industry Sector Postfach 48 48 90026 NURNBERG GERMANY A5E00105534-03 09/2011 Copyright (c) Siemens AG 2011. Technical data subject to change Table of contents 1 Introduction................................................................................................................................................ 5 2 Preparation ................................................................................................................................................ 7 3 Learning units .......................................................................................................................................... 11 4 3.1 1. Step: Installing the sample project...........................................................................................11 3.2 2. Step: Linking to the user program............................................................................................12 3.3 3. Step: Setting parameters .........................................................................................................13 3.4 4. Step: Trial run ..........................................................................................................................13 Further Information .................................................................................................................................. 15 Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started, 08/2011, A5E00105534-03 3 Table of contents Getting Started - Commissioning a CPU 31xC: Closed-loop control 4 Getting Started, 08/2011, A5E00105534-03 Introduction 1 Contents of this Getting Started Manual The practical sample in this Getting Started manual takes you through four steps, showing you how to commission a fully functional application. You are going to learn how to determine and configure application-dependent data and how to operate a control circuit. This process will take one to two hours, depending on your experience. Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started, 08/2011, A5E00105534-03 5 Introduction Getting Started - Commissioning a CPU 31xC: Closed-loop control 6 Getting Started, 08/2011, A5E00105534-03 2 Preparation Scope These instructions apply to the following CPUs: CPU SIMATIC Micro Memory Card required for operation? As of firmware version 313C Yes V3.3 313C-2 PtP yes V3.3 313C-2 DP yes V3.3 314C-2 PtP yes V3.3 314C-2 DP yes V3.3 314C-2 PN/DP yes V3.3 The order number can be found in the manuals, e.g. the operating instructions CPU 31xC and CPU 31x: Installation (http://support.automation.siemens.com/WW/view/en/13008499). Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started, 08/2011, A5E00105534-03 7 Preparation Requirements You have an S7-300 station consisting of a power supply module and a CPU 313C or 314C. STEP 7 as of V5.5 is correctly installed on your PG. The table below shows the STEP 7 version you need for each CPU. CPU STEP 7 version 313C STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 203 313C-2 PtP STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 204 313C-2 DP STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 203 314C-2 PtP STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 204 314C-2 DP STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 203 314C-2 PN/DP STEP 7 as of V5.5 with HSP 191 You have downloaded the sample projects from the Internet or have the CD of sample projects included with the Technological Functions operating instructions. You have set up a project for the S7-300 station. The PG is connected to the CPU. The CPU is correctly connected to a power supply. I/O wiring is not required for this sample. WARNING Operation of an S7-300 as part of plants or systems is subject to special rules and regulations, which depend on its field of application. Please make sure that you adhere to the applicable safety and accident prevention regulations, for example IEC 204 (emergency stop systems). You risk severe injury, or damage to machines and equipment if you ignore these regulations. Ensure the S7-300 is completely disconnected before wiring! You can come into contact with live wires if the PS 307 power supply module is turned on or the PS power supply cable is connected to the main power supply. Getting Started - Commissioning a CPU 31xC: Closed-loop control 8 Getting Started, 08/2011, A5E00105534-03 Preparation Layout of the example 1 7 6 2 3 5 4 Power supply ON/OFF Mode selector Mounting rail Programming device with STEP 7 software PG cable Connecting cable Clamp for strain relief Figure 2-1 Overview of sample layout Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started, 08/2011, A5E00105534-03 9 Preparation Getting Started - Commissioning a CPU 31xC: Closed-loop control 10 Getting Started, 08/2011, A5E00105534-03 Learning units 3.1 3 1. Step: Installing the sample project Introduction When installing the sample project, you have the following options: Installing from CD 1. Take the CD out of the Technological Functions operating instructions. 2. Start the installation program on the CD by double-clicking on the SETUP.EXE file in the SETUP folder. The installation program is started. 3. Now follow the instructions in the installation program. Installing from the Internet 1. Open the directory with the sample projects. 2. Start the installation program by double-clicking the SETUP.EXE file. The installation program is started. 3. Now follow the instructions in the installation program. Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started, 08/2011, A5E00105534-03 11 Learning units 3.2 2. Step: Linking to the user program 3.2 2. Step: Linking to the user program Procedure 1. Open the project "ZDt26_04_TF_____31xC_PID" in the catalog ... \Siemens\STEP7\Examples via "File > Open ... > Sample projects" in SIMATIC Manager. A window, divided into two sections, opens showing the title of the project. 2. Double-click the S7 program "Controlling 2 CONT_C". The "Sources", "Blocks" and "Symbols" folders are displayed in the right-hand window. 3. Double-click on the "Blocks" container. All blocks of the S7 program are displayed. 4. With the exception of system data, copy all the blocks to your project under "SIMATIC 300 Station > CPU 3xx > S7 Program > Blocks". Block Name (in the toolbar) Description OB 100 RESTART Restart OB OB 35 CYC_INT5 Time-controlled OB 100 ms SFB 41 CONT_C Continuous-action PID controller FB 100 PROC_C Control circuit for continuous controller DB 100 DI_PROC_C Instance DB for PROC_C DB 101 DI_CONT_C Instance DB for CONT_C VAT1 VAT1 Variable table Getting Started - Commissioning a CPU 31xC: Closed-loop control 12 Getting Started, 08/2011, A5E00105534-03 Learning units 3.3 3. Step: Setting parameters 3.3 3. Step: Setting parameters Procedure 1. Start the parameter assignment interface with SIMATIC/STEP7/PID Control Parameter Assignment. The input dialog "PID Control" is displayed. 2. In PID control, open your project with "File > Open". Select instance DB 101 for SFB 41. Acknowledge the dialog with "OK". You are returned to the parameter assignment screen form. The configured parameters are displayed. Changes to this sample program are not required. 3. Close the parameter assignment screen form with "File > Close". The parameter assignment screen form is closed. 4. In SIMATIC Manager, select "SIMATIC 300 Station > CPU 3xx > S7 Program > Blocks". All blocks of the S7 program are displayed. 5. Download all of the S7 blocks it contains to your CPU via "PLC > Download" (CPU in STOP mode). The program and configuration are downloaded from the PG to the CPU. 3.4 4. Step: Trial run Procedure 1. In the "Blocks" directory, double-click on the variable table "VAT1" in your project. The variable table for monitoring and modifying is displayed. 2. Go online with "PLC > Connect to > Configured CPU". At the bottom right, you will see that the CPU is set to "STOP" mode. 3. Activate monitoring with "Variable > Monitor". The current values of the addresses are displayed in the "Status Value" column. 4. Switch the CPU to RUN. At the bottom right, you will see that the CPU is set to "RUN" mode. The controller is started. 5. Modify the setpoint "SP_INT". You can monitor the output value "OUTV" that is proportional to the setpoint "SP_INT". 6. Call the STEP 7 tool PID Control (see step 3). Select instance DB 101 and click "Online" mode. In the "Test" menu, select and start the "Curve plotter" function. You can view the graphic profile of some of the control variables (actual value, setpoint, control offset, etc.). Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started, 08/2011, A5E00105534-03 13 Learning units 3.4 4. Step: Trial run Getting Started - Commissioning a CPU 31xC: Closed-loop control 14 Getting Started, 08/2011, A5E00105534-03 Further Information 4 Diagnostics/Correction of Errors Incorrect operator input or inconsistent configuration data may lead to errors. For information on how to analyze such errors and messages, refer to the S7-300 documentation. Example: The "ZEn26_04_TF_____31xC_PID" project contains further samples you can use for orientation. You can customize all samples according to your personal applications. Getting Started - Commissioning a CPU 31xC: Closed-loop control Getting Started, 08/2011, A5E00105534-03 15 Further Information Getting Started - Commissioning a CPU 31xC: Closed-loop control 16 Getting Started, 08/2011, A5E00105534-03