Programming Actions and Conditions
S7-GRAPH for S7-300/400 Programming Sequential Control Systems
C79000-G7076-C526-01
7-7
Example: Action Table with Event-Dependent Actions
S1 RC
L0 CALL
A1.0
FC10
S4
V1 OFF
S_ALL
Step4
Step4
1
2
3
(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
Address
Identifier
Address
Location
Meaning:
S1, S0, L1, L0,
V1, V0, A1, R1
CS[C]
C
X
Set: As soon as the event occurs [and
the interlock is satisfied], the initial
counter value is loaded in the counter.
<initial counter
value>
Initial counter value
S1, S0, L1, L0,
V1, V0, A1, R1
CU[C]
C
X
Count up: As soon as the event occurs
[and the interlock is satisfied], the counter
value is incremented by "1".
S1, S0, L1, L0,
V1, V0, A1, R1
CD[C]
C
X
Count down: As soon as the event
occurs [and the interlock is satisfied], the
counter value is decremented by "1".