Simatic S7-Graph
Simatic S7-Graph
Simatic S7-Graph
MODULE C1
Sequencer programming with S7-GRAPH
This document was provided by Siemens A&D SCE (automation and drive technology, Siemens A&D
Cooperates with Education) for training purposes. Siemens does not make any type of guarantee regarding its
contents.
The passing on or duplication of this document, including the use and report of its contents, is only permitted
within public and training facilities.
Exceptions require written permission by Siemens A&D SCE (Mr. Knust: E-Mail:
[email protected]). Offences are subject to possible payment for damages caused. All rights are
reserved for translation and any case of patenting or GM entry.
We thank the company Michael Dziallas Engineering and the instructors of vocational schools as well as further
persons for the support with the production of the document.
PAGE:
1. Forward................................................................................................................. 6
PAGE:
PAGE:
Information
Programming
Notes
1. FORWARD
Basics of
STEP 7- Programming
2 - 3 days A modules
Additional functions of
STEP 7- Programming
2- 3 days B modules
IT- Communication
with SIMATIC S7
1- 2 days E modules
Learning goal:
In this module, the reader will learn the programming of a sequential control system with the graphic
programming tool S7-GRAPH. The module shows the principle procedure in the following steps by
means of a detailed example.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB- Parameters
Requirements:
For the successful use of this module, the following knowledge is assumed:
· Knowledge in the use of Windows 95/98/2000/ME/NT4.0
· Basics of PLC- Programming with STEP 7 (e.g. Module A3 – ‘Startup’
PLC- Programming with STEP 7)
2 STEP 7
1 PC
4 PC Adapter
3 S7-GRAPH
5 SIMATIC S7-300
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB- Parameters
With the programming language S7-GRAPH, the function range of STEP 7 is extended to a graphic
programming possibility for sequential control systems. With S7-GRAPH you can clearly and quickly
program a sequential control system. The process is divided into single steps and the execution is
plotted.
In the single steps, the required actions are specified. The continued switching conditions to the
respective next step (transitions) can be provided in the programming language LAD or FBD. The
programming language S7-GRAPH corresponds to the specified execution language SFC
“Sequential Function Chart”. in the Norm DIN EN 61131-3 (IEC 61131-3).
S7-graph is an option package to STEP 7, thus it assumes that the professional version of STEP 7 is
already installed on your computer. (see module A2-Installation of STEP 7 V5.x/handling of
authorizing). S7-graph is delivered on CD ROM with an enclosed disk, which contains an
authorization, that must be transferred to the PC in order to make the use of S7-GRAPH possible.
This authorization disk can also be used on another PC or can be copied in order to authorize the
software. For the topic of installation and transmission of authorization, please refer to module A2
(Installation of STEP 7 V5.x/handling of authorization).
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB- Parameters
A sequential control system is a controller with inevitable step by step execution, in which the further
phases from a step depend on further conditions, which take place on the next planned step. The
step sequence can be programmed in a special way, e.g. with jumps, loops, branches.
With S7-GRAPH, sequential control systems can be programmed, so that the step by step sequence
can be very simply and quickly graphically displayed.
By the time-dependent sequential control system, the further operating conditions are only dependent
on time. For the creation of the further conditions, e.g. timers, time counters, drum controllers or
CAM mats with a continuous number of revolutions can be used.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
By the processor dependent sequential control system, the further operating conditions are only
dependent on the signals of the controlled system. For the creation of the signals, signal element like
a limit switch, switch, button or sensors can be used. The required signals can also be operated on
with timer functions.
Cutting apparatus
With operation of the start-valve, the cylinder of the cutting apparatus extends. After reaching the
front end position, the limit switch is actuated and the cylinder automatically retracts.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Cooperating work and control elements can be clearly pointed out through suitable representation
possibilities. Even with the sophisticated setting of tasks, the connections are still recognized as fast
and safe. Besides a simple representation of motion executions and switch states, it also makes the
communication of different experts in a large framework possible.
- Table mode
The step by step execution is queued in a table.
- Short representation
The sequence can be quickly and simply displayed by a simplified display of the motions.
- Motion chart
With help from the path-step and path-time charts, the motion execution is displayed graphically.
A better overview of the connections is given.
- Function chart
A process orientated representation of the control problem. The function chart replaces or
supplements the verbal description and represents a control problem with its substantial
characteristics and respective applications clearly. S7-GRAPH is a programming language that
basically corresponds to a function chart.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
A controller for a cutting apparatus is to be sketched. With the cooperation of a supply unit and a
cutting apparatus, the rod material will be shortened. The material follows through the feed cylinder
(cylinder B), which moves along the pneumatic clamping device (cylinder A). If the material is
pushed up against an end stopper, it is held by the clamp (cylinder C). At the same time, the cutting
procedure can begin (cylinder D), and afterwards, the opening of the clamping device (cylinder A)
take place. The clamping device (cylinder A) is opened so it goes back into the starting
position(cylinder B). If the cutting procedure is terminated (cylinder D) and the supply unit has
reached the starting position, then the clamp (cylinder C) will be opened and it can begin a new
working execution. The start is released by the actuation of the START-button, if all cylinders are in
the rear end position.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
For the motion sequence it is often insignificant which tasks with a movement are satisfied, so a
motion sequence can also be used for many different controls. By more extensive controls, the
motion sequence should first be described in short representation, since a quick overview of the
movements is given here.
A- B-
A+ B+ C+ D+ D- C-
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Here the working execution of a work element is represented and as a function of the respective
steps (step: A change of the condition of any physical unit), the setback way is applied. If several
work elements are available for a control, then they are represented in the same way and drawn one
under another. The relation is produced by the steps. With the path-step chart, the distance of the
step lines is always alike. Additionally the signal lines can be registered into the path-step chart.
For our example, the path step-chart appears in the following dimensions .
Build element
State
1 2 3 4 5 6 7=1
Step line
1
S
AND- A
Operation
Binary signal State line
0
1 Function line
B
0
Signal line
1
C
0 Limit switch
1
D
0
The path-time chart is a path-step chart by which the additional course of the movements is
essentially pointed out by a time border at the lower end of the diagram. There the duration of a
movement can be read. The distance of the step lines changes depending upon the required time.
The number of steps and the kind of movements remain unchanged.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
For the developing of a cutting apparatus, a function chart should be generated after the assignment
of the signal elements and work elements.
S0 Start-Button
S1 a0 Limit switch cyl. A retraction
S2 a1 Limit switch cyl. A extension
S3 b0 Limit switch cyl. B retraction
S4 b1 Limit switch cyl. B extension
S5 c0 Limit switch cyl. C retraction
S6 c1 Limit switch cyl. C extension
S7 d0 Limit switch cyl. D retraction
S8 d1 Limit switch cyl. D extension
The function chart is a process orientated representation of a control problem, independent of the
realization of e.g. the used equipment. It facilitates a cooperating of different technical disciplines,
e.g. mechanical engineering, pneumatics, hydraulics, process engineering, electrical engineering,
electronics etc.. A control problem is clearly represented with its substantial characteristics in a basic
structure (step field) and with the details in a fine structure (instruction field) necessary for respective
application.
Note
Since the cutting apparatus can work in two separate stations(feed station and cutting apparatus), a
function chart with a simultaneous branch must be provided.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
6.4 Function chart of the cutting apparatus in DIN EN 61131-3 (IEC 61131-3)
Initial step
1
S0 Start
S7 d0 cyl. D retraction
S5 c0 cyl. C retraction
S3 b0 cyl. B retraction
&
S1 a0 cyl. A retraction
S Cylinder A extraction
2
S2 a1
S Cylinder B extraction
3
S4 b1
S Cylinder C extraction
4
S6 c1
S1 a0 S8 d1
S3 b0
&
S7 d0
R cylinder C retraction
9
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Note
The represented hardware configuration is an example.
Depending on the used automation equipment, a separate hardware configuration should be made.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Note
The address of the operands must be adjusted to the respective automation devices.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
1. Click Blocks.
2. Double click on FB1.
Step field
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
A sequencer consists of a series of steps, which are activated in a fixed order dependent on the
conditions by further switching.
The editing of a sequencer always begins with an initial step or with several initial steps, that stand in
an arbitrary place in the sequencer. As long as the actions of a step are implemented, the step is
active. During execution of several steps, all are active at the same time.
A step is left, when all possible lined up errors are repaired and/or confirmed and the following
transition is performed to the step.
The next step which follows the performed transition becomes active.
At the end of a sequencer rests a jump to any step of the sequencer or another sequencer of the FB.
Thus a cyclic operation of the sequencer is possible. At the end of the sequencer rests a chain end.
The execution ends with the reaching of the chain end.
Jump
Close simultaneous branch
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
1. Double click on Block comment and Step description and enter information.
2. Click on the Input of the Transition.
3. Insert an And symbol.
4. Add additional bin. inputs.
5. Enter operands on the And-symbol.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Possible event
S Set operand
R Reset operand
N Don’t save
D Delay
L Limited time
Possible standard
instruction
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
branch end.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
For the inputing of the actions and transitions, one should change to the one page representation.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
7.10.5 Entering actions and transitions of the Step S5 to Step S8 and the entering of the last step
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
7.10.6 Editing the last step and inserting a return to the first step
4. Insert jump.
5. Insert S1 at the jump point or click on Step S1, so that the jump goal is inserted.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
1. Click on Options.
2. Click on Block Settings.
Note
If there are still errors, then it cannot be not be stored in the block. An incorrect block can be
generated only as source. When storing the block, a pertinent data block and the SFC64 are
produced. Both are copied into the block list.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
1. Click on Blocks .
2. Double click on OB1.
3. In the properties of the Organization block select FBD as created in language.
4. Click OK.
Note
If the OB1 is not automatically opened after the adjustment of the properties, then the OB1 must be
double clicked once again in the block list.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters
7.12 Editing Organization Block OB1 and downloading blocks into a module
After the transferring of the blocks into the module, the program can be debugged.
Forward Installation Sequent. control system Representation Configuration Debug functions Marginal conditions FB-Parameters