4 Special Functions
3-62 SmartAXIS Touch User's Manual
● Settings
■ Operation Mode
Inputs for group 2, group 3, group 4 and group 5 can only be used as single-phase high-speed counters.
When group 1 is selected as the high-speed counter, group 2 (I2) can be used as clear input.
■ Counting Mode (single-phase high-speed counter)
The adding counter can only be used for group 2, group 3, group 4 and group 5 high-speed counters.
Adding Counter
The adding counter counts up with the rise in pulse input.
■ Counting Mode (two-phase high-speed counter)
When the two-phase high-speed counter is specified for Operation Mode for group 1, the counting mode can be
selected as 2-edge count or 4-edge count. The two-phase counter cannot be used for the group 2, group 3, group
4 and group 5 high-speed counters.
2-edge count
This counter counts at double the frequency of the input pulse.
This counter counts by the phase difference between the A-phase and B-phase pulse input. When A-phase precedes
B-phase, the counter counts up with the rise and fall of B-phase. When B-phase precedes A-phase, the counter
counts down with the rise and fall of B-phase.
4-edge count
This counter counts at quadruple the frequency of the input pulse.
This counter counts by the phase difference between A-phase and B-phase pulse input. When A-phase precedes B-
phase, the counter counts up with the rise and fall of A-phase and B-phase. When B-phase precedes A-phase, the
counter counts down with the rise and fall of A-phase and B-phase.
■ Comparison Action
The comparison action is a function that compares the high-speed counter's current value with a preset value (target
value).
It can use either the comparison output or an interrupt program. However, the interrupt program can only be used
when ladder program is selected as the programming language.
• When Comparison Output is selected, the specified external output is turned on when the current value and the
preset value match.
• When Interrupt Program is selected, the subroutine program with the specified label number is executed as the
interrupt program when the current value and the preset value match.
Overflow and underflow can also be used for the comparison conditions.
For details on the comparison actions, refer to “Comparison Actions” on page 3-59.
■ Comparison Settings
When using the comparison output or the interrupt program as the comparison action for the high-speed counter,
configure the external output number or the label number when there is a match. A maximum of six preset values can
be specified for Number of Comparisons (preset value number 1 to 6).
Tag Name
Specify the Tag name which is allocated to the starting address of the data register region to store the preset values.
Device Address
Shows the address of the data register specified by the tag name.
Number of Comparisons
You can configure a maximum of six preset values (target values) for the comparison action.
Output
When a comparison action is selected, these are the external outputs specified for preset value 1 to 6.
The external outputs that can be used as comparison outputs are Q0 to Q3.
• The preset value becomes active by the END process
ing in the second scan after the Touch starts
operation. Store Preset Value in the data registers with initialize pulse M8120 input.
• When the preset value (special data register) is changed before the comparison, the preset value
currently being used for the comparison is discarded in the program's END processing, and the
comparison is performed with the newly configured preset value.