� Getting Started - Commissioning a CPU
31xC: Point-to- �point link
___________________
___________________
___________________
___________________
SIMATIC
S7-300 Getting Started - Commissioning a CPU 31xC: Point-to-point link
Getting Started
08/2011 A5E00105535-03
Introduction 1
Preparation 2
Learning units 3
Further Information 4
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 ® 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 NÜRNBERG GERMANY
A5E00105535-03 Ⓟ 09/2011
Copyright © Siemens AG 2011. Technical data subject to change
Getting Started - Commissioning a CPU 31xC: Point-to-point link Getting Started, 08/2011, A5E00105535-03 3
Table of contents
1 Introduction................................................................................................................................................ 5
2 Preparation ................................................................................................................................................ 7
3 Learning units .......................................................................................................................................... 11
3.1 1. Step: Installing the sample project...........................................................................................11
3.2 2. Step: Setting parameters .........................................................................................................12
3.3 3. Step: Linking to the user program............................................................................................13
3.4 4. Step: Trial run ..........................................................................................................................14
4 Further Information .................................................................................................................................. 15
Table of contents
Getting Started - Commissioning a CPU 31xC: Point-to-point link 4 Getting Started, 08/2011, A5E00105535-03
Getting Started - Commissioning a CPU 31xC: Point-to-point link Getting Started, 08/2011, A5E00105535-03 5
Introduction 1
Contents of this Getting Started Manual The sample in this Getting Started manual takes you through four steps, showing you how to commission a fully functional application. You are going to familiarize yourself with the basic hardware and software functions and learn how to transfer data via a serial interface.
This process will take one to two hours, depending on your experience.
Introduction
Getting Started - Commissioning a CPU 31xC: Point-to-point link 6 Getting Started, 08/2011, A5E00105535-03
Getting Started - Commissioning a CPU 31xC: Point-to-point link Getting Started, 08/2011, A5E00105535-03 7
Preparation 2
Scope These instructions apply to the following CPUs:
CPU SIMATIC Micro Memory Card
required for operation? As of firmware version
313C-2 PtP yes V3.3 314C-2 PtP 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).
Requirements ● You have installed two S7 300 stations consisting of a power supply module and a
CPU 31xC-2 PtP. The stations are connected via a serial connection with the 15-pin sub-D socket on the right.
● STEP 7 as of V5.5 + SP1 or STEP 7 as of V5.3 + SP2 with HSP 204 is correctly installed on your PG.
● 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 each S7 300 station.
● The PG is connected to the CPU to be commissioned.
● You have set up your stations for serial data transfer and connected them via the PtP interface. Below is a selection of the patch cords available for connecting the stations:
Type Order number X27 (RS 422), 5 m 6ES7902-3AB00-0AA0 X27 (RS 422), 10 m 6ES7902-3AC00-0AA0 X27 (RS 422), 50 m 6ES7902-3AG00-0AA0
Preparation
Getting Started - Commissioning a CPU 31xC: Point-to-point link 8 Getting Started, 08/2011, A5E00105535-03
Note
Information on how to produce the patch cord yourself can be found in section 6.10.7 of the Technological Functions (http://support.automation.siemens.com/WW/view/en/12429336) operating instructions.
● The CPU is correctly connected to a power supply.
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.
Preparation
Getting Started - Commissioning a CPU 31xC: Point-to-point link Getting Started, 08/2011, A5E00105535-03 9
Layout of the example
2 3
7
1
56 4
① Power supply ON/OFF ② Mode selector ③ Mounting rail ④ Connecting cable between the communication partners ⑤ Programming device with STEP 7 software ⑥ Connecting cable ⑦ Clamp for strain relief
Figure 2-1 Overview of sample layout
Preparation
Getting Started - Commissioning a CPU 31xC: Point-to-point link 10 Getting Started, 08/2011, A5E00105535-03
Getting Started - Commissioning a CPU 31xC: Point-to-point link Getting Started, 08/2011, A5E00105535-03 11
Learning units 33.1 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.
Learning units 3.2 2. Step: Setting parameters
Getting Started - Commissioning a CPU 31xC: Point-to-point link 12 Getting Started, 08/2011, A5E00105535-03
3.2 2. Step: Setting parameters
Procedure Create a project with the two stations and assign identical parameters for the PtP interface of each CPU.
Note
Select different addresses for the MPI interface so that a link to the MPI is also possible.
1. Open your project in SIMATIC Manager.
A window, divided into two sections, opens showing the title of your project. 2. In your project, call the configuration table HW Config for the CPU of the relevant station.
3. Double-click on the submodule "PtP".
The "PtP properties" dialog opens.
4. Select the "ASCII" protocol.
5. Apply the default settings in the parameter assignment screens by clicking "OK":
– 9600 bps, 8 data bits, 1 stop bit, even parity.
6. Confirm your settings with "OK".
The "PtP properties" dialog closes.
7. Save your configuration to your project with "Station > Save and compile".
Your changes are now stored in your project.
8. When the CPU is in STOP, select "PLC > Download to module ..." to download the configuration.
The data are downloaded from the PG to the relevant CPU.
9. Close HW Config with "Station > Close".
You are returned to SIMATIC Manager.
Learning units 3.3 3. Step: Linking to the user program
Getting Started - Commissioning a CPU 31xC: Point-to-point link Getting Started, 08/2011, A5E00105535-03 13
3.3 3. Step: Linking to the user program
Procedure Transfer the user program to both stations. Proceed as follows for each station:
1. Open the project "ZDt26_01_TF_____31xC_PtPP" 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 on the station "CPU 31xC ASCII".
Your station is opened.
3. Open the S7 program of the CPU for this station. Double-click on the "Blocks" container.
All blocks of the S7 program are displayed.
4. Copy all blocks to the "Blocks" folder of each station in your project under "SIMATIC 300 Station > CPU 3xx > S7 Program > Blocks". Do not copy the system data.
Block Name (in the toolbar) Description OB 1 CYCLE Cyclic program processing OB 100 RESTART Startup processing restart DB 21 SEND IDB Instance DB for SEND_PTP SFB DB 22 RCV IDB Instance DB for RCV_PTP SFB DB 40 SEND WORK DB Work DB for SEND_PTP SFB DB 41 RCV WORK DB Work DB for RCV_PTP SFB DB 42 SEND SRC DB Send DB DB 43 RCV DST DB Receive DB SFB 60 SEND_PTP Send SFB for data SFB 61 RCV_PTP Receive SFB for data FB 21 SEND Sending Data FB 22 RECEIVE Receiving Data VAT1 - VAT1
5. In SIMATIC Manager, select the blocks folder of the target CPU under "SIMATIC 300 Station > CPU 3xx > S7 Program > Blocks" and make sure that the PG is connected to the CPU in question.
All blocks of the S7 program are displayed.
6. 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.
Learning units 3.4 4. Step: Trial run
Getting Started - Commissioning a CPU 31xC: Point-to-point link 14 Getting Started, 08/2011, A5E00105535-03
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 currently monitored 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 both CPUs to RUN.
At the bottom right, you will see that the CPU monitored is set to "RUN" mode. Data transfer is started. You can view the number of transmissions at the operand "DB42.DBW0" (send counter). You can view the number of items of data received at the operand "DB41.DBW18" (receive counter).
Getting Started - Commissioning a CPU 31xC: Point-to-point link Getting Started, 08/2011, A5E00105535-03 15
Further Information 4
Diagnostics/Correction of Errors Incorrect operator input, faulty wiring of the serial interface 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_01_TF_____31xC_PtP" project contains further samples you can use for orientation. You can customize all samples according to your personal applications.
Further Information
Getting Started - Commissioning a CPU 31xC: Point-to-point link 16 Getting Started, 08/2011, A5E00105535-03