Interval Counter Input
4-9
SM 335 – High-Speed Analog Input/Output Module for the SIMATIC S7-300
6ES7 335-7HG00-8BA1
4.6
Example for determining the speed by means of the in-
terval counter
Prerequisites
It has been assumed that the SM 335 is in slot 4 and has module start address
256. The pulse counter input receives pulses from a sensor located on a barrel
extruder.
The sensor generates 16 pulses per revolution.
Procedure
Proceed as follows:
1. Read the value from the module.
2. Compute the speed of the barrel extruder.
Ascertaining interval duration
In order to be able to consistently access data from the pulse input, the interval
counter and interval duration must be read out with double word access
(address: module a byte 12, 13, 14, 15). You must subsequently delete
byte 12, in order to retain the value for the interval duration in double word format.
Example:
Interval duration
=
00 00 A7 F8
H
, which corresponds to 43000 in decimal
The interval number can be found in the byte (module a 12).
Computing the speed
N = 16 pulses are generated per barrel extruder revolution (N is also referred to as
the sensor’s number of pulses per revolution). The interval between two pulses
was 43,000 times 0.5
m
s long. The speed of the barrel extruder can then be com-
puted as follows:
v
+
1
T·N
+
1
43000 · 0.5
m
s · 16
+
2.907 rps
+
174.4 rpm