03.12.2012 Views

SIMATIC Industral Software - Tools for configuring and programming ...

SIMATIC Industral Software - Tools for configuring and programming ...

SIMATIC Industral Software - Tools for configuring and programming ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

STEP 7 Basis<br />

Structured <strong>programming</strong><br />

STEP 7 Basis is the universal <strong>programming</strong> software <strong>for</strong><br />

<strong>configuring</strong> <strong>and</strong> <strong>programming</strong> <strong>SIMATIC</strong> controllers.<br />

The software supports the user throughout all phases of<br />

automation solutions – from the creation process to plant<br />

failure diagnostics.<br />

The essential characteristic of <strong>SIMATIC</strong> software <strong>and</strong> there<strong>for</strong>e<br />

– in addition to STEP 7 Basis – STEP 7 Professional is its clear<br />

structure.<br />

In the case of comprehensive programs, it is recommended<br />

<strong>and</strong> sometimes necessary to divide the program into individual<br />

program sections. The program sections should be program<br />

parts that are self-contained <strong>and</strong> that have a technological or<br />

functional correlation. These program parts are called program<br />

blocks. A block is a part of the user program that is defined<br />

by its function, structure or application.<br />

Elements of a user program<br />

User programs consist of the following elements:<br />

■ Organization blocks (OB)<br />

Organization blocks determine the structure of user programs.<br />

They represent the interface between the operating<br />

system <strong>and</strong> user program. They control the start-up behavior<br />

of the automation system, cyclic <strong>and</strong> interrupt-driven<br />

program execution <strong>and</strong> fault h<strong>and</strong>ling.<br />

■ Function blocks (FB), Functions (FC)<br />

- Function blocks are code blocks which contain the actual<br />

program. They have an assigned data block in which the<br />

input <strong>and</strong> output parameters as well as static data are<br />

stored. Thus the FBs can maintain the processed values<br />

throughout several cycles.<br />

- Functions have no assigned data block; when called, they<br />

always require current input values. They supply their<br />

function result after every call.<br />

- FBs <strong>and</strong> FCs can be self-programmed. The display of selfprogrammed<br />

blocks can also be suppressed. This is of<br />

interest, <strong>for</strong> example, to machine manufacturers to<br />

protect their know-how. FBs <strong>and</strong> FCs are there<strong>for</strong>e represented<br />

as blackboxes, since the user does not need to<br />

know how their functions were implemented.<br />

Libraries with special, pre-generated blocks that only<br />

need to be interconnected, are available as an option,<br />

<strong>for</strong> example, IEC functions, controllers <strong>and</strong> blocks <strong>for</strong><br />

converting <strong>SIMATIC</strong> S5 <strong>and</strong> 505 programs.<br />

6 St<strong>and</strong>ard tools<br />

Savings potential<br />

■ Even comprehensive programs can be programmed in<br />

a clear manner.<br />

■ Third parties that access structured programs <strong>for</strong><br />

service, maintenance or a later modification are better<br />

able to underst<strong>and</strong> <strong>and</strong> work with the program.<br />

Program testing may be per<strong>for</strong>med in steps.<br />

■ Program sections can be st<strong>and</strong>ardized <strong>and</strong> re-used.<br />

■ Data blocks (DBs)<br />

Data blocks are data storage areas that contain user data.<br />

They can be assigned to individual function blocks or the<br />

complete project.<br />

■ System functions (SFCs) <strong>and</strong> system function<br />

blocks (SFBs)<br />

Some functions that are repeatedly required are integrated<br />

into the operating system of the S7-CPUs <strong>and</strong> can be called<br />

from there. Some of these functions are, <strong>for</strong> example, communication<br />

functions, clock functions <strong>and</strong> operating hours<br />

counter, or the transfer of data records. The system<br />

functions/system function blocks are supplied as a library<br />

with STEP 7 <strong>for</strong> offline <strong>programming</strong>.<br />

Structure of a user program

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!