EN
Siemens logo
Official user manual

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp)

25 pages·1.4 MB·Laptop·PDF·ENDEFRITNLJA
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp)
Table of Contents 14 sections Training Document for Comprehensive Automation · Solutions · Totally Integrated Automation (T I A) · MODULE A5 · … ShowHide
Page 1 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — Training Document for Comprehensive Automation
Page 1 · click to enlarge
Page 1

Training Document for Comprehensive Automation

Solutions

Totally Integrated Automation (T I A)

MODULE A5

Programming the CPU 314C-2DP

Page 2 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — Training Document for Comprehensive Automation
Page 2 · click to enlarge
Page 2

This document has been written by Siemens AG for training purposes for the project entitled "Siemens Automation Cooperates with Education (SCE)". Siemens AG accepts no responsibility for the correctness of the contents. Transmission, use or reproduction of this document is only permitted within public training and educational facilities. Exceptions require the prior written approval of Siemens AG (Mr. Michael Knust michael.knust@siemens.com). Offenders will be liable for damages. All rights, including the right to translate the document, are reserved, particularly if a patent is granted or utility model is registered. We would like to thank the following: Michael Dziallas Engineering, the teachers at vocational schools, and all others who helped to prepare this document.

Page 3 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — Training Document for Comprehensive Automation
Page 3 · click to enlarge
Page 3

SEITE: 1. Foreword 4 2. Notes on Using the CPU 314C-2DP 6 2.1 Operator Control of the CPU 31xC 7 2.2 Memory Concept of the CPU 31xC 9 3. Creating the Hardware Configuration for the CPU 314C-2DP 11 4. Writing a STEP 7 Program 21 5. Testing the STEP 7 Program 24

The following symbols provide guidance through this module: Information Programming Task example Notes

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — Training Document for Comprehensive Automation diagram (page 3)
Fig. 1 · Training Document for Comprehensive Automation
Page 4 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 1. FOREWORD
Page 4 · click to enlarge
Page 4

1. FOREWORD

In terms of its contents, module A5 belongs to the teaching unit entitled "Basic Principles of STEP 7 Programming'. Basic Principles of STEP 7 Programming 2 to 3 days Module A

Further Functions of STEP 7 Programming 2 to 3 days Module B

Plant Simulation with SIMIT SCE 1 to 2 days Module G

Progamming Languages 2 to 3 days Module C

Industrial Field Bus Systems 2 to 3 days Module D

Process Visualization 2 to 3 days Module F

Frequency Converter at SIMATIC S7 2 to 3 days Module H

IT Communication with SIMATIC S7 2 to 3 days Module E

  • Learning Objective: In this module, the reader learns how to create a hardware configuration for the CPU 314C-2DP and how to write and test a STEP 7 program. Based on the steps below, the A5-module explains the procedure in principle, using a very brief example:
  • Setting up a STEP 7 project
  • Creating the hardware configuration for the 314C-2DP CPU
  • Writing a STEP 7 program
  • Testing the program Requirements: The following knowledge is a precondition for successful utilization of this module:
  • Knowledge in the use of Windows
  • Basic principles of PLC programming with STEP 7 (e.g. Module A3 – 'Startup' PLC Programming with STEP 7)
Page 5 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — CPU 314C-2DP
Page 5 · click to enlarge
Page 5

Hardware and software needed 1 PC, operating system Windows 2000 Professional starting with SP4 /XP Professional starting with SP1/Server 2003 with 600 MHz and 512 RAM, free hard disk memory approx. 650 to 900 MB, MS Internet Explorer 6.0 2 Software: STEP7 V 5.4 3 MPI interface for the PC (e.g. PC adapter for USB) 4 SIMATIC S7-300 PLC with the CPU 314C-2DP Configuration example: - Power supply unit: PS 307 2A - CPU: CPU 314-2DP

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2 STEP7 diagram (page 5)
Fig. 2
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2 STEP7 diagram (page 5)
Fig. 3

2 STEP7

1 PC

3 PC Adapter USB

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2 STEP7 diagram (page 5)
Fig. 4

CPU 314C-2DP

4 S7-300 with

Page 6 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2 STEP7
Page 6 · click to enlarge
Page 6
2. NOTES ON THE USE OF THE CPU 314C-2DP

The CPU 314C-2DP is shipped with an integrated PROFIBUS DP interface and integrated inputs/outputs. The following PROFIBUS protocol profiles are available for the CPU 314C-2DP:

