Docsity

Simatic - Working - with - STEP - 7, Manuais, Projetos, Pesquisas de Informática

Toggle sidebar
bg1
s
Welcome to STEP 7,
Contents
Introduction to STEP 7 1
The SIMATIC Manager 2
SIMATIC
Programming with Symbols 3
Working with STEP 7
Creating a Program in OB1 4
Creating a Program with
Function Blocks and Data Blocks
5
Getting Started
Configuring the Central Rack 6
Downloading and Debugging
the Program 7
Programming a Function 8
Programming a
Shared Data Block 9
Programming a Multiple Instance 10
Configuring the Distributed I/O 11
Appendix
Appendix A
A
Index
This manual is part of the documentation
package with the order number:
6ES7810-4CA08-8BW0
Edition 03/2006
C79000-P7076-C48-01
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Pré-visualização parcial do texto

Baixe Simatic - Working - with - STEP - 7 e outras Manuais, Projetos, Pesquisas em PDF para Informática, somente na Docsity!

s

Welcome to STEP 7,

Contents

Introduction to STEP 7^1

SIMATIC The SIMATIC Manager^2

Programming with Symbols^3

Working with STEP 7

Creating a Program in OB1^4

Creating a Program with

Function Blocks and Data Blocks^5

Getting Started

Configuring the Central Rack^6

Downloading and Debugging

the Program^7

Programming a Function^8

Programming a

Shared Data Block^9

Programming a Multiple Instance^10

Configuring the Distributed I/O^11

Appendix

Appendix A

A

Index

This manual is part of the documentation package with the order number: 6ES7810-4CA08-8BW

Edition 03/

C79000-P7076-C48-

Safety Guidelines

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 to property damage only have no safety alert symbol. The notices shown below are graded according to the degree of danger.

Siemens AG Automation and Drives Postfach 4848 90437 NÜRNBERG GERMANY

C79000-P7076-C48- 03/

Copyright © Siemens AG 2006 Technical data subject to change

!

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 corresponding notice 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 device/system may only be set up and used in conjunction with this documentation. Commissioning and operation of a device/system may only be performed by qualified personnel. Within the context of the safety notices in this documentation qualified persons are defined as persons who are authorized to commission, ground and label devices, systems and circuits in accordance with established safety practices and standards.

Prescribed Usage

Note the following:

Warning ! (^) This device and its components may only be used for the applications described in the catalog or the technical description, and only in connection with devices or components from other manufacturers which have been approved or recommended by Siemens. Correct, reliable operation of the product requires proper transport, storage, positioning and assembly as well as careful operation and maintenance.

Trademarks

All names identified by ® are registered trademarks of the 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.

Welcome to STEP 7...

STEP 7 Getting Started iv C79000-P7076-C48-

Contents

1 Introduction to STEP 7

What You Will Learn Combining Hardware and Software Basic Procedure Using STEP 7 Installing STEP 7

2 The SIMATIC Manager

Starting the SIMATIC Manager and Creating a Project The Project Structure in the SIMATIC Manager and How to Call the Online Help

In Chapters 3 to 5, you create a simple program.

3 Programming with Symbols

Absolute Addresses Symbolic Programming

4 Creating a Program in OB

Opening the LAD/STL/FBD Program Window Programming OB1 in Ladder Logic Programming OB1 in Statement List Programming OB1 in Function Block Diagram

5 Creating a Program with Function Blocks and Data Blocks

Creating and Opening Function Blocks (FB) Programming FB1 in Ladder Logic Programming FB1 in Statement List Programming FB1 in Function Block Diagram Generating Instance Data Blocks and Changing Actual Values Programming a Block Call in Ladder Logic Programming a Block Call in Statement List Programming a Block Call in Function Block Diagram

STEP 7 Getting Started C79000-P7076-C48-01 v

1 Introduction to STEP 7

1.1 What You Will Learn

Using practical exercises, we will show you how easy it is to program in Ladder Logic, Statement List, or Function Block Diagram with STEP 7. Detailed instructions in the individual chapters will show you step-by-step the many ways in which you can use STEP 7.

Creating a Program with Binary Logic

In Chapters 2 to 7, you will create a program with binary logic. Using the programmed logic operations, you will address the inputs and outputs of your CPU (if present). The programming examples in the Getting Started manual are based, among other things, on three fundamental binary logic operations.

