
Parameterising 1xcounter/16xdigital input module
Measuring the period (mode 4)
12
Parameter setting via system bus (CAN) / CANopen
12.6
12.6.7
L
12.6−13
EDSPM−TXXX−9.0−11/2009
12.6.7 Measuring the period (mode 4)
In mode 4 the counter operates as a permanent period meter. The counter counts
the number of rising edges of a reference counter between two rising edges of
signal A (E.0).
The frequency of a reference counter can be preset in the Rx PDO in byte 5 (Ref.
Freq.).
Byte Assignment
5 Reference frequency
00
h
16 MHz
01
h
8 MHz
02
h
4 MHz
03
h
1 MHz
04
h
100 kHz
05
h
10 kHz
06
h
1 kHz
07
h
100 Hz
08
h...
FF
h
not permissible
The software gate which releases the counting process is opened when bit 0 (Start)
in the byte 4 (Control) has HIGH level. It is closed as soon as bit 1 (Stop) has HIGH
level.
When the software gate is open:
l The reference counter is started by the first rising edge of signal A and then
incremented with every rising edge of the reference clock.
l The next rising edge of signal A stops the reference counter.
The counter can be cleared at any time via a HIGH level in byte 4 (Control), bit 3
(Clear). Then the measuring process is restarted with the next rising edge of signal
A.
T +
1
f
ref
@ n
T Period
f
ref
Reference frequency
n Count value
Example: Reference frequency f
ref
= 1 MHz, count value n = 10,000
T +
1
1MHz
@ 10000 + 10ms
) Note!
The count value remains valid until the next measurement is
completed or the counter is reset via the clear signal; this means
that you do not receive the current count value, but the one from
the previous measurement if a measurement has not been
completed, e.g. because no second rising edge of signal A has
occurred.
Reference frequency
Start/stop signal
A signal
Clear signal
Period calculation
Comentarios a estos manuales