- DP interface as master according to EN 50170. - DP interface as slave according to EN 50170. PROFIBUS-DP (decentralized peripherals) is the protocol profile for connecting decentralized peripherals/field units with very fast reaction times. The addresses of the input and output modules of this CPU can be parameterized. Due to the following performance data, this CPU is especially suitable for training purposes: - 48 kByte RAM, load memory in the form of a plug-in MicroMemoryCard (MMC), 64 kByte to 4 MByte - 8192 bytes DI/DO, including 992 bytes central - 512 bytes AI/AO, including 248 bytes central - 0.1 ms / 1 K commands - 256 counters - 256 timers - 256 clock memory bytes - 24 DIs, including 16 which can be used for integrated functions; all can be used as alarm inputs as well - 16 DOs, integrated; 4 of which are fast outputs - 4 AIs for current/voltage, 1 AI resistor integrated - 2 AOs for current/voltage, integrated - 4 pulse outputs (2.5 kHz) - 4-channel counting and measuring with 24 V (60 kHz) incremental encoders - Integrated positioning function

Page 7 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — f f
Page 7 · click to enlarge
Page 7

2.1 OPERATING THE CPUS 31XC

Operator control and display elements The following illustration shows the operator control and display elements of a CPU 31xC. The arrangement and number of elements in some CPUs differ from this illustration.

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.1 OPERATING THE CPUS 31XC diagram (page 7)
Fig. 5

The figures show the following CPU elements: (1) Status and error displays (2) Slot for the Micro Memory Card (MMC), incl. the ejector (3) Connections of the integrated I/O. (4) Power supply connection (5) 1st interface X2 (PtP or DP) (6) 1st interface X1 (MPI) (7) Mode selector switch

The following illustration shows the digital and analog inputs/outputs integrated on the CPU.

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.1 OPERATING THE CPUS 31XC diagram (page 7)
Fig. 6

The figure shows the following integrated I/Os: (1) Analog I/Os (2) each with 8 digital inputs (3) each with 8 digital outputs (4) Front connectors (front doors are open)

f f

Page 8 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.1 OPERATING THE CPUS 31XC
Page 8 · click to enlarge
Page 8

Status and fault/error displays The CPU has the following LED displays:

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.1 OPERATING THE CPUS 31XC diagram (page 8)
Fig. 7

Slot for the SIMATIC Micro Memory Card (MMC) A SIMATIC Micro Memory Card (MMC) is used as a memory module for the CPU 31xC. The MMC can be used as a load memory and as a transportable data carrier. The MMC must be plugged in before the CPU can be operated because the CPUs 31xC do not have an integrated load memory. Mode selector The mode selector can be used to choose the current operating mode of the CPU. The mode selector is designed as a toggle switch with 3 positions. Positions of the mode selector The positions of the mode selector are explained in the same sequence as they occur on the CPU:

PositionDescriptionComments RUNRUN modeThe CPU is processing the user program STOPSTOP modeThe CPU is not processing a user program MRESMemory ResetButton position of the operating mode switch for a memory reset of the CPU. A CPU memory reset requires a specific operating sequence (refer to the Installation Manual, Chapter Commissioning)
Page 9 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 9 · click to enlarge
Page 9

2.2 MEMORY AREAS OF THE CPU 31XC

Introduction The memory of the CPU 31xC can be divided into three areas:

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 9)
Fig. 8

Note Only with the MMC plugged in is it possible to load user programs and therefore operate the CPU 31xC Load memory The load memory is located on a SIMATIC Micro Memory Card (MMC). Its size is exactly the same as that of the MMC. It is used for storing code blocks and data blocks as well as system data (configuration, connections, module parameters, etc.). Blocks that are marked as not being relevant to program execution are exclusively stored in the load memory. In addition, the complete planning data for a project can be stored on the MMC. RAM The RAM is integrated on the CPU and cannot be expanded. It is used for processing the code and processing the data of the user program. The program is executed exclusively in the RAM and the system memory. Once the MMC has been plugged in, the RAM of the CPU is retentive. System memory The system memory is integrated on the CPU and cannot be expanded. It contains - the operands area for clock memories, timers and counters - the process images of the inputs and outputs - the local data

Page 10 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 10 · click to enlarge
Page 10

Retentivity Your CPU 31xC has retentive memory. Retentivity is implemented on the MMC and on the CPU. Due to this retentivity, the contents of the retentive memory are retained even after the mains supply has been switched off and the CPU has been restarted (warm restart). Load memory You program in the load memory (MMC) is always retentive. During loading, it is stored on the MMC, is powerfail-proof and cannot be cleared. Work memory (RAM) Your data in the work memory are backed up on the MMC in the event that the mains supply is switched off. The contents of data blocks are therefore always retained. System memory With regard to clock memories, timers and counters, you configure (properties of the CPU, Retentivity tab) which parts are to be retentive and which are to be initialized with "0" when the system is restarted (warm restart). The diagnostic buffer, MPI address (and baud rate) as well as the runtime meter are generally stored in the retentive memory area on the CPU. The retentive area for the MPI address and the baud rate ensure that your CPU is still able to communicate after a power failure, a complete memory reset or loss of the communication parameters (because the MMC was removed, or the communication parameters were deleted). Retention of the memory objects The following table shows which memory objects are retained when transitions between operating modes occur.

