
2 Basic principles of the counter module
Counter Module SIMATIC FM 350-2
V1.0, Item ID: 83146298
11
C
o
p
yr
ig
h
t
S
ie
m
e
n
s
A
G
2
0
1
3
A
ll
ri
g
h
ts
r
e
se
rv
ed
2.3.2
Interrupting and canceling a counting mode
The operating modes for counting are: continuous, single and periodic counting.
These modes are active as long as the internal gate setting is TRUE. By default,
the counting modes are canceled when the internal gate is set to FALSE.
When the gate is set to FALSE, the function of the channel is canceled by default.
Canceled means that the value currently being counted is overwritten by the start
value when the channel is re-activated. The default start value is 0.
It is possible to set the properties to interrupt instead of cancel in the configuration
interface. This only applies to the counting functions.
If the setting is configured to interrupt, then counting will continue from the existing
value in the counter when a reactivation occurs.
Table 2–1: Overview of counter behavior when the internal gate is set and the hardware
gate has not been activated in the configuration.
Configuration
SW gate
Internal
gate
Behavior
Canceling
Set to
TRUE
The start value is loaded. Counting begins
from this value.
Interrupting
Counting continues from the current count.
= positive edge
If you wish to also use the hardware gate, there is an anomaly in the canceling
behavior of the counter channel. Here, the current count is only overwritten
if a positive edge causes the internal gate to be set at the hardware gate.
Table 2–2: Overview of counter behavior when the internal gate is set. The hardware gate
has been activated in the configuration.
Configuration
SW gate
HW gate
Internal
gate
Behavior
Canceling
1
Set to
TRUE
Counting continues from
the current count.
1
The start value is loaded.
Counting begins from this value.
Interrupting
1
Counting continues from
the current count.
1
- positive edge
Note
A description of the configuration can be found in chapter 3.6.4.