TIA PRO3 10 GRAPH en
TIA PRO3 10 GRAPH en
Contents 10
10. Programming with S7-GRAPH ............................................................................ 10-2
10.1. Example: The Conveyor Model as a Production Line ........................................................ 10-3
10.2. S7-GRAPH: Programming Sequential Functions ............................................................... 10-4
10.3. Creating an S7-GRAPH Block ............................................................................................ 10-5
10.4. Sequence View of an S7-GRAPH Block ............................................................................. 10-6
10.5. Interlock and Supervision.................................................................................................... 10-7
10.6. Testing an S7-GRAPH Sequencer ..................................................................................... 10-8
TIA-PRO3 – S7-GRAPH
Training Document V13.0 10-1
SIMATIC TIA Portal S7-1500 Programming 3
TIA-PRO3 – S7-GRAPH
10-2 Training Document V13.0
SIMATIC TIA Portal S7-1500 Programming 3
Final Check
and Removal Milling Drilling Pickup
Task Description
When "P_Operation" (Q0.1) is switched on, the conveyor model is no longer to transport parts
from the light barrier bay to the next free bay. Instead, the conveyor model is to transport parts in
sequence to the Bays 3, 2 and 1. All other, prevailing functions (parts statistics, saving the part
weights in a weight storage, indicator light control) are to remain unchanged.
Parts Assembly
Each piece is mounted onto a tool holder at the Pickup bay (light barrier bay). After pressing the
associated bay pushbutton, the part is transported to the Drilling bay (Bay 3) and drilled for 3
seconds, then transported to the Milling bay (Bay 2) and milled for 3 seconds and finally
transported to the Removal bay (Bay 1) where it is removed from the production line.
TIA-PRO3 – S7-GRAPH
Training Document V13.0 10-3
SIMATIC TIA Portal S7-1500 Programming 3
Application: The sequence of a process can be broken down into consecutive or simultaneous
steps.
S7-GRAPH
The S7-GRAPH programming language is used to control sequential sequences. The process is
split into single steps with their own function scope. The sequence is represented graphically and
can be documented with pictures and text.
The actions to be performed are defined in the single steps; the conditions for moving on to the
next step are defined by transitions. The definitions of these, as well as interlocks and
supervisions are written in a subset of the STEP 7 programming languages LAD und FBD.
Sequencer
Steps and transitions form a sequencer. The sequencer is stored in an FB. An instance DB, that
contains the sequencer data, is assigned to this FB. At least three blocks are necessary for an
executable program:
• the FB, that contains the sequencer(s)
• an instance DB with the sequencer data
• an organization block, function block or function containing the FB call. The parameters and
the number of the instance DB are passed in the FB call.
TIA-PRO3 – S7-GRAPH
10-4 Training Document V13.0
SIMATIC TIA Portal S7-1500 Programming 3
TIA-PRO3 – S7-GRAPH
Training Document V13.0 10-5
SIMATIC TIA Portal S7-1500 Programming 3
Sequence view
Step SHIFT+F5
Drag & drop
instructions Branch SHIFT+F9
Jump SHIFT+F12
Sequencer
SHIFT+F7
end
Overview
In creating a sequencer, you are supported by functions for graphic programming. You can easily
create a sequencer’s structure without programming knowledge by arranging the S7-GRAPH
structure elements in such a way that a visual representation of the sequencer results.
Structure of a Sequencer
A sequencer consists of a sequence of steps and transitions. This sequence can be linear or
branched.
• In the steps, the commands to the system are formulated.
• The transitions contain the conditions for the switching from one step to the next.
The following symbols show the elements that can make up a sequencer. You can select these
symbols from the toolbar.
TIA-PRO3 – S7-GRAPH
10-6 Training Document V13.0
SIMATIC TIA Portal S7-1500 Programming 3
Alarm
Interlock function for querying the
optional
conditions
S2
Filling Step The actions are formulated in a step
Optional: Action is only executed if the
interlock condition is fulfilled.
Interlock
An interlock is a programmable condition within a step. If the condition is fulfilled (true), this is the
good case: There is no fault. A protective guard is closed, for example. If you have not
programmed an interlock in a step, this is handled as a good case. Then, an action that is linked
with the interlock is executed. The move to the next step occurs independent of the interlock.
When a step is deactivated, an existing interlock is automatically canceled.
Supervision
A supervision is a programmable condition within a step. If the condition is not fulfilled (false), this
is the good case. A container is emptied, for example. If a fault has occurred, the bad case has
occurred, with which the condition "Container empty" is fulfilled. A fulfilled supervision leads to a
fault alarm. You can define the properties and contents of alarms in the pane "Alarms" in the area
navigation of the programming window.
The move to the next step only occurs if the supervision error no longer exists and the following
transition is fulfilled. If a step is deactivated, the existing supervision error is automatically
canceled. With that, a step that is not active can also not be disturbed.
TIA-PRO3 – S7-GRAPH
Training Document V13.0 10-7
SIMATIC TIA Portal S7-1500 Programming 3
Overview in
the
navigation
Track active
step: The active
step is
automatically
displayed
Actions
Logic of the
Additional
transition
Test settings
Test Functions
• Display active steps or disturbed steps
• Status display and Modify variable
• Switch between the operating modes: Manual, Automatic and Jog
TIA-PRO3 – S7-GRAPH
10-8 Training Document V13.0