The first binary logic operation, which you will program later on, is the AND function. The AND function can be best illustrated in a circuit diagram using two keys.

Key 1 Key 2 (^) If both Key 1 and Key 2 are pressed, the bulb lights up.

The second binary logic operation is the OR function. The OR function can also be represented in a circuit diagram.

Key 4

Key 3

If either key 3 or key 4 is pressed, the bulb lights up.

STEP 7 Getting Started C79000-P7076-C48-01 1-

Introduction to STEP 7

The third binary logic operation is the memory element. The SR function reacts within a circuit diagram to certain voltage states and passes these on accordingly.

Memory Element

S

R

Key R

Key S

If key S is pressed, the bulb lights up and remains lit until key R is pressed.

STEP 7 Getting Started 1-2 C79000-P7076-C48-

Introduction to STEP 7

1.3 Basic Procedure Using STEP 7

Before you create a project, you should know that STEP 7 projects can be created in different orders.

Option 1 Option 2

Transferring the program to the CPU and debugging (Chapter 7)

Creating a project (Chapter 2)

Designing the solution to the automation task

Configuring the hardware (Chapter 6)

Creating a program (Chapters 3 to 5)

Creating a program (Chapters 3 to 5)

Configuring the hardware (Chapter 6)

Since we are only using a small number of inputs and outputs in the Getting Started manual, we will skip the hardware configuration for now and start with the programming.

In the hardware configuration, not only can you define addresses, but you can also change the parameters and properties of modules. If you want to operate several CPUs, for example, you have to match up the MPI addresses of the CPUs.

If you choose the second option, you have to determine each address yourself, depending on your selected components and you cannot call these addresses via STEP 7.

If you are creating comprehensive programs with many inputs and outputs, we recommend you configure the hardware first. The advantage of this is that STEP 7 displays the possible addresses in the Hardware Configuration Editor.

STEP 7 Getting Started 1-4 C79000-P7076-C48-

Introduction to STEP 7

1.4 Installing STEP 7

Regardless of whether you want to start with programming or configuring hardware, you first have to install STEP 7. If you are using a SIMATIC programming device, STEP 7 is already installed.

When installing the STEP 7 software on a programming device or PC without a previously installed version of STEP 7, note the software and hardware requirements. You can find these in the Readme.wri on the STEP 7 CD under :\STEP 7 \Disk.

If you need to install STEP 7 first, insert the STEP 7 CD in the CD-ROM drive now. The installation program starts automatically. Follow the instructions on the screen.

Once the installation is complete and you have restarted the computer, the "SIMATIC Manager" icon will appear on your Windows desktop.

If the installation does not start auto- matically, you can also find the installation program on the CD-ROM under :\STEP 7 \Disk1\setup.exe.

You can find additional notes on installation in the Readme.wri file on the STEP 7 CD under :\STEP 7 \Disk1\Readme.wri.

If you double-click the "SIMATIC Manager" icon following installation, the STEP 7 Wizard will be started automatically.

STEP 7 Getting Started C79000-P7076-C48-01 1-

2 The SIMATIC Manager

2.1 Starting the SIMATIC Manager and Creating a Project

The SIMATIC Manager is the central window which becomes active when STEP 7 is started. The default setting starts the STEP 7 Wizard, which supports you when creating a STEP 7 project. The project structure is used to store and arrange all the data and programs in order.

Double-click the SIMATIC Manager icon on the Windows desktop, then select the File > Wizard "New Project" menu command if the wizard does not start automatically.

In the preview , you can toggle the view of the project structure being created on and off.

To move to the next dialog box, click Next.

The S7 program comprises all the blocks with the programs necessary for controlling the machine

The SIMATIC station and the CPU contain the configuration and parameter data of the hardware

Within the project, data are stored in the form of objects in a hierarchical structure

STEP 7 Getting Started C79000-P7076-C48-01 2-

The SIMATIC Manager

For the "Getting Started" sample project, select CPU 314. The example has been created in such a way that you can actually select the CPU you have been supplied with at any time.

The default setting for the MPI address is 2.

Click Next to confirm the settings and move to the next dialog box.

Select the organization block OB1 (if this is not already selected).

