<Toc> <Ind>
<2. Functions and Operation >
2-5
IM 34M6H54-01E
2.2
Operation of Modules
■
Basic Operation of the Counter
The module incorporates a 16-bit ring up-counter to count the number of input pulses:
rising inputs from off to on, or falling inputs from on to off. The initial value of the counter is
0 (zero). The counter can count from $0 to $FFFF in hexadecimal. If the counter value
exceeds $FFFF, the counter will reset to 0.
Select a count edge of either rising or falling to count the number of input pulses (see the
input functions).
TIP
Note that a count value exceeding 32,767 in decimal numbers is expressed as a negative number.
■
Setting the Ring Up-Counter Maximum Value
The counter has been set to count $0 to $FFFF in hexadecimal as a ring up-counter.
However, the maximum count value of the counter can be changed by setting bit 1 at the
input data set position and changing preset value 2 to an appropriate value. The ring up-
counter maximum set value is given by:
Ring up-counter maximum value = (preset value 2) – 1
In the above setting, if bit 0 is set, the ring up-counter maximum value will be $FFFF (see
the example below).
Example: When set value 2 is changed to 5, the ring up-counter is configured as follows:
Counter value changes: 0 to 1 to 2 to 3 to 4 to 0 to 1 to 2 to 3 to 4 to 0 to 1 to 2 to ......
The module detects a preset value when the counter value changes from 4 to 5, and
the counter will then reset to 0. This will configure a 0 to 4 ring up-counter.
When the counter is used as a variable ring up-counter, set the ring maximum value greater
than 20 (instead of set value 2). If the input pulse frequency is 1 kHz or lower, there is no
maximum set value limitation on preset value 2.
Input pulse frequency
Preset value 2 for variable ring up-counter
0 Hz to 1 kHz
No limitations on preset value 2
1 to 20 kHz
Preset value 2
≥
20
TC0202.EPS
CAUTION
To change the ring up-counter maximum value, first stop the counter operation and then
reset it. If its maximum value is changed while the counter is operating, operation of the
counter will not be assured.
1st Edition : Feb.01,1999-00
Содержание FA-M3 Series
Страница 2: ...Blank Page...
Страница 8: ...Blank Page...
Страница 10: ...Blank Page...
Страница 56: ...Blank Page...
Страница 66: ...Blank Page...