Counters, Timers And Arithmetic In Actions - Siemens SIMATIC S7-GRAPH Manual

For s7-300/400 programming sequential control systems
Table of Contents

Advertisement

Example: Action Table with Event-Dependent Actions
S4
Step4
(1): As soon as the step is active and the interlock is satisfied, output Q1.0 is set to
0 and remains set to 0.
(2): As soon as the supervision error occurs, all active steps are deactivated,
except for step S4 in which the action is located.
(3): As soon as the interlock condition is satisfied, the specified block (FC10) is
called.
7.4

Counters, Timers and Arithmetic in Actions

Counters in Actions
All counters in actions are always dependent on an event, in other words the event
determines the time at which the instruction is activated. You also have the option
of combining counters with an interlock. The count instructions combined with the
interlock are only executed when the conditions of the interlock are satisfied (letter
C added) as well as the event occurring. Counters without an interlock are
executed when the event occurs.
The counters in actions behave like the counters in other S7 programming
languages: There is no overflow and no underflow and with a counter reading of 0,
the counter bit is also 0, otherwise it is 1.
Event
Instruction
S1, S0, L1, L0,
CS[C]
V1, V0, A1, R1
S1, S0, L1, L0,
CU[C]
V1, V0, A1, R1
S1, S0, L1, L0,
CD[C]
V1, V0, A1, R1
S7-GRAPH for S7-300/400 Programming Sequential Control Systems
C79000-G7076-C526-01
Step4
1
S1 RC
V1 OFF
2
L0 CALL
3
Address
Address
Identifier
Location
C
X
<initial counter
value>
C
X
C
X
Programming Actions and Conditions
A1.0
S_ALL
FC10
Meaning:
Set: As soon as the event occurs [and
the interlock is satisfied], the initial
counter value is loaded in the counter.
Initial counter value
Count up: As soon as the event occurs
[and the interlock is satisfied], the counter
value is incremented by "1".
Count down: As soon as the event
occurs [and the interlock is satisfied], the
counter value is decremented by "1".
7-7

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the SIMATIC S7-GRAPH and is the answer not in the manual?

Table of Contents

Save PDF