![Fuji Electric MICREX-SX series Скачать руководство пользователя страница 44](http://html.mh-extra.com/html/fuji-electric/micrex-sx-series/micrex-sx-series_user-manual_2341770044.webp)
Section 4 High-speed Counter
4-8
4-2 How to Use High-speed Counter
4-2-2 Catching the current value
Counting is enabled when the count control flag (%MX10.272.0) is OFF (default).
If a signal is inputted from an external encoder to the encoder input, the current counter value is stored in the
high-speed
counter current value (%MD10.276)
.
4-2-3 Resetting the current value
The current counter value can be reset (cleared to zero) by an application of the PLC.
When the status of the
current value reset flag (%MX10.272.1)
is changed from 0 to 1 (at the rising edge), the current counter
value is reset. To reset again, restore this flag once to 0 (zero).
4-2-4 Presetting the current counter value
This function is used to forcibly change the current counter value to an arbitrary value.
<Presetting procedure>
1) Write data in the preset value register (%MD10.284).
2) Set the current value preset flag (%MX10.272.7) to ON.
When presetting is completed, this flag is automatically reset to 0 (zero).
4-2-5 Setting comparison value
In this paragraph, counter comparison value is set. The comparison value is used by the following functions:
Auto Reset function
Match interrupt
Comparison value is recognized when the comparison value set flag (%MX10.272.6) is set to ON or this board is powered
once OFF and then ON again after it is written in the comparison value setting register (%MD10.280).
When the setting of comparison value is completed, this flag is automatically reset to 0 (zero).
4-2-6 Match interrupt
This function makes an interrupt take place when the current counter value coincides with the set comparison value.
Flags related to match interrupt are listed below.
Name
Address
Description
Interrupt factor latch all
reset
%MX10.268.15
Resets the interrupts latched while interrupt due to external interrupt input or high-
speed counter match was disabled.
Match interrupt
%MX10.275.0
This is a flag for setting conditions for an event task.
It is used for the match interrupt for high-speed counter. If the current value coincides
with the set value when match interrupt is enabled, the set event task is started.
Match interrupt enable
%MX10.272.2
Sets Enable / Disable of match interrupt for high-speed counter.
ON: Enable, OFF: Disable
Match occurrence clear %MX10.272.3
Clears the match occurrence status of high-speed counter. When this flag is set ON,
a request to clear is issued. When the clearing is completed, this flag is set OFF by
the system.
Match interrupt latch
reset
%MX10.272.4
Resets the match interrupt latched while interrupt was disabled for high-speed
counter.
Match occurrence
%MX10.274.0
This flag is set ON when the set value of high-speed counter coincides with its
current value. This flag is cleared when the "match occurrence clear" flag
(%MW10.272.3) is set ON.