Select one of the programming languages: Ladder Logic (LAD) , Statement List (STL) , or Function Block Diagram (FBD).

Confirm your settings with Next.

Every CPU has certain properties; for example, regarding its memory configuration or address areas. This is why you have to select the CPU before you start programming. The MPI address (multipoint interface) is required in order for your CPU to communicate with your programming device or PC.

OB1 represents the highest programming level and organizes the other blocks in the S7 program. You can change the programming language again at a later date.

STEP 7 Getting Started 2-2 C79000-P7076-C48-

The SIMATIC Manager

2.2 The Project Structure in the SIMATIC Manager and How

to Call the Online Help

As soon as the STEP 7 Wizard is closed, the SIMATIC Manager appears with the open project window "Getting Started." From here, you can start all the STEP 7 functions and windows.

Opening, organizing, and printing projects

Downloading the program and monitoring the hardware

The contents of the right-hand pane show the objects and other folders for the folder selected on the left

Editing blocks and inserting program components Setting the window display and arrangement, selecting the language, and making settings for process data

The contents of the left-hand pane show the project structure

Calling the STEP 7 online help

STEP 7 Getting Started 2-4 C79000-P7076-C48-

The SIMATIC Manager

Calling the Help on STEP 7Calling the Help on STEP 7

F1F1 Option 1:Option 1: Place the cursor on any menu command and press the F1 key. The context-sensitive help for the selected menu command will appear.

Place the cursor on any menu command and press the F1 key. The context-sensitive help for the selected menu command will appear.

Option 2: Use the menu to open the STEP 7 online help. The contents page with various help topics appears in the left-hand pane and the selected topic is displayed in the right-hand pane. Navigate to the topic you want by clicking the + sign in the Contents list. At the same time, the contents of the selected topic are displayed in the right-hand pane. Using Index and Find , you can enter search strings and look for the specific topics you require.

Option 3: Click on the "Start page" icon in the STEP 7 Online Help to open the information portal. This portal provides compact access to major topics of the Online Help, e.g.:

  • Getting Started with STEP 7
  • Configuring & Programming
  • Testing & Debugging
  • SIMATIC on the Internet

Option 4: Click on the question mark button in the toolbar to turn your mouse into a help cursor. The next time you click on a specific object, the online help is activated.

STEP 7 Getting Started C79000-P7076-C48-01 2-

3 Programming with Symbols

3.1 Absolute Addresses

Every input and output has an absolute address predefined by the hardware configuration. This address is specified directly; that is, absolutely. The absolute address can be replaced by any symbolic name you choose.

SF BATF DC 5V FRCE RURUN ONOFF STOPM RES

RUN N P STOP

0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 4 5 6 7 0 1 2 3 6 7

4 5 0 1 2 3 4 5 6 7

L+

L+

M

N

L+ M

M ML+

Digital output module

Digital input module Byte 0^ Byte 4 Bits 0 to 7^ Bits 0 to 7

Digital input module Byte 1 Bits 0 to 7

Digital output module Byte 5 Bits 0 to 7

Absolute address: I 1.

Input Byte 1 Bit 5

You should only use absolute programming if you do not have to address many inputs and outputs in your S program.

STEP 7 Getting Started C79000-P7076-C48-01 3-

Programming with Symbols

3.2 Symbolic Programming

In the symbol table, you assign a symbolic name and the data type to all the absolute addresses which you will address later on in your program; for example, for input I 0.1 the symbolic name Key 1. These names apply to all parts of the program and are known as global variables. Using symbolic programming, you can considerably improve the legibility of the S7 program you have created.

Working with the Symbol Editor

Navigate in the project window "Getting Started" until you reach S7 Program (1) and double-click to open the Symbols component.

Your symbol table currently only consists of the predefined organization block OB1.

Click Cycle Execution and overwrite it with "Main Program" for our example.

Enter "Green Light" and "Q 4.0" in row 2. The data type is added automatically.

Click in the comment column of row 1 or 2 to enter a comment on the symbol. You complete your entries in a row by pressing Enter , which then adds a new row.

Enter "Red Light" and "Q 4.1" in row 3 and press Enter to complete the entry.

In this way, you can assign symbolic names to all the absolute addresses of the inputs and outputs which your program requires.

STEP 7 Getting Started 3-2 C79000-P7076-C48-