Interval Counter Input
4-2
SM 335 – High-Speed Analog Input/Output Module for the SIMATIC S7-300
6ES7 335-7HG00-8BA1
4.1
Principle of an interval counter
Principle
An interval counter counts the number of time intervals. Figure 4-1 shows a simple
sensor. The sensor returns a ’1’ when light falls through one of the slots in the disc.
When the disc rotates, the sensor returns the signal shown in the diagram.
Rotating slotted disc
Signal
Signal
Time t
0
1
Interval
counter
t
1
Interval duration t
i
0
1
2
3
4
5
6
7
t
2
t
3
t
4
Fig. 4-1
Simple Sensor, e.g., With a Slotted Disc on a Shaft
Interval counter
The interval counter counts the number of intervals. The first interval begins on the
first transition from ’0’ to ’1’ (positive edge), and ends with the next positive edge,
which is also the start of the next interval.
Interval duration counter
The interval-counting procedure also includes acquiring the interval duration. On
each positive edge, a counter is started, which is incremented by 1 every 0.5
m
s
until the next positive edge is detected. This is called an interval duration counter.