![IDEC OpenNet series User Manual Download Page 82](http://html.mh-extra.com/html/idec/opennet-series/opennet-series_user-manual_617384082.webp)
5: S
PECIAL
F
UNCTIONS
O
PEN
N
ET
C
ONTROLLER
U
SER
’
S
M
ANUAL
5-9
High-speed Counter
This section describes the high-speed counter function to count many pulse inputs within one scan. Using the built-in 16-
bit high-speed counter, the
OpenNet Controller
counts up to 65535 high-speed pulses from a rotary encoder or proximity
switch without regard to the scan time, compares the current value with a preset value, and turns on the output when the
current value exceeds the preset value. This function can be used for simple motor control or to measure lengths of objects.
The high-speed counter can be used in the rotary encoder mode or dual-pulse reversible counter mode, which can be
selected using the Function Area Settings in
WindLDR
.
The CPU module has screw terminals 1 through 5 dedicated to the high-speed counter. The high-speed counter counts up
or down input pulses to terminals 2 (phase A or CW) and 3 (phase B or CCW), and turns on the comparison output at ter-
minal 5 (comparison output) when the current value exceeds the preset value. The comparison output does not go on when
the preset value is reached, but goes on when another input pulse enters after reaching the preset value. Use of the compar-
ison output is selected using the Function Area Settings.
When the input to terminal 4 (phase Z or reset-to-zero input) is turned on, the current value is reset to zero.
Three special data registers and seven special internal relays are assigned to control and monitor the high-speed counter
operation. The high-speed counter current value is stored in data register D8045 and is updated every scan. The value
stored in D8046 is used as a reset value, and the value in D8047 is used as a preset value to compare with the current value.
When a high-speed counter reset input (described later) is turned on, the current value in D8045 is reset to the value stored
in D8046 and the high-speed counter counts subsequent input pulses starting at the reset value.
When comparison output reset special internal relay M8010 is turned on, the comparison output is turned off. While the
high-speed counter is counting up, up/down status special internal relay M8130 remains on. While counting down, M8130
remains off. When the current value exceeds the preset value, comparison ON status special internal relay M8131 turns on
in the next scan. When the current value is reset (cleared) to zero, current value zero-clear special internal relay M8132
turns on in the next scan. When a current value overflow or underflow occurs while counting up or down, special internal
relay M8133 or M8134 turns on in the next scan, respectively. While the comparison output is on, comparison output sta-
tus special internal relay M8135 remains on. While the comparison output is off, M8135 remains off. See page 5-12.
In addition, two inputs can be designated as a high-speed counter gate input and reset input to control the high-speed
counter operation. The gate input and reset input are designated using the Function Area Settings. When a gate input is
designated, counting is enabled while the gate input is on and is disabled while the gate input is off. When a gate input is
not designated, counting is always enabled. When the reset input is turned on, the current value is reset to the reset value.
High-speed Counter Operation Modes and Input/Output Terminals
Note:
When using the phase Z (reset to zero) input, keep the input signal on for 100 µsec or more.
Comparison Output Timing Chart
The comparison output at terminal 5 (comparison output) is turned on when the current value exceeds the preset value. The
comparison output does not go on when the current value equals the preset value, but goes on when another input pulse
enters after reaching the preset value. The figure below illustrates the comparison output timing when the preset value is N:
CPU Module Terminal No.
Rotary Encoder Mode
Dual-pulse Reversible Counter Mode
1
COM
COM
2
Phase A
CW
3
Phase B
CCW
4
Phase Z
Reset to zero
5
Comparison output
Comparison output
Pulse Input
ON
OFF
Comparison Output
ON
OFF
N–2
HSC Current Value
N–1
N
N+1
20 µsec maximum
N+2
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]