Memory ObjectOperating Mode Transition PowerOn/PowerOffSTOP Æ RUNMemory Reset User Program/User Data (load memory)XXX Actual values of the DBsXX- Flags, timers and counters configured as retentiveXX- Diagnostic buffer, hours run meterXXX MPI address, baud rateXXX
Page 11 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 11 · click to enlarge
Page 11
3. CREATING THE HARDWARE CONFIGURATION FOR THE CPU 314C-2DP

In Step 7, files are managed with the 'SIMATIC Manager'. Here, program blocks can be copied, for example, or called for further processing with other tools by clicking on them with the mouse. Use of the SIMATIC Manager is in line with the usual Windows standards (e.g. right-clicking on a component causes its selection menu to appear). In STEP 7, each project is created with a fixed specified structure. The programs are stored in the following directories:

SIMATIC 300 stations: Here, the corresponding hardware configuration data (Hardware/SC*1) and CPU data are stored.

Project: This directory contains the hardware (e.g. SIMATIC 300 stations) and the subnets (e.g. MPI and PROFIBUS).

Sources/SO*1: Here, sources (e.g. SCL sources) are stored which can be changed into executable programs through conversion.

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 11)
Fig. 9

Blocks/APoff*1: Here, the program blocks ( OB, FB, FC, SFB, SFC, DB etc. ) are stored.

Symbols/SY*1: Here, the symbol lists for symbolic addressing are stored.

CPU: Here, the S7 program and the networked connection partners (Connections/CO*1) are entered.

S7 Program: Here, the user programs (Blocks/AP off*1), symbol tables (Symbols/SY*1) and sources (Sources/SO*1) are managed.

*1 Designations from STEP 7 Version 2.x

Page 12 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 12 · click to enlarge
Page 12

The hardware configuration of the PLC is mapped in the 'SIMATIC 300 Station' and 'CPU' folders. This is done in the special case where a configuration is created with the CPU 314C-2DP. Also, a clock memory is configured and the addresses of the input and output modules are set in this case.

The user must perform the following steps in order to set up a project and create the hardware configuration.

1. The central tool in STEP 7 is the 'SIMATIC Manager' , which is started by double-clicking on the

icon. ( → SIMATIC Manager)

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 12)
Fig. 10
2. STEP 7 programs are managed in projects. Such a project will now be set up ( → File → New)
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 12)
Fig. 11
Page 13 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 13 · click to enlarge
Page 13
3. The project is now assigned the name 'CPU314C_2DP' under 'Name' ( → CPU314C_2DP → OK)
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 13)
Fig. 12
4. A 'SIMATIC 300-Station' station is now inserted. ( → Insert → Station → SIMATIC 300 Station)
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 13)
Fig. 13
Page 14 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 14 · click to enlarge
Page 14
5. Open the configuration tool by double-clicking on 'Hardware' . ( → Hardware)
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 14)
Fig. 14
6. Open the hardware catalog by clicking on the

) The catalog is divided into the following directories: - PROFIBUS-DP/PA, SIMATIC 300, SIMATIC 400 and SIMATIC PC Based Control - and provides you with all the module racks, modules and interface modules for designing your hardware configuration.

symbol. (→

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 14)
Fig. 15
Page 15 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 15 · click to enlarge
Page 15
7. Insert a rail by double-clicking on 'Rail' ( → SIMATIC 300 → RACK-300 → Rail).
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 15)
Fig. 16

A configuration table for designing Rack 0 is then displayed.

Page 16 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 16 · click to enlarge
Page 16

8. From the hardware catalog, you now can select any of the modules that are also plugged into the real rack and insert them in the configuration table. To do this, you must click on the name of the respective module, hold down the mouse button and drag the module into a row of the configuration table using the Drag & Drop function. We are starting with the power supply unit 'PS 307 2A'. (→ SIMATIC 300 → PS-300 → PS 307 2A)

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 16)
Fig. 17

The order numbers of the individual modules are noted on the components and are also shown in the footer of the catalog.

