Sunteți pe pagina 1din 25

Event-Dependent Actions and Branches

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.1
Target

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.2
Event-Dependent Actions

 Action block with event-dependent instructions


Action block _4
A1 N M1.1
here an action is executed
L1 N M1.2
once in the cycle in which the
event occurred
L0 N M1.3
S1 N M1.4
S0 N M2.4
V1 N M2.5
V0 N M2.6

 A1 = Acknowledge
 L1 = Interlock, interlock error entering state
 L0 = Interlock, interlock error leaving state
 S1 = Step, step becomes active
 S0 = Step, step is deactivated
 V1 = Supervision, supervision error occurred
 V0 = Supervision, supervision error cleared

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.3
Event-Dependent Actions, Example

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.4
Conditions in Transitions, Interlock and Supervision

Step before
S3 transition
Step 3

Valve_1 Valve_2 Transition number


T3
Valve_ON Transition name

CMP Normally-open contact


MW0 ==I
MW2 Normally-closed contact

Comparator

LAD branch, OPEN

LAD branch, CLOSED

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.5
Binary Query of Sequencer Data

 Signals occurring once = pulses of edge evaluation


 Si.S1 / Si.S0 = step no. i becomes active / is deactivated
 Si.L1 / Si.L0 = interlock disturbance leaving / entering step no. i
 Si.V1 / Si.V0 = supervision error occurred / cleared in step no. i
 Si.A1 = disturbance acknowledged in step no. i
 Example: transition T3 enables next step when step S002 acknowledged
S002.A1
T3

 Static signals
 Si.X = step no. i becomes active
 Si.LA = interlock disturbance in step no. i is active
 Si.VA = supervision error in step no. i is active
 Si.AA = acknowledgement in step no. i is active
 Example: supervision error in S002 results in an interlock disturbance
S002.VA Interlock
()

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.6
Example 1: Step Enable with Interlock

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.7
Example 2: Querying Timers

This example describes a sequence supervision of max. 5 sec to step S 3,


whereby the supervision disturbance with transition satisfied (TT = Transition True)
can acknowledge itself.
(Compiler setting: "Acknowledge errors" not set)

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.8
Example 3: Acknowledging Supervision Time
For different FB parameter sets / settings:
Standard / Maximum / User-Definable All FB parameter sets
(acknowledge errors) (without acknowledgement)

FB sequencer Acknowledgement in supervision

+ transition OK !
ACK_EF ERR_FLT

Can be used with all parameter sets for


step granular acknowledgement.
Âcknowledge when transition satisfied Deactivate step:
--> OFF Sx in sequencer
--> S_OFF-->S_ON for set step

Initialize/deactivate sequencer:
--> Parameter INIT_SQ
--> Parameter OFF_SQ
(sequencer must then be initialized again)

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.9
Example 4: Querying Supervisions and Transitions

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.10
Example 5: Querying Static Signals

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.11
Example 6: Word Instructions in Action Blocks

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.12
Exercise (1): General Program Improvements

S1
?
T1

S2

T2

S3

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.13
Additional Exercise: Documentation Using Symbolics

S1

T1

S2

T2

S3

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.14
Exercise (2): Program Expansion Analog Value Acquisition

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.15
Exercise (3): Event-Dependent Weight Measurement

S1

T1

S2

T2

S3

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.16
Elements for Alternative Branches

Open alternative branch


Application: left branch part ok
right branch part faulty
Only one branch can be active in automatic and semi-automatic mode.
Left branch always has priority 1, all other branches according to ascending T
no. Execution is from top to bottom and left to right.

Close alternative branch


The appropriate branch is closed for execution again to the left. Execution is
from top to bottom and right to left.

1st priority 2nd priority


Order of priority from left to right (like GRAPH 5)

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.17
Elements for Simultaneous Branches

Open simultaneous branch


-> All participating steps are synchronized in the same PLC cycle
after the branch is opened
-> Then: each branch executed separately until it is closed
-> It is possible to step-enable all branches in the same PLC cycle
-> Preceding transiton is also called opening transition

Close simultaneous branch


-> Synchronization takes place when joined
i.e. all branches wait for one another until all steps preceding
the close branch are active. Once this is the case, the
subsequent transition to the left branch is step-enabled
and the participating branches are closed.
-> The subsequent transition is also called closing transition

Note: you can tell simultaneous branches by the double lines

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.18
Simultaneous Branch Application (1), Stamping Machine Example
Process schematic
stamping machine Upper dead center S5 (opener)

Lower dead center S6

Blank parts

Stamp

Slide

Container for collecting


rejected parts
Pos. S1 Pos. S2 Pos. S3

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.19
Simultaneous Branch Application (2), Stamping Machine Example

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.20
Partial Sequencers as Elements of the Sequencer Complex,
Subsequencers

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.21
Exercise (4): Expansion through Alternative Branches

Check_part

Not OK?
OK?

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.22
Exercise (5): Counting Rejected Parts

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.23
Exercise (6): Integration and Additional Functions in OB1

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.24
Additional Exercise: Integrate Assembly Bay 2 and 3

INI 1 to INI 3 LS 1
proximity switch Light barrier
Conveyor Buzzer
OFF / ON

Final assembly

H4

L R
M1 H 1, H 2, H 3 S 1, S 2, S 3, S 4
Motor LEDs Acknowledge keys

SIMATIC S7 Date: 19.07.2019 SITRAIN Training for


Automation and Drives
Siemens AG 2000. All rights reserved. File: GRAPH_06e.25

S-ar putea să vă placă și