-
Preface, Contents
Product Overview 1
Installation and Authorization 2Designing a Sequential
ControlSystem Based on the Exampleof a Drill
3
Working with an S7 Graph 4
Creating a Project 5Programming the Structure of aSequencer
6Programming Actions andConditions 7
Saving and Compiling 8S7 Graph FB ParameterAssignment and Call
9Downloading the S7 Graph-FBand Instance-DB 10Monitoring and
Testing theSequential Control System 11
Printing the Sequencer 12
Overview of all Actions 13
Configuration Instructions 14
Instance DB 15Glossary, Index
SIMATIC
S7 Graph V5.1 for S7-300/400Programming SequentialControl
Systems
Manual
This manual has the order number:6ES7 811-0CC04-8BA0
Edition 05/2001A5E00105265-01
-
Copyright Siemens AG 2001 All rights reservedThe reproduction,
transmission or use of this document or itscontents is not
permitted without express written authority.Offenders will be
liable for damages. All rights, including rightscreated by patent
grant or registration of a utility model or design,are
reserved.
Siemens AGBereich Automatisierungs- und
AntriebstechnikGeschaeftsgebiet
Industrie-AutomatisierungssystemePostfach 4848, D- 90327
Nuernberg
Disclaimer of LiabilityWe have checked the contents of this
manual for agreement withthe hardware and software described. Since
deviations cannot beprecluded entirely, we cannot guarantee full
agreement. However,the data in this manual are reviewed regularly
and any necessarycorrections included in subsequent editions.
Suggestions forimprovement are welcomed.
Siemens AG 2001Technical data subject to change.
Siemens Aktiengesellschaft 6ES7 811-0CC04-8BA0
Safety Guidelines
This manual contains notices intended to ensure personal safety,
as well as to protect the products andconnected equipment against
damage. These notices are highlighted by the symbols shown below
andgraded according to severity by the following texts:
! Dangerindicates that death, severe personal injury or
substantial property damage will result if properprecautions are
not taken.
! Warningindicates that death, severe personal injury or
substantial property damage can result if properprecautions are not
taken.
! Cautionindicates that minor personal injury can result if
proper precautions are not taken.Cautionindicates that property
damage can result if proper precautions are not taken.
Noticedraws your attention to particularly important information
on the product, handling the product, or to aparticular part of the
documentation.
Qualified Personnel
Only qualified personnel should be allowed to install and work
on this equipment. Qualified persons aredefined as persons who are
authorized to commission, to ground and to tag circuits, equipment,
andsystems in accordance with established safety practices and
standards.
Correct Usage
Note the following:
! WarningThis device and its components may only be used for the
applications described in the catalog or thetechnical description,
and only in connection with devices or components from other
manufacturerswhich have been approved or recommended by
Siemens.
This product can only function correctly and safely if it is
transported, stored, set up, and installedcorrectly, and operated
and maintained as recommended.
TrademarksSIMATIC, SIMATIC HMI and SIMATIC NET are registered
trademarks of SIEMENS AG.
Third parties using for their own purposes any other names in
this document which refer to trademarks mightinfringe upon the
rights of the trademark owners.
-
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 iii
Preface
Purpose of the ManualThis manual provides you with a complete
overview of programming withS7 Graph. It supports you during the
installation and setting up of the software. Itincludes
explanations of how to create a program, the structure of user
programs,and the individual language elements.The manual is
intended for persons with the appropriate qualifications who
areinvolved in programming, configuration, commissioning, and
service ofprogrammable logic controllers.We recommend that you
familiarize yourself with the example in Chapter 3"Designing a
Sequential Control System Based on the Example of a Drill". This
willhelp you to get to know S7 Graph quickly.
Required ExperienceTo understand the manual, you should have
general experience of automationengineering.You should also be
familiar with working on computers or PC-type machines (forexample
programming devices with the Windows 95/98/2000 or NT
operatingsystems. Since S7 Graph uses the STEP 7 platform, you
should also be familiarwith working with the standard software
described in the "Programming withSTEP 7 V5.1" manual.
Scope of the ManualThe manual is valid for the S7 Graph V5.1
software package.
05.04.2001
-
Preface
S7 Graph for S7-300/400 Programming Sequential Control Systemsiv
A5E00105265-01
Documentation Packages for S7 Graph and the STEP 7 Standard
SoftwareThe following table provides you with an overview of the
STEP 7 and S7 Graphdocumentation:
Manuals Purpose Order NumberS7-SCL V5.1 for S7-300/400 Basic and
reference information
explaining how to create aprogram, the structure of userprograms
and the individuallanguage elements.
6ES7 811-0CC04-8BA0
Basics of STEP 7: Getting Started and Exercises with
STEP 7 V5.1 Programming with STEP 7 V5.1 Configuring Hardware
and
Connections withSTEP 7 V5.1
Converting from S5 to S7
The basics for technicalpersonnel describing how toimplement
control tasks withSTEP 7 and S7-300/400.
6ES7810-4CA05-8BA0
STEP 7 reference: LAD/FBD/STL manuals
for S7-300/400 Standard and System Functions
for S7-300/400
Reference work describing theLAD, FBD and STL
programminglanguages as well as standardand system functions as
asupplement to the STEP 7 basics.
6ES7810-4CA05-8BR0
05.04.2001
-
Preface
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 v
Manual and Online HelpThis manual is an extract from the Online
Help. The manual describes the basicknowledge you require to work
with S7 Graph. The online help contains detailed,step-by-step
instructions and reference sections. Since the manual and online
helphave the same structure, you can change easily between manual
and online help.
Access to Online HelpThe help system is integrated in the
software with several interfaces: The Help menu provides numerous
menu commands: Contents opens the
contents of the S7 Graph help system. Introduction provides an
overview ofprogramming with S7 Graph. Using Help provides detailed
instructions onworking with the online help system.
The context-sensitive help system provides information about the
currentcontext, for example help on an open dialog box or active
window. This can bedisplayed by clicking the "Help" button or
pressing the F1 key.
The status bar is another form of context-sensitive help. A
brief explanation ofeach menu command is displayed here when you
position the mouse pointeron a menu command.
A brief explanation of the buttons in the toolbar is also
displayed if you positionthe mouse pointer briefly over a
button.
If you prefer to have a printout of the information in the
online help system, you canprint individual topics, books or the
entire help system.
Documentation Reply FormTo provide you and future S7 Graph users
with the best possible documentation,we need your support. If you
have comments about this manual or the online help,please fill out
the questionnaire at the end of this manual and send it the
addressshown. Please take the time to add your own evaluation
grade.
Training CentersSiemens offers a number of training courses to
familiarize you with the SIMATICS7 automation system. Please
contact your regional training center or our centraltraining center
in D 90327 Nuremberg, Germany for details:Telephone: +49 (911)
8953200.http://www.ad.siemens.de/training
05.04.2001
-
Preface
S7 Graph for S7-300/400 Programming Sequential Control Systemsvi
A5E00105265-01
SIMATIC Documentation on the Internet / IntranetYou will find
the documentation on the internet
at:http://www.ad.siemens.de/supportUse the Knowledge Manager to
find the documentation you need quickly. If youhave any questions
or suggestions concerning the documentation you can use
the"Documentation" conference in the internet forum.Visit the
SIMATIC documentation homepage. Here you can find out about
newproducts and innovations, ask questions concerning the
documentation and giveus your suggestions, criticism, praise or
requests.http://intra1.khe.siemens.de/e8_doku/index.htm
05.04.2001
-
Preface
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 vii
Automation and Drives, Service & SupportAvailable worldwide,
around the clock:
Johnson City
Nuremberg
Singapore
SIMATIC Basic Hotline
Worldwide (Nuremberg)Technical Support
Worldwide (Nuremberg)Technical Support
(Free Contact)Local time: Mo.-Fr. 7:00 to 17:00Phone: +49 (180)
5050 222Fax: +49 (180) 5050 223E-mail: techsupport@
ad.siemens.deGMT: +1:00
(charged, only withSIMATIC Card)Local time: Mo.-Fr. 0:00 to
24:00Phone: +49 (911) 895-7777Fax: +49 (911) 895-7001GMT:
+01:00
Europe / Africa (Nuremberg)Authorization
America (Johnson City)Technical Support andAuthorization
Asia / Australia (Singapore)Technical Support
andAuthorization
Local time: Mo.-Fr. 7:00 to 17:00Phone: +49 (911) 895-7200Fax:
+49 (911) 895-7201E-mail: authorization@
nbgm.siemens.deGMT: +1:00
Local time: Mo.-Fr. 8:00 to 19:00Phone: +1 423 461-2522Fax: +1
423 461-2289E-mail: simatic.hotline@
sea.siemens.comGMT: -5:00
Local time: Mo.-Fr. 8:30 to 17:30Phone: +65 740-7000Fax: +65
740-7001E-mail: simatic.hotline@
sae.siemens.com.sgGMT: +8:00
German and English are spoken on all the SIMATIC hotlines,
French, Italian and Spanish are also spoken on theauthorization
hotline.
05.04.2001
-
Preface
S7 Graph for S7-300/400 Programming Sequential Control
Systemsviii A5E00105265-01
Service & Support on the InternetIn addition to our
documentation, we offer our Know-how online on the internet at:
http://www.ad.siemens.de/supportwhere you will find the
following: Current Product Information leaflets, FAQs (Frequently
Asked Questions),
Downloads, Tips and Tricks. A newsletter giving you the most
up-to-date information on our products. The Knowledge Manager helps
you find the documents you need. Users and specialists from all
over the world share information in the forum. Your local customer
service representative for Automation & Drives in our
customer service representative data bank. Information on field
service, repairs, spare parts and more under "Services".
05.04.2001
-
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 ix
Contents
1 Product Overview1.1 Whats New?
.....................................................................................................1-4
2 Installation and Authorization2.1 Authorization
.....................................................................................................2-12.2
Installing the Authorization
................................................................................2-32.3
Upgrading the
Authorization..............................................................................2-42.4
Uninstalling the
Authorization............................................................................2-52.5
Rules for Handling
Authorizations.....................................................................2-62.6
Installing S7
Graph............................................................................................2-82.7
Uninstalling S7 Graph
.....................................................................................2-10
3 Designing a Sequential Control System Based on the Example of
a Drill3.1 Technological Task and Functional
Diagram....................................................3-33.2
Selecting the Structure of the Sequencer
.........................................................3-53.3
Defining the System Signals
.............................................................................3-73.4
Creating the Drill Project in the SIMATIC Manager
..........................................3-83.5 Creating a Symbol
Table...................................................................................3-93.6
Creating an S7 Graph FB and Programming a Sequencer
............................3-103.7 Programming Step Actions
.............................................................................3-123.8
Programming Transitions
................................................................................3-133.9
Programming Monitoring Functions
................................................................3-153.10
Specifying the Standard Function Block
.........................................................3-163.11
Saving and Closing the
Sequencer.................................................................3-173.12
Including the Sequencer in the STEP 7 Program
...........................................3-183.13 Downloading the
Program to the CPU and Testing the Sequencer
...............3-203.14 Test Function: Control Sequencer
..................................................................3-213.15
Modifying the Sequencer
................................................................................3-22
4 Working with an S7 Graph4.1 Starting S7 Graph
.............................................................................................4-14.2
The S7 Graph User
Interface............................................................................4-24.3
Settings for the Work
Area................................................................................4-84.4
Customizing a Display Level, Colors and Fonts
.............................................4-104.5 Tools for
Editing the
Sequencer......................................................................4-134.5.1
Display and Position of the Toolbars
..............................................................4-134.5.2
Editing the Sequencer with the Toolbars
........................................................4-144.5.3
Navigating in the Sequencer
...........................................................................4-15
05.04.0105.04.200105.04.2001
-
Contents
S7 Graph for S7-300/400 Programming Sequential Control Systemsx
A5E00105265-01
5 Creating a Project5.1 Creating the Project in the SIMATIC
Manager..................................................5-15.2 S7
Graph FB or S7 Graph Source File?
...........................................................5-25.3
S7 Graph FB
.....................................................................................................5-35.4
S7 Graph Source
File........................................................................................5-35.5
Opening an S7 Graph FB or an S7 Graph Source
File.....................................5-4
6 Programming the Structure of a Sequencer6.1 Sequencer -
Principle........................................................................................6-26.2
Structures of a Sequencer
................................................................................6-36.3
Rules for the Structure of a
Sequencer.............................................................6-46.4
Elements of a
Sequencer..................................................................................6-56.5
Step-Transition Pair and Initial
Step..................................................................6-56.6
Jump..................................................................................................................6-66.7
Alternative
Branch.............................................................................................6-76.8
Simultaneous Branch
........................................................................................6-86.9
Branch
Stop.......................................................................................................6-96.10
New
Sequencer.................................................................................................6-96.11
Permanent Instructions
...................................................................................6-106.12
Block
Comment...............................................................................................6-11
7 Programming Actions and Conditions7.1
Actions...............................................................................................................7-37.2
Standard
Actions...............................................................................................7-47.3
Event-Dependent Actions
.................................................................................7-67.4
Counters, Timers, and Arithmetic in
Actions.....................................................7-97.5
Conditions
.......................................................................................................7-147.6
Ladder Logic Elements for Programming Conditions
.....................................7-187.7 Logic Operations with
Ladder Logic
Elements................................................7-207.8 FBD
Elements for Programming Conditions
...................................................7-227.9 S7 Graph
Addresses in
Conditions.................................................................7-257.10
Supervision Errors and Acknowledgment
.......................................................7-267.11
Comment, Extended Name, Number, Name
..................................................7-287.12
Programming with Symbolic Addresses
.........................................................7-297.13
Editing Variables
.............................................................................................7-30
8 Saving and Compiling8.1 Saving and Compiling
.......................................................................................8-18.2
Rules for Saving an S7 Graph
FB.....................................................................8-28.3
Rules for Saving an S7 Graph Source File
.......................................................8-28.4
Settings for Saving and Compiling
....................................................................8-38.4.1
Settings in the "General"
Tab............................................................................8-48.4.2
Settings in the "Compile/Save" Tab: FB
Parameters........................................8-68.4.3 Settings
in the "Compile/Save" Tab:
Executability............................................8-78.4.4
Settings in the "Compile/Save" Tab: Interface
Description...............................8-88.4.5 Settings in the
"Compile/Save" Tab: Sequencer Properties
.............................8-98.4.6 Settings in the
"Compile/Save" Tab:
Warnings...............................................8-108.4.7
Settings in the "Messages" Tab
......................................................................8-108.5
Saving
.............................................................................................................8-118.6
Compiling
........................................................................................................8-14
05.04.0105.04.200105.04.2001
-
Contents
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 xi
9 S7 Graph FB Parameter Assignment and Call9.1 Calling the S7
Graph FB in the S7
Program.....................................................9-19.2
Calling the S7 Graph FB
...................................................................................9-29.3
Selecting an FB Parameter
Set.........................................................................9-39.4
Parameter Sets of the
FB..................................................................................9-49.5
Input Parameters of the S7 Graph FB
..............................................................9-69.6
Output Parameters of the S7 Graph
FB............................................................9-99.7
The Modes of the Sequential Control System
................................................9-109.7.1 Automatic
Mode
(SW_AUTO).........................................................................9-119.7.2
Manual mode (SW_MAN)
...............................................................................9-129.7.3
Inching mode (SW_TAP)
................................................................................9-139.7.4
Automatic or Switch to Next Mode (SW_TOP)
...............................................9-149.7.5 Selecting
a Step with S_SEL
..........................................................................9-159.7.6
Selecting a Step with S_PREV or
S_NEXT....................................................9-159.7.7
Progressing to the next Step with
T_PUSH....................................................9-16
10 Downloading the S7 Graph-FB and Instance-DB10.1 Downloading
Blocks from the Programming Device to the
CPU....................10-110.2 Uploading Blocks from the CPU to
the Programming Device.........................10-3
11 Monitoring and Testing the Sequential Control System11.1
Monitoring and Test Functions in the S7 Graph
.............................................11-211.1.1 Monitoring
the Status Information
...................................................................11-211.1.2
Control Sequencer
..........................................................................................11-411.1.3
Synchronization...............................................................................................11-411.2
Test Functions of STEP 7
...............................................................................11-5
12 Printing the Sequencer
13 Overview of all Actions13.1 Standard Actions with and without
Interlock
...................................................13-113.2
Event-Dependent Actions - with and without Interlock
...................................13-213.3 Counters in Actions
.......................................................................................13-1013.4
Timers in
Actions...........................................................................................13-1613.5
Arithmetic in
Actions......................................................................................13-22
14 Configuration Instructions14.1 General Level and Program
Structure
............................................................14-214.2
Points to Note about Programming
Sequencers.............................................14-814.3
Linking to Operator Control and Monitoring Systems
...................................14-12
05.04.0105.04.200105.04.2001
-
Contents
S7 Graph for S7-300/400 Programming Sequential Control
Systemsxii A5E00105265-01
15 Instance DB15.1 Settings for the Instance DB
...........................................................................15-115.2
Assignment of Instance DB and S7 Graph
FB................................................15-215.3
Automatic Creation of the Instance DB on
Saving..........................................15-315.4 Creating
the Instance DB
Later.......................................................................15-315.5
Displaying and Printing the Content of the Instance
DB.................................15-315.6 Accessing the Instance
DB
.............................................................................15-415.7
Structure of an Instance
DB............................................................................15-415.8
Outline of the Structure of the Instance DB
....................................................15-415.9 FB
Parameters
................................................................................................15-515.10
The Transition
Structure..................................................................................15-915.11
The Step Structure
........................................................................................15-1115.12
Sequencer
Status..........................................................................................15-1315.13
Internal Data Area
.........................................................................................15-18
Glossary
Index
05.04.0105.04.200105.04.2001
-
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 1-1
1 Product Overview
S7 Graph Programming LanguageThe S7 Graph programming language
extends the range of functions of STEP 7 byallowing you to program
sequential control systems graphically.With S7 Graph, you can
configure and write programs to control sequentialprocesses with a
SIMATIC programmable logic controller (PLC). The process isdivided
into single steps with a clearly defined range of functions. The
processsequence is represented graphically and can be documented
both as graphics andtext.
In the steps, you specify the actions to be executed. The
progression from one stepto the next is controlled by transitions
(step enabling conditions). The definitions,interlocks and
monitoring of the transitions are programmed using a subset of
theLadder Logic (LAD) or FBD (Function Block Diagram) programming
languages.S7 Graph for the S7-300/400 complies with the sequential
control language"Sequential Function Chart" specified in the DIN EN
61131-3 (IEC 1131-3)standard.
05.04.0105.04.200105.04.2001
-
Product Overview
S7 Graph for S7-300/400 Programming Sequential Control
Systems1-2 A5E00105265-01
The Blocks of a Sequential Control SystemA sequential control
system controls the process in a fixed order dependent oncertain
conditions.The complexity of the sequential control system depends
on the automation task.However, even the simplest system requires
at least the three following blocks: A STEP 7 block (1) in which
the S7 Graph FB (function block) is called. This
block can be an organization block (OB), a function (FC), or
another FB. An S7 Graph FB (2) that describes the individual
subtasks and
interdependencies of the sequential control system. These
subtasks (steps)and interdependencies (transitions) can be
organized in one or moresequencers.
An instance DB (3) that contains data and parameters of the
sequential controlsystem. The instance DB is assigned to the S7
Graph FB and can be createdautomatically by the system.
OB/FB/FC
FC70/71/72
T2
T1S2
S1
Comments for...
FB i(1)
CALL FBi,DBiINIT_SQ:=
(2) (3)
DB i
05.04.0105.04.200105.04.2001
-
Product Overview
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 1-3
Section of a Sequencer with Steps and TransitionsYou program
sequencers in the S7 Graph FB. A sequencer consists of a sequenceof
steps that are activated in a fixed order depending on transitions
(step-enablingconditions).
Motor Limit switch
S1Step1
T1
Step1Action
S2Step2
Step2Action
T2
Input1 Input2
Conditions
Action
Transition1
Transition2
Conditions
05.04.0105.04.200105.04.2001
-
Product Overview
S7 Graph for S7-300/400 Programming Sequential Control
Systems1-4 A5E00105265-01
1.1 Whats New?Version 5.1 of the S7 Graph programming software
has the following extendedfunctions and modifications compared with
Version 5.0:
PLCopen Basis LevelS7 Graph V5.1 complies with the PLCopen Basis
Level for sequential controlsystems as stipulated in the DIN EN
61131-3 standard.If you have a sequential control system that
conforms with the standard, you cannow import it into the STEP 7
data management as an ASCII file using theSIMATIC Manager and then
edit it in S7 Graph.To create sequential control systems complying
with the standard, select the"Application Settings" dialog box and
activate the "IEC-compliant" in the "General"tab.
Compiler Expansions Minimizing the memory requirements for the
S7 Graph FB
You can reduce the memory required by the S7 Graph FB
considerably byselecting the compilation option "Interface
Description: Memory minimized" andusing the new standard function
FC73.
Safe activation mode:There is now a new compilation option known
as "Safe activation mode". Thishas the effect that when a step is
activated, the system locates and deactivatesall steps that cannot
be active at the same time as the step being activated dueto the
sequencer structure.
Checking the standard functions used:When you compile, the
compiler checks whether the FC used is adequate toexecute the
functions used in the sequencer. If the FC is not adequate,
acompilation error is indicated.
Expanded block information:When you compile a block, the
compiler checks whether the block uses theextended functionality of
the current S7 Graph version or only the restrictedfunctionality
from previous versions. You can see this information in the
fileproperties (menu command File > Properties).
05.04.0105.04.200105.04.2001
-
Product Overview
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 1-5
Improved Editor Functions Optimization of the display
You can choose between three types of display:- At the sequencer
display level, one of the sequencers contained in the FB
is displayed. Here you program the sequencer structure. As
required, youcan display or hide actions and conditions.
- At the single step display level, one step and its successor
transition aredisplayed. Here, programming actions and
conditions
- The third display level allows you to program permanent
instructions. Improved window structure:
The S7 Graph working window now contains only the sequencer you
areediting. All "additional information" required for programming
are displayed inadditional windows that you can display or hide as
required:- Information on the block interface (block parameters and
variables)- Addresses used- Cross-references to other points of use
of addresses in the program- Symbols from the symbol table,
etc.
Simultaneous selection of several objects:You can now select
several objects in the working area using the techniquestypical in
all Windows applications:- You select a group of elements by
dragging a lasso around the required
elements.
- If elements are not located next to each other, you can select
them byholding down the CTRL key and clicking the required elements
one afterthe other.
Once you have selected several elements, you can perform actions
on all ofthem together, for example moving them to a different
location with the mouse.
User-friendly address selection when programming actionsYou can
display a list of the addresses used up to now in the program
andselect the required address from the list.
You can now also delete branches of a sequencer as long as they
are notlocated exclusively in the right branch of a simultaneous or
alternative branch.
You can now replace LAD or FBD elements in conditions in the
overwritemode.
You can now close branches simply with the mouse: Hold down the
mousebutton and move the mouse pointer to the location at which you
want to closethe branch.
Opening blocks used in actions:The block used in the action
table of a step can be opened with the relevanteditor by selecting
and double-clicking it. It is also possible to open the blockwith
the relevant editor by selecting the block in the action table and
thenselecting the new menu command Edit > Open Block.
05.04.0105.04.200105.04.2001
-
Product Overview
S7 Graph for S7-300/400 Programming Sequential Control
Systems1-6 A5E00105265-01
Other New Features New system function: FC73
A new system function is supplied with the package allowing you
to reduce thememory requirements of the S7 Graph FB considerably.
Due to its size of lessthan 8 Kbytes, FC73 can also be processed by
smaller CPUs.FC73 provides the functionality of S7 Graph V5.0.
However, the followingrestrictions apply: The blocks created do not
have diagnostic capability.Visualization of the blocks is also
restricted.
New versions of FC70/FC71S7 Graph blocks that use arithmetic or
word instructions in actions can now beoperated with the FC70 and
FC71 system functions.
Setting the address priorityIn the SIMATIC Manager, you can
decide whether the symbol or the absolutevalue has priority when
blocks are opened following modifications in thesymbol table. This
setting is possible from STEP 7 V5.0 onwards, it alsoapplies to S7
Graph blocks from S7 Graph V5.1 onwards.
Limiting the maximum number of status jobs usedYou can also
specify the maximum number of status jobs for S7 Graph. Youmake
this setting in the "General" tab (application settings). Limiting
thenumber of status jobs can be useful if you are working with a
smaller CPU andwant a status display for several applications at
the same time.
05.04.0105.04.200105.04.2001
-
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 2-1
2 Installation and Authorization
2.1 AuthorizationA product authorization is required to use the
S7 Graph software package.Software protected by this mechanism can
only be used when the authorizationrequired by the program or
software package is detected on the hard disk of theprogramming
device.Different authorizations are necessary, for example for STEP
7 and for the optionalpackages.
Authorization DisketteTo authorize the product, you require the
copy-protected authorization disketteshipped with the package. This
contains the actual authorization. The "AuthorsW"program required
to display, install, and uninstall the authorization is on
theinstallation CD-ROM that also contains S7 Graph.
Number of AuthorizationsThe number of possible authorizations
depends on an authorization counter on theauthorization diskette.
When you install an authorization, the counter isdecremented by 1.
Once the counter reaches the value 0, there are no
moreauthorizations on the diskette.
NoteYou receive a yellow authorization diskette for the STEP 7
standard software witha corresponding authorization. You do not
need an authorization for STEP 7 Mini.With each optional software
package, you receive a red authorization diskettecontaining one
authorization.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
Systems2-2 A5E00105265-01
Loss of the Authorization...You can lose an authorization, for
example, due to a defect on the hard disk thatprevents you from
uninstalling the authorization from the defective hard disk.If you
lose the authorization, you can use the emergency authorization.
This is alsoon the authorization diskette. The emergency
authorization allows you to continueto use the software for a
restricted time. In this case, when you start S7 Graph, thetime
until the authorization expires is displayed. Before this time
expires, youshould obtain a replacement for the lost authorization
from your Siemens distributoror sales office.
CautionThe restricted period of the emergency authorization
begins from the moment youinstall it, even if you do not start S7
Graph. You cannot extend this period even bytransferring the
authorization back to the diskette.
Installing AuthorsWThe "AuthorsW" program required to display,
install, and uninstall the authorizationis on the same CD-ROM as S7
Graph V5.0. You can install this program on yourhard disk and start
it there when you want to install and uninstall authorizations.
NoteThe default location for the AuthorsW program is the
AuthorsW folder and you canstart it from the taskbar (START >
SIMATIC > AuthorsW > AuthorsW).
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 2-3
2.2 Installing the Authorization
Handling the Authorization During InstallationYou should
transfer the authorization when prompted by Setup when you
installS7 Graph for the first time. Follow the steps below:1.
Insert the authorization diskette when Setup asks you for it.2.
Then confirm the next prompt.3. The authorization is transferred to
a physical drive.
Installing the Authorization LaterIf you start the S7 Graph
software and there is no authorization on your system, amessage to
this effect is displayed. To install the authorization at a later
point intime:
1. Insert the authorization diskette in your floppy disk drive,
for example, drive A.2. Start the "Authorsw.exe" program on the
hard disk drive.3. Select drive A:\. The authorizations on the
authorization diskette are displayed.4. Select the full
authorization for S7 Graph (validity: unlimited).5. Holding down
the left mouse button, drag the selected authorization to the
destination drive. The authorization is transferred to the
destination drive.
CautionThe authorization is effective in Windows NT only when
full access to both harddisk "C:" and the source drive is
possible.
Recovering the AuthorizationIf you have a problem with your
authorization (defective etc.), please contact thehotline. If a
problem occurs, it may be possible to avoid loss of the
authorizationusing the menu command Authorization > Recover.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
Systems2-4 A5E00105265-01
2.3 Upgrading the AuthorizationUse the "Upgrade" menu command to
upgrade authorizations. To use this function,you require:1. The
authorization diskette of the authorization you want to upgrade2.
The latest version of the "AuthorsW" authorization program on the
hard disk3. The new S7 Graph upgrade on diskette4. The old
authorization on diskette or hard diskWhen you upgrade, the old
authorizations are deleted and replaced by new ones.For this
reason, the authorization diskette must never be made read-only.1.
Insert the new authorization diskette.2. Start the "Authorsw.exe"
program on the hard disk drive.3. Select the menu command
Authorization > Upgrade. A dialog box is opened.
Select the upgrade program in the dialog box. You will then be
asked to insertthe authorization diskette of the old
authorization.
4. Insert the required authorization diskette. You will then be
asked whether youreally want to upgrade. This is the last
opportunity to cancel the upgrade. Afteryou confirm this prompt, do
not interrupt the upgrade procedure under anycircumstances
otherwise you will lose the authorization.
5. After clicking the OK button, you will be prompted to insert
the authorizationdiskette with the new authorization.
All the necessary requirements are checked. If these
requirements are met, theupgrade is completed by activating the new
authorization.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 2-5
2.4 Uninstalling the AuthorizationIf, for example, you want to
reformat the hard disk containing the authorization, youmust first
transfer the authorizations back to the authorization diskette
(uninstall).You require the yellow original authorization diskette
of the STEP 7 standardsoftware. You can also transfer the
authorizations of the optional packages you areusing back to this
authorization diskette.To transfer the authorization back to the
authorization diskette:1. Insert the yellow original authorization
diskette in your floppy disk drive, for
example, drive A.2. Start the "Authorsw.exe" program on the hard
disk drive.3. Select the drive on which your authorization is
located. All the authorizations
found on this drive are displayed.4. Select the relevant
authorization.5. Holding down the left mouse button, drag the
selected authorization to drive
A:\. The authorization is transferred to the authorization
diskette.6. Close the dialog box if you do not want to remove any
further authorizations.
You can use this diskette again to install the
authorization.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
Systems2-6 A5E00105265-01
2.5 Rules for Handling Authorizations
CautionRead the instructions in this section and in the
README.WRI file on theauthorization diskette. If you do not keep to
the instructions in this file, you maydestroy the
authorization.
When is it necessary to uninstall authorizations?Before you
format, compress, or restore your hard disk drive, or before you
install anew operating system, you must first uninstall existing
authorizations.
BackupIf a backup of your hard disk contains copies of your
authorizations, there is a riskthat the valid, installed
authorizations will be overwritten and destroyed when youwrite the
backup data to the hard disk.To avoid loss of the authorization by
overwriting an authorized system with abackup: Either remove all
authorizations before you make your backup Or exclude the
authorizations from the backup.
Hard Disk OptimizationIf you use an optimization program that
allows fixed blocks to be moved on thehard disk, you should only
use this function after first transferring all authorizationsfrom
the hard disk back to the authorization diskette.
Defective SectorsAfter installing an authorization, a special
cluster is created on the hard disk that issometimes indicated as
"defective". Do not attempt to repair this. Otherwise, youwill
destroy the authorization.
Read-Only and Copy ProtectionThe authorization diskette must not
be made read-only.Files on the authorization diskette can be copied
to a different drive (for examplehard disk) and used there. It is,
however, not possible to install an authorizationwith the copied
data; this is only possible with the original authorization
diskette.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 2-7
Permitted DrivesThe authorization can only be installed on a
hard disk drive. If you have acompressed drive (for example
DBLSPACE), you can install on its host drive.The authorization tool
prevents installation on unsuitable drives.
LocationWhen you install an authorization, the files are
transferred to the protected folder"AX NF ZZ" with the attributes
"system" and "hidden". Do not change these attributes. The files
must not be modified or deleted. The folder must not be moved.
Files copied from the folder (authorizations) are
detected as invalid authorizations and cannot be used.If you do
not keep to these rules, the authorization will be irretrievably
lost.The protected folder "AX NF ZZ" is created only once per
drive. It contains all theauthorizations installed on the drive. It
is created when you first install anauthorization and is deleted
when you remove the last authorization from it.For each
authorization, two files with the same name but with different
extensionsare created. These files are given the authorization name
as the file name.
Number of AuthorizationsYou can install any number of
authorizations on one drive providing there isenough space;
however, only one of each version (for example only one S7
GraphV4.x and only one S7 Graph V5.x). These authorizations do not
affect each other.
Defective AuthorizationDefective authorizations on a hard disk
can no longer be removed with theAuthorsW authorization tool. They
can even block the installation of new, validauthorizations. In
this case, contact your Siemens distributor or sales office.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
Systems2-8 A5E00105265-01
Authorization ToolUse the supplied or latest version of the
AuthorsW authorization tool and wherepossible avoid using older
versions.
CautionSince the supplied version does not recognize all older
authorizations, you maynevertheless need to use an older AUTHORS
version (DOS version) < V3.x.
2.6 Installing S7 GraphS7 Graph contains a Setup program that
installs the package automatically.Prompts on the screen guide you
step by step through the entire installation. TheSetup program is
started as usual when installing software in Windows.The essential
phases of installation are as follows: Copying the data to your
programming device/PC Installing the authorization (if
required)
Requirements for Installation Microsoft Windows 95/98/ME/2000 or
Windows NT as the operating system SIMATIC STEP 7 standard package
(for the required version, refer to the
Readme.wri file). PC or programming device equipped as explained
in the readme fileA programming device (PG) is a personal computer
designed specifically for use inan industrial environment. It is
fully equipped for programming SIMATICprogrammable controllers.
Disk space:
For the space required on your hard disk, refer to the "Readme".
MPI interface (optional):
You only require the MPI interface between the programming
device or PC)and PLC if you want to communicate with the PLC via
MPI. For this connectionyou require either:- a PC/MPI cable
connected to the communications port of your device or- an MPI
board installed in your device.An MPI port is integrated in some
programming devices.
External Prommer (optional):An external prommer is only required
when you want to blow EPROMs usingyour PC.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 2-9
Preparations for InstallationBefore you start the installation,
Windows must first be started.To install from CD-ROM, insert the
CD-ROM in the CD-ROM drive of your PC.
Starting the Installation ProgramTo install the software:1. In
Windows, open the dialog for installing/uninstalling programs by
double-
clicking the "Add/Remove Programs" icon in the "Control
Panel".2. Follow the instructions for installing the program step
by step.The program guides you step by step through the
installation. You can move on tothe next step or back to the
previous step.During installation, you will be prompted to answer
questions and to select options.Please read the following notes so
that you have the information you require forthese dialog
boxes.
If you already have a version of S7 Graph installed ...If the
installation program detects an S7 Graph installation on your
programmingdevice/PC, a message is displayed and you then have the
following options: Cancel the installation (you can then uninstall
the old S7 Graph version under
Windows and then start the new installation again) or Continue
the installation and overwrite the old version with the new
version.In the interests of "clean" data management, you should
uninstall an olderinstallation before installing the new version.
Simply overwriting an older versionalso has the disadvantage that
when you later uninstall the program, existing partsof the older
installation will not be removed.
Notes on AuthorizationDuring the installation, the program
checks whether an authorization already existson the hard disk. If
no authorization is found, a message appears informing youthat the
software can only be used with an authorization. You can either
install theauthorization immediately or continue the installation
and install the authorizationlater. If you decide to install
immediately, insert the authorization diskette whenprompted to.
05.04.0105.04.200105.04.2001
-
Installation and Authorization
S7 Graph for S7-300/400 Programming Sequential Control
Systems2-10 A5E00105265-01
Errors During InstallationThe following errors lead to the
installation being canceled: If an initialization error occurs
immediately after starting Setup, the most
probable reason is that Setup was not started under Windows. Not
enough space on the disk: You must have enough space on your hard
disk
for the type of installation you have selected (see readme).
Defective CD/diskette: If you discover that a CD/diskette is
defective, please
contact your Siemens distributor or sales office. If you make a
mistake: Start the installation again and follow the
instructions
carefully.
Completion of the installation ...Successful installation is
indicated by a message on the screen.If changes were made to DOS
files during installation, you will be prompted torestart Windows.
Following the restart, you can also start S7 Graph.If DOS files
were not changed, you can start S7 Graph in the last
installationdialog.
2.7 Uninstalling S7 GraphTo uninstall the software, use the
usual method under Windows:1. Under Windows, open the dialog for
installing/uninstalling programs by double-
clicking the "Add/Remove Programs" icon in the "Control
Panel".2. Select the STEP 7 entry in the list of installed
programs. Click the
"Add/Remove" button to uninstall the program.If the "Remove
Released File" dialogs appear, click the "No" button if you
areunsure whether you want to remove the file or not.
CautionThis method does not uninstall the authorization. If you
also want to uninstall theauthorization, follow the instructions in
the section on Authorization.
05.04.0105.04.200105.04.2001
-
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-1
3 Designing a Sequential Control SystemBased on the Example of a
Drill
Welcome to the S7 Graph Beginners ExampleIf you take an hour to
work through the beginners example, you will learn how tocreate a
sequential control system for automating the drill as described
below.
You first learn how to configure a sequential control system
efficiently and will thenbe guided step by step through the tasks
you need to perform in the SIMATICManager and in S7 Graph so that
you can create the sequential control system, download it to the
CPU and test it.
The correctly programmed sample is supplied with S7 Graph as a
project called"ZEn02_01_S7Graph_Drill".
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-2 A5E00105265-01
RequirementsTo allow you to program and test the "drill"
example, you require the followinghardware and software:
Programming device/PC with
- STEP 7 standard package and the S7 Graph optional package- MPI
connection to the programmable logic controller
A programmable logic controller (in our example an S7-300)
consisting of thefollowing: standard rail, 24V power supply, CPU
314, and a digital input/outputmodule (8DI + 8DO)
As an alternative to the PLC: The "PLC Simulation" S7 optional
package
Procedure for Creating a Sequential Control SystemThe flow
diagram illustrates the procedure for creating the sequential
controlsystem for the drill example:
Create symbol table
Specify structure of sequencerand define signals for system
Create drill project in theSIMATIC Manager
Create sequencer: create and open S7 Graph FB1 in
the SIMATIC Manager Program sequencer
Program OB1 with FB1 call andcorresponding instance DB (DB1)
Download sample program (DB1, FB1,OB1) to the CPU in the
SIMATICManager and test the sequencer
Symbolicprogramming
yes
no
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-3
3.1 Technological Task and Functional Diagram
TaskYou want to program a sequential control system to automate
a drill. The setup ofthe drill is shown by a technological drawing
and the process sequence in the formof a function diagram.
Technological Drawing - Set Up of the DrillThe drill consists of
the following elements: Drill motor with feedback signals for drill
running/stopped Start button and coolant switch Cooling pump with
feedback signal for coolant pressure reached Clamping device with
feedback signal for selected clamp pressure reached Carriage
raise/lower drill with limit switches for drill up/down
Raise drillDrill motor onFeedback signal:- Drill running- Drill
stopped
Cooling pump onFeedback signalCoolant pressure reached
Start button
Feedback signal:Selected clamping pressurereached
Limit switch:Drill up
Limit switch:Drill down
Coolant switch
Drill motor
Carriage
Clamp deviceCooling pump
Lower drill
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-4 A5E00105265-01
Initial StateThe initial state of the drill is defined as
follows: The drill motor and cooling pump are stopped The
carriage/drill is in the upper position There is no work piece in
the clamping device
Functional Diagram - Drilling SequenceThe entire drilling
sequence can be divided into the following sections: Insert work
piece (manual) If required, set switch for coolant (depending on
the material) Start the machine with the start button (drill motor
starts up) Clamp the work piece with the selected clamp pressure
Start the cooling pump (if coolant selected) Lower drill and
carriage to the bottom target position (drill) Wait 0.5 seconds at
lower target position (drill) Raise drill with carriage to upper
target position Remove work piece, turn off drill motor and cooling
pump Remove work piece (manual)
Motorrunningstopped
Carriageupdown
Element State
Clampingdevice-
OnOff
Start
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-5
3.2 Selecting the Structure of the SequencerBefore you create
the program for the sequencer, you should include a conceptphase in
which you break down the drilling operation into single steps. The
basis ofthe concept design is the technological drawing and the
flowchart.
Dividing the Drilling Process into Individual Steps - Structure
of the SequencerThe drilling process is described by S7 Graph in
the form of a sequencer. Asequencer represents a sequence of single
steps and conditions that control howthe process moves on to the
next single step. To specify the structure of thesequencer, follow
the steps outlined below:1. Break down the drilling process into
steps and specify the order of the steps
(for example "step S2 follows S1" or "step S3 follows either
step S4 or S7").2. For each step, specify the actions that must be
performed in the step (for
example in S1 the action "Drill ready" or in S3 the action "Turn
on drill motor").3. Then decide for every step which conditions
must be met so that the process
can move on to the next step (for example for T1 the condition
"Drill started -start button pressed" or for T5 the condition
"Drill in upper position").
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-6 A5E00105265-01
T2
S2
T8
T3
T7
S3
S1
T4
T1
T6
S7
S4
Drill ready (initial step)
Clamp work piece
Turn on drill motor
Turn on cooling pump
Lower drill (start drilling)
Drill program started (start buttonpressed)
Work piece clamped with selectedpressure
Drill motor running at selected speed(without coolant)
Coolant pressure reached
Drill in lower position
Drill motor running at selected speed(with coolant)
S5
S6
T5
T6
S1
Raise drill
Release work piece, turn off drill motorand cooling pump
Drill in upper position
Work piece is released, coolingpump stopped, drill motor
stoppedWaiting time 500 ms
S = stepT = transition
Monitor clamping
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-7
3.3 Defining the System SignalsOnce you have broken down the
drilling operation into individual steps, you shouldthen define the
input and output parameters for each step. The basis of theconcept
design is the technological drawing and the flowchart.
Defining Inputs and OutputsList the inputs and outputs for the
drill in the form of a table.If you want to program symbolically,
enter the required symbolic names (forexample input I 0.4
"Cl_press_ok") for the absolute inputs and outputs and anycomments
that will make the program easier to understand (for
example"Workpiece clamping pressure reached").In the drill example,
it is assumed that the switches and contactors of the drill
arecontrolled via the inputs and outputs of the digital
input/output module of theS7-300 programmable controller. The
input/output module has 8 inputs and 8outputs. The default values
of the input and output addresses of the moduleinserted in slot 4
are as follows: I 0 to I 0.7 and Q =0.0 to Q 0.7.
AbsoluteAddresses
Symbolicaddresses
Explanation
Inputs in the program (I)I 0.0 Dr_mot_running Feedback signal
for drill running at selected speedI 0.1 Dr_mot_stopped Feedback
signal for drill stoppedI 0.2 Drill_down Limit switch for drill in
lower positionI 0.3 Drill_up Limit switch for drill in upper
positionI 0.4 Cl_press_ok Feedback signal for work piece clamping
pressure
reachedI 0.5 Coolant_sel Selector for coolant (dependent on work
piece)I 0.6 Cool_press_ok Feedback signal for coolant pressure
reachedI 0.7 Start_button Start button of the drillOutputs in the
program (Q)Q 0.0 Dr_mot_on Turn on drill motorQ 0.1 Cool_pump_on
Turn on cooling pump (dependent on work piece)Q 0.2 Lower_drill
Lower drill and carriage to bottom limit positionQ 0.3 Raise_drill
Raise drill and carriage to the upper limit positionQ 0.4
Clamp_workp Clamp work piece at required pressure
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-8 A5E00105265-01
3.4 Creating the Drill Project in the SIMATIC Manager
Creating a ProjectProjects for sequential control systems do not
differ from other projects in STEP 7.To create a new project in the
SIMATIC Manager, follow the steps outlined below:1. Select the menu
command File > New.2. Name the project "Drill".
Inserting an S7 ProgramIn this example, hardware configuration
is unnecessary since the defaultaddressing of the input/output
module in slot 4 is used. You can thereforeimmediately insert an S7
program in the project folder in the SIMATIC Manager.The S7 program
serves as a folder for the blocks of the user program, the
sourcefiles and the symbols. Follow the steps below:1. Select the
"Drill" project.2. Select the menu command Insert > Program >
S7 Program.3. Name the S7 program "Drill Program".The folders for
source files, blocks, and symbols are created automatically whenyou
insert an S7 program. An empty OB1 is also created in the Blocks
folder.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-9
3.5 Creating a Symbol TableWhen you program in STEP 7, you work
with addresses such as I/O signals,memory bits, counters, timers,
data blocks, and function blocks. You can accessthese addresses in
your program in absolute format (for example I1.1, M2.0,FB21).You
will find the program much clearer and easier to read if you use
symbols (forexample Motor_A_on) instead of the absolute addresses.
To allow the use ofsymbols, you can enter a name, the absolute
address, the data type and acomment for every address used.Once you
have defined a symbol, it can be used throughout the entire
userprogram of a programmable module.
Creating a Symbol TableIf you want to write your program using
symbolic addresses, it is advisable tocreate the symbol table at
this point.1. Open the symbol table in the "Drill Program" folder
by double-clicking
"Symbols".2. Edit the table as shown below.3. Save the symbol
table using the menu command Table > Save.The entries 1 to 14
are required for symbolic representation of the inputs andoutputs.
The entries 15 to 18 allow symbolic representation of the
blocks.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-10 A5E00105265-01
3.6 Creating an S7 Graph FB and Programming a Sequencer
Creating an S7 Graph FBThe S7 Graph FB will contain the
sequencer. To create an S7 Graph FB, follow thesteps outlined
below:1. Open the "Blocks" folder in "Drill Program" in the SIMATIC
Manager.2. Select the menu command Insert > S7 Block >
Function Block.3. Set "S7 Graph" as the language in the
"Properties" dialog box.
Result: The empty FB with the default number 1 is created in the
"Blocks"folder.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-11
Programming a SequencerAfter you have started the S7 Graph
editor by double-clicking FB1 the systeminserts the first step
(initial step) and the first transition. It is advisable to create
thestructure at the "Sequencer" display level. To display
conditions and actions,activate the View > Display With >
Conditions and Actions menu command.Using the mouse and the
"Sequencer" toolbar at the left-hand edge of the screen,you can
then position all the remaining steps and transitions, the
alternativebranch and the jump from the end of the sequencer to the
start of the sequencer.There are two ways of doing this and both
are illustrated here.
Method 1: "Direct" Mode1. Select transition 1 and click with the
mouse until the icon
insert step + transitionuntil you arrive at step/transition
6.
2. Select step 3 and then select the icon
open alternative branch.This opens the alternative branch for
supplying coolant. The branch beginswith transition 7.
3. With the mouse, select the icon
insert step + transition,and insert step 7 (S7) and transition 8
(T8).
4. Select the icon
close alternative branchand then select transition 3.
5. Now complete the sequencer structure by first selecting
transition 6 and thenclicking on the icon
insert jumpand then selecting step 1.
Method 2: "Drag-and-Drop"1. Return to the SIMATIC Manager and
create function block FB2 in the "Blocks"
folder as described above. Once again select "GRAPH" as the
sourcelanguage.
2. Start the S7 Graph editor by double-clicking FB2 in the
"Blocks" folder.3. Select the menu command Insert >
Drag-and-Drop.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-12 A5E00105265-01
4. With the mouse, select the icon
insert step + transitionand then click on the last transition of
the individual elements until you arrive atstep/transition 6.
5. Select the icon
open alternative branchand open the alternative branch for the
coolant by clicking on step 3. Thebranch begins with transition
7.
6. With the mouse, select the icon
insert step + transition,to insert step 7 (S7) and transition 8
(T8).
7. Select the icon
close alternative branchand first select transition 8 and then
transition 3.
8. Now complete the sequencer structure with
insert jumpby first selecting transition 6 and then step 1.
NoteBefore you start to program step actions, close function
block FB2. You onlycreated this FB to try out the second method of
creating a sequencer structure.When you close the FB, answer all
prompts with "No". For the rest of the exercise,you will be working
in FB1.
3.7 Programming Step ActionsThere are also two methods available
for programming step actions andtransitions: Direct and
Drag-and-Drop. The procedure described below assumesyou have
selected the menu command Insert > Drag-and-Drop:1. Select the
menu command Insert > .
Result: The mouse pointer then appears as shown below:
2. Insert an empty action line by clicking the action box.3.
Enter the actions.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-13
An action consists of an instruction and an address. For the
drill program, fourdifferent instructions are necessary in the
steps: S Set output R Reset output N Non holding: As long as the
step is active, the signal state of the
address is 1. D Delay: The address is set to 1 after the defined
time has elapsed
following activation of the step and is reset when the step is
deactivated.
3.8 Programming TransitionsThe bit logic instructions "normally
open contact", "normally closed contact" and"comparator" are used
for the step enabling conditions in the transitions. Toprogram
transitions:1. Set the "LAD" view and select the appropriate icons
in the "LAD/FBD" toolbar
insert normally-open contact
insert normally-closed contact
insert comparator2. Position the symbols at the appropriate
points by clicking the transition lines.
You can exit the insert mode at any time with the ESC key.3.
Enter the addresses. Click the placeholder "??.?" of the required
text field.
Then enter an absolute or symbolic address (for example I 0.7,
"Start_switch").4. If you wish, you can also enter a comment for
the sequencer. In the
"sequencer" view, the comment field is at the top left and can
be opened byclicking it with the mouse.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-14 A5E00105265-01
The following figure shows the completed sequencer.
GRAPH: Programming s7 Sequential Control Systems - Drill\...File
Edit Insert PLC Debug View Options Window Help
Drill
T1Trans1
T4Trans4
"Drill_down"
S2Cla...
T2Trans2
S3Mo...
T3Trans3
T7Trans7
T8
Trans8
Drill_ready
Clamp_onS "Clamp_workp"
Motor_onS "Dr_mot_on"
Coolant_onS "Cool_pump_on"
Lower_drillN "Lower_drill""
S4Low...
S7Coo...
T6
"Start_button"
Clamp_press_ok"
"Drill_motor_running"
"Coolant_sel"
"Cool_press_ok"
S1Dr...
"Drill_motor_running"
"Coolant_sel"
S5Rai...
T5Trans5
"Drill_up"
"Cl_press_ok" T6
Trans6
"Cool_press_ok"
S6Cla...
S1
CMPTerm_M_pump_off.T
T#500MS
Raise_drillD "Raise_drill""
T#500MS
Term_M_pump_offR ""Clamp_workp"R "Dr_mot_on"R "Cool_pump_on"
"Drill_motor_stopped"
>=
When programming comparators, you can use the system information
for steps asthe addresses. The addresses have the following
significance:
Step_name.T: current or last activation time of the step
Step_name.U: current or last activation time of the step without
the time of a
disturbance
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-15
3.9 Programming Monitoring FunctionsTo program monitoring
functions:1. Double-click on step 2 to change from the "sequencer"
view to the "single step"
view.
2. Select the icon
insert comparator in the "LAD/FBD" toolbar3. Position the
comparator at the appropriate point on the supervision line and
enter the required monitoring time.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-16 A5E00105265-01
3.10 Specifying the Standard Function Block
Executability of the S7 Graph FBS7 Graph has two options
available for creating FBs. Full code:
The entire code required to execute each S7 Graph FB is included
in the FB. Ifyou have several S7 Graph FBs, this means a
considerable increase inmemory requirements.
Standard FC required:To reduce memory requirements, S7 Graph has
the two following alternatives:You use a standard FC containing the
main code sections for all FBs. This FCis copied to your project
automatically when you select this option. The FBsproduced using
this method are considerably smaller.
For this example, use the compilation option "Full code".The
most suitable FC depends on the performance of your CPU. Select one
of thefollowing standard FCs:
FC Number FunctionalityFC72 As default, you work with FC72.
Remember, that your CPU must be capable of processing
blocks with more than 8 Kbytes.FC70/FC71 These two FCs are less
than 8 Kbytes in size and can therefore be loaded on a smaller
CPU. FC70 uses the diagnostic functionality of SFC17/18 and can
only be used on CPUsthat have these functions available. If your
CPU does not have these functions, you mustuse FC71 and do without
diagnostic capability.If you want to check whether or not your CPU
contains these SFCs, select the menucommand PLC > Obtainable
Nodes in the SIMATIC Manager or click the correspondingbutton in
the toolbar. Open the "Blocks" folder in the S7 program.
FC73 This block requires less than 8 Kbytes of memory so that it
can be executed on all CPUs.Using this FC considerably reduces the
memory requirements of the S7 Graph FBs. Youmust also select the
option "Interface Description: Memory minimized" in the
blocksettings.The following restrictions, do, however, apply:The
blocks created do not have diagnostic capabilityWhen you monitor
the sequential control system, you will see the status display only
forthe selected active element.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-17
Setting the ExecutabilitySelect the menu command Options >
Block Settings and specify that theS7 Graph FB can be executed with
a standard FC in the Compile/Save tab. Enterthe FC number that
matches the performance of your CPU.The block is automatically
copied to the user project if you select FC70/71, FC72 orFC73 as
the block number and there is not yet an FC with this number in the
targetproject. If you want to use a different number for the
standard block, you must copyand renumber yourself.
3.11 Saving and Closing the SequencerWhen you save the
sequencer, it is automatically compiled.1. Select the menu command
File > Save.Result: The "Select Instance DB" dialog box is
opened with the default instanceDB (DB1).2. Accept the settings by
clicking "OK".Result: The instance data block is automatically
created in the "Blocks" folder.
NoteThe warning "S1 without content" in the compiler log simply
means that no actionis programmed in step 1.
3. To close the sequencer, select the menu command File >
Close.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-18 A5E00105265-01
3.12 Including the Sequencer in the STEP 7 Program
Programming OB1The sequential control program for the drill is
called and started in organizationblock OB1. You can create OB1 in
LAD, FBD, STL or SCL (here it was created inLAD). Program OB1 as
shown in the following diagram. Follow the steps below:1. Open the
"Blocks" folder in the "Drill Program" S7 program in the
SIMATIC
Manager.2. Start the LAD/STL/FBD editor by double-clicking
OB1.3. With the menu command View, select the programming language
LAD.4. Select segment 1 and insert the sequencer call using the
program element
catalog by double-clicking FB1 (Seq_drill).5. Type in the name
of the corresponding instance data block (IDB_Seq_drill)
above the LAD box.6. Select the input parameter INIT_SQ, insert
a normally open element using the
"LAD" toolbar and label it M0.0 ("INIT_SQ"). Using this
parameter, you can setthe sequencer to the initial step (in the
example step 1) in the online mode.
7. Select the menu command File > Save and close the
organization block withthe menu command File > Close.
NoteAll other block parameters can be ignored for the
example.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-19
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-20 A5E00105265-01
3.13 Downloading the Program to the CPU and Testing
theSequencer
Downloading the User ProgramTo allow you to download the program
to the CPU, you must download all theblocks (DB1, FB1, OB1,
FC70/71, FC72 and/or. FC73) to the CPU of theprogrammable
controller in the SIMATIC Manager. Follow the steps outlined
below:1. Open the "Drill Program" S7 program in the SIMATIC Manager
and select the
"Blocks" folder.2. Select the menu command PLC >
Download.
CautionIt is best to download the S7 Graph block in the STOP
mode since followingdownloading of the instance DB, the sequencer
is automatically set to the initialstate.You should only download
S7 Graph blocks in the RUN-P mode when thesequencer is in the
initial state or in the OFF state. If you download the blocks
thesequencer in a different state, for example when overwriting an
old block,problems may occur in the synchronization of the
sequencer with the process.
Testing the User ProgramTo test the user program, you require an
online connection to a CPU.3. Open the project window in the
SIMATIC Manager.4. Open the sequencer by double-clicking FB1.5.
Select the menu command Debug > Monitor.
Result: The program status is displayed (the initial step is
active). Active stepsare displayed in color.
CautionA monitoring time is programmed in step 2. If the step
activation time exceeds theconfigured monitoring time (500 ms) in
the supervision condition, the systemrecognizes a supervision error
and the disturbed step is displayed in red. If a faultoccurs, you
must first satisfy the condition for progressing to the next
transition.Using the PG function Debug > Control Sequencer you
can then enter anacknowledgment (see also "Control Sequencer").This
does not apply to the inching mode, since the step enabling
condition mustbe satisfied and the acknowledgment received within
one cycle.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-21
3.14 Test Function: Control SequencerControl Sequencer is a test
function with which you can test the sequencer inS7 Graph in all
modes. All the settings and entries for the dialog box have thesame
effect as the corresponding FB parameters.The entries in the
"Control Sequencer" dialog box can be different from the
settingsyou used to compile the sequencers. The dialog box settings
have priority.
"Control Sequencer" Dialog boxThe "Control Sequencer" dialog box
is used both as an output field that displaysthe current settings
and as an input field in which you can change the
currentstatus.
If you acknowledge an error, initialize the sequencer, or want
to change the step inthe manual mode, call the dialog box with the
menu command Debug > ControlSequencer.
AcknowledgeIf the "Acknowledge errors" option is clicked, you
acknowledge a pending errormessage with the "Acknowledge" button.
In this way, you can acknowledge adisturbance caused, for example,
by the configured monitoring time in Step 2 beingexceeded.Note,
however, that before you acknowledge the error you must make sure
that thesupervision or interlock conditions that led to the error
are no longer satisfied.After an error has occurred, you can enable
the next step in the sequencer bysatisfying the step enable
condition because the last step enable condition in thecycle in
which you acknowledge has priority over the supervision. You
mustnevertheless acknowledge the error.If the error was caused
because the undisturbed activation time Step name.U hasexceeded the
configured monitoring time, you can move on the sequencer
byclicking the "Acknowledge" button.This is possible because the
Step name.U variable is set to "0" when youacknowledge.
InitializeWith the "Initialize" button, you can restart the
sequencer completely with thedefined initial step.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-22 A5E00105265-01
Setting the ModeIf you click one of the round option buttons,
you switch the sequencer to theselected mode.You can, for example,
run your sequencer in the manual mode instead of theautomatic mode.
In the manual mode, you can activate or deactivate any step.Follow
the steps outlined below:1. Enter the step number of the step you
want to process in the "Step number"
box or simply click the required step.2. Select the action to be
executed with the step:
- Activate The selected step is activated even if the preceding
transition isnot satisfied.
- Deactivate The selected step is deactivated.Note that before
you activate a step you must first deactivate the currently
activestep since only one step can be active at any one time in a
linear sequencer. Inother words, you can only activate the required
step when you have deactivatedthe currently active step.If you have
set a new mode, the original mode is indicated in bold face.After
you have controlled your sequencer in the manual mode, you can
return tothe automatic mode and close the "Control Sequencer"
dialog box.
3.15 Modifying the SequencerOften, a program does not run as
required at the first attempt. This means thatchanges and
modifications are required. This is also the case in our
sampleprogram. The configured monitoring time in Step 2 is too
short and the programhangs at this step. The following section
explains how to make the requiredchanges. You must first change to
the "offline" mode.
Modifying the Monitoring TimeThe monitoring time configured in
Step 2 is 500 ms. To give you more time forsetting the
"Cl_press_ok" variable, change the monitoring time to 5 s as
explainedbelow:1. Double-click on step 2 to change from the
"sequencer" view to the "single step"
view.
2. Close the status by selecting the menu command Debug >
Monitor or clicking
the following button: .3. Enter the value 5 s for the monitoring
time.4. Save the sequencer with the menu command File > Save,
since the sequencer
must be recompiled.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 3-23
Downloading the Modified SequencerOnce you have compiled the
sequencer, you must download it to the CPU. Youcan download the
sequencer in the SIMATIC Manager or in the S7 Graph editor. Inthe
S7 Graph editor, follow the steps outlined below:1. With the FB
open, select the menu command PLC > Download or click on the
Download button . The "Download" dialog box is opened.2. Accept
the defaults by clicking "OK".3. Confirm the prompt to overwrite
the existing blocks.
Include Instance DBIf you have not cleared the system default
"Include Instance DB", S7 Graph checkswhether the instance DB has
changed since it was last downloaded and whether itmust be updated.
The option "Download with Instance DB" is clicked in the"Download"
dialog box.Otherwise, S7 Graph does not check the instance DB and
leaves you to decidewhether or not to download the instance DB
again. The option "Download withInstance DB" is not clicked in the
"Download" dialog box.
Restarting the StatusTo be able to monitor or control the
sequencer again, restart Status by selecting
the menu command Debug > Monitor or by selecting the Monitor
button.
05.04.0105.04.200105.04.2001
-
Designing a Sequential Control System Based on the Example of a
Drill
S7 Graph for S7-300/400 Programming Sequential Control
Systems3-24 A5E00105265-01
05.04.0105.04.200105.04.2001
-
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 4-1
4 Working with an S7 Graph
4.1 Starting S7 Graph
Requirements for Starting S7 Graph The STEP 7 standard package
is installed on your PC/programming device. S7 Graph is installed
on your PC/programming device. You have installed the authorization
for S7 Graph.
Starting S7 GraphThere are two ways of starting S7 Graph:
Starting in Windows
Start S7 Graph by clicking the "Start" button on the taskbar in
Windows.The S7 Graph entry is under Simatic > STEP 7 > S7
Graph - ProgrammingSequential Control Systems.
Starting in the SIMATIC managerIn the SIMATIC manager,
double-click an S7 Graph FB or an S7 Graph sourcefile.S7 Graph is
started and displays the selected block in the default view.
05.04.0105.04.200105.04.2001
-
Working with an S7 Graph
S7 Graph for S7-300/400 Programming Sequential Control
Systems4-2 A5E00105265-01
4.2 The S7 Graph User Interface
Elements of the S7 Graph User Interface
These sections describe the elements of the user interface
numbered in the figure.(1) Toolbars(2) Work area(3) Menu bar(4)
Title bar(5) Overview window(6) "Details" window(7) Status bar
05.04.0105.04.200105.04.2001
-
Working with an S7 Graph
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 4-3
Title BarThe title bar is at the upper edge of a window. Apart
from the standard Windowsbuttons, the title bars contain the
following information: Title of the software Name and number of the
open FB and DB Selected display level Name of the source with
complete path
Working AreaThe working area is a window within S7 Graph in
which the sequences of anS7 Graph FB or an S7 Graph source file are
displayed and can be edited.Within the main window of S7 Graph, you
can open up to 10 windows at the sametime. You can cascade or tile
these windows.
Menu BarJust like other Windows applications, S7 Graph has a
menu bar below the title barof the main window. The display of the
menu commands is context-sensitive. Themenu commands are either
active (black) or inactive (gray) depending on whetheror not the
command can be applied to the currently selected object.
ToolbarsThe toolbars contain buttons with which you can start
frequently required andcurrently available menu commands.The names
of the toolbars in S7 Graph are visible when the toolbars are
positionedwithin the main window.
Name ContentStandard Contains functions for handling files
(opening, saving etc.) and for editing
(copying, pasting etc.).View Contains symbols for selecting
various views (for example how S7 Graph
FBs are displayed, display of symbolic names etc.).Sequencer
Contains buttons for editing the sequencer (for example inserting
a
step-transition pair).LAD/FBD Contains buttons for inserting
Ladder Logic/FBD elements (for example
comparator).
05.04.0105.04.200105.04.2001
-
Working with an S7 Graph
S7 Graph for S7-300/400 Programming Sequential Control
Systems4-4 A5E00105265-01
Overview WindowThe overview window is displayed to the left of
the working area and contains twotabs:
Variables TabDisplays the variable declaration with the sections
IN, OUT, IN_OUT, STAT andTEMP. Further program elements are also
displayed: Symbols from the symboltable, preprogrammed blocks from
the block folder, blocks from libraries, and stepsand transitions
along with their components used in S7 Graph FBs.In this tab, you
can modify existing parameter sets, system parameters can bedeleted
but cannot be edited. It is also possible to extend your own
parameters.If you want to use a parameter or a program element in
the sequencer, you candrag it from the variable declaration window
to the sequencer using the mouse andposition it at the required
location.Changes you have made to the parameters in the variable
declaration window areautomatically updated in the sequencer so
that no inconsistencies can result.With the F1 key, detailed help
is available on declaring variables in the variabledeclaration
window.For more detailed information on the declared variables and
program elements,refer to the "Details" window (Variables tab). You
can open this window with themenu command View > Details.
05.04.0105.04.200105.04.2001
-
Working with an S7 Graph
S7 Graph for S7-300/400 Programming Sequential Control
SystemsA5E00105265-01 4-5
"Schematic" TabIn this tab, the entire system structure with all
the sequencers contained in the FBis displayed. Several sequencers
are displayed one above the other.The following elements are
displayed: All the sequencers contained in the FB The arrangement
of the steps, transitions and branches - however not their
contents
Permanent Instructions
If you select an area of the structure in the "Schematic" tab,
this is displayed in theworking window where you can edit it.
"Details" WindowThe "Details" window is displayed at the bottom
edge of the screen and includesthe following tabs:
Compile / Decompile MessagesThe tab is used to display errors
and warnings that occur for example aftercompiling the
sequencer.
VariablesThe content of this tab depends on the selection you
made in the "Variables" tab ofthe overview window. Depending on the
selections made, the following detailedinformation can be
displayed: Information on variables Information on symbols from the
symbol table Information on programmed blocks from the block folder
Information on blocks from librariesIn this tab, you can declare
new variables with the menu command Insert >Declaration
Line.
If you want to use a variable, block parameter or a program
element in thesequencer, you can drag it from the variable
declaration window to the sequencerusing the mouse and position it
at the required location.
05.04.0105.04.200105.04.2001
-
Working with an S7 Graph
S7 Graph for S7-300/400 Programming Sequential Control
Systems4-6 A5E00105265-01
AddressesThis tab contains a list of the addresses used in the
block with their locations,symbols, and data types. During
monitoring, the tab displays a further columnwhen "Single Step" or
"Permanent Instructions" is set displaying the current statusvalue
of the address during program execution.Whether or not this is
displayed depends on the setting for the working area.
Setting for the Working Area Displayed AddressesSequencer
Addresses in the programSingle step display Addresses of the step
and corresponding transitionPermanent Instructions Addresses used
in the permanent instruction
Forward Cross ReferencesShow the use of addresses in the memory
areas Q, M, T, and C within the userprogram.The forward
cross-references tab displays all the addresses supplied with
values inthe