Page 17 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 17 · click to enlarge
Page 17
9. In the next step, we drag the CPU 314C-2DP onto the second slot. When this is being done, the order number and the version of the CPU can be read on the front of the CPU. ( → SIMATIC 300 → CPU-300 → CPU 314C-2DP → 6ES7 314-6CF00-0AB0).
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 17)
Fig. 18
10. In the following dialog box, we now want to set up the integrated PROFIBUS interface. Because we will not use the interface here, we accept the settings with 'OK' ( → OK ).
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 17)
Fig. 19
Page 18 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 18 · click to enlarge
Page 18
11. The properties of some modules can be altered ( → Click on module → Change properties → OK). For example, a clock memory can be specified for all CPUs ( → Cycle/Clock memory → ∨ Clock memory → Memory Byte 100).
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 18)
Fig. 20
Page 19 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 19 · click to enlarge
Page 19
12. With most S7-300 CPUs, the addresses of the I/O modules can be altered. This is done by double-clicking on the corresponding modules and altering their settings in the 'Addresses' tab. A note should always be made of these addresses (addresses assigned automatically are usually tied to a specific slot). ( → DI24/DO16 → Addresses → Deselect System Default → 0 → Deselect System Default → 0 → OK )
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 19)
Fig. 21
Page 20 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 2.2 MEMORY AREAS OF THE CPU 31XC
Page 20 · click to enlarge
Page 20
13. By clicking on the

buttons, the configuration table is now first stored and converted, and then loaded into the PLC. When this is being done, the key switch on the CPU

should be in the Stop position! ( →

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 2.2 MEMORY AREAS OF THE CPU 31XC diagram (page 20)
Fig. 22

and · ) · →

Page 21 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 4. WRITING A STEP 7 PROGRAM
Page 21 · click to enlarge
Page 21

4. WRITING A STEP 7 PROGRAM

We are writing the program to be tested in the statement list language (STL), and it only contains two lines. Here, the frequencies of the MB100 clock memory byte activated in the hardware are to be read out on an output byte. Assignment list: MB100 Clock Clock memory byte AB0 AB Display A cycle duration/frequency is assigned to each bit of the clock memory byte. Assignment is as follows:

Bit: 7 6 5 4 3 2 1 0 Clock duration (s): 2 1.6 1 0.8 0.5 0.4 0.2 0.1 Frequency (Hz): 0.5 0.625 1 1.25 2 2.5 5 10 14. In the 'SIMATIC Manager', mark the 'Blocks' folder.( → SIMATIC Manager → Blocks)

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 4. WRITING A STEP 7 PROGRAM diagram (page 21)
Fig. 23
Page 22 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 4. WRITING A STEP 7 PROGRAM
Page 22 · click to enlarge
Page 22
15. In the SIMATIC Manager, double-click on the 'OB1' block to open it ( → OB1)
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 4. WRITING A STEP 7 PROGRAM diagram (page 22)
Fig. 24
16. As an option, you can enter the properties of the OB1 for documentation purposes and accept them with 'OK' . ( → OK)
Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 4. WRITING A STEP 7 PROGRAM diagram (page 22)
Fig. 25
Page 23 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 4. WRITING A STEP 7 PROGRAM
Page 23 · click to enlarge
Page 23
17. 'LAD/STL/FDB Program S7 Blocks’ is an editor which allows you to create your STEP 7 program as you require. To this end, the OB1 organization block with the first network has already been opened. In order to create your first logic operations, you must mark the first network. Now you can write your first STEP 7 program. Individual programs are usually divided

into networks in STEP 7. You open a new network by clicking on the network symbol,

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 4. WRITING A STEP 7 PROGRAM diagram (page 23)
Fig. 26

The network L MB 100 T AB 0 loads the clock memory byte activated in the hardware configuration and transfers it to an output byte. As a consequence, the 8 bits of the output byte flash in the different frequencies of the clock memory bits.

Page 24 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 5. TESTING THE STEP 7 PROGRAM
Page 24 · click to enlarge
Page 24

5. TESTING THE STEP 7 PROGRAM

The STEP 7 program to be tested can now be loaded into the PLC. In our case, this is only OB1.

18. Save the organization block with

and load it into the PLC by clicking on

. When this is

being done, the key switch on the CPU should be in the STOP position! ( →

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 5. TESTING THE STEP 7 PROGRAM diagram (page 24)
Fig. 27

) · →

Page 25 of the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) user manual — 5. TESTING THE STEP 7 PROGRAM
Page 25 · click to enlarge
Page 25
19. To start the program, move the key switch to the RUN position. Click on the

symbol to view the program in 'OB1'.

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) — 5. TESTING THE STEP 7 PROGRAM diagram (page 25)
Fig. 28

) · (→

Sources

References & links

Pages referenced in this manual — manufacturer, support and downloads.

Ask about the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp)

Owners and our team usually reply within a day — and your question helps the next person too.

Add your email to get notified when it’s answered — no spam, ever.

0 questions
No questions yet about the Siemens SIMATIC S7-300 (programming the cpu 314c-2dp)

Be the first to ask — other owners or our team will answer.

Original document

Siemens SIMATIC S7-300 (programming the cpu 314c-2dp) manual PDF

25 pages·1.4 MB·Laptop·PDF
Click any page above to open it here
Page 1 / …
100%
Loading pages…