5: S
PECIAL
F
UNCTIONS
5-20
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
Eight special internal relays and eight special data registers are assigned to control and monitor each two-phase high-
speed counter operation. The current value is stored in two special data registers (current value) and is updated every
scan. The value stored in another two special data registers (preset value) is used as a preset value. When a reset input
special internal relay is turned on, the current value is reset to the reset value. HSC1 and HSC4 can set two preset values.
The two-phase high-speed counter is enabled while a gate input special internal relay is on and is disabled while the gate
input is off. When the current value reaches the preset value, a special internal relay (comparison ON status) turns on in
the next scan. At this point, the current value is reset to the reset value, and the value stored in preset value special data
registers takes effect for the subsequent counting cycle. If HSC1 or HSC4 is set to keep the current value when the current
value reaches the first preset value, HSC1 or HSC4 continues counting until the current value reaches the second preset
value. When a comparison output reset special internal relay is turned on, the designated comparison output is turned
off.
In addition, HSC1 or HSC4 has reset input I2 or I5 and reset status special internal relay M8130 or M8135. When reset
input I2 or I5 is turned on to reset the current value, reset status special internal relay M8130 or M8135 turns on in the
next scan. When reset input special internal relay M8032 or M8046 is turned on, M8130 or M8135 does not turn on. See
page 5-22.
Special Internal Relays for Two-phase High-speed Counters (Slim Type CPU Modules)
Description
High-speed Counter No.
ON
Read/Write
HSC1
HSC2
HSC3
HSC4
Comparison Output Reset
M8030
—
—
M8044
Turns off comparison output
R/W
Gate Input
M8031
—
—
M8045
Enables counting
R/W
Reset Input
M8032
—
—
M8046
Resets the current value
R/W
Reset Status
M8130
—
—
M8135
Current value reset by I2 or I5
Read only
Comparison 1 ON Status
M8131
—
—
M8136
Preset value 1 reached
Read only
Comparison 2 ON Status
M8132
—
—
M8137
Preset value 2 reached
Read only
Current Value Overflow
M8161
—
—
M8163
Overflow occurred
Read only
Current Value Underflow
M8162
—
—
M8164
Underflow occurred
Read only
Note:
Special internal relays M8130 to M8132, M8135 to M8137, and M8161 to M8164 go on for only one scan.
Special Data Registers for Two-phase High-speed Counters (Slim Type CPU Modules)
Description
High-speed Counter No.
Updated
Read/Write
HSC1
HSC2
HSC3
HSC4
Current Value (High Word)
D8210
—
—
D8226
Every scan
Read only
Current Value (Low Word)
D8211
—
—
D8227
Every scan
Read only
Preset Value 1 (High Word)
D8212
—
—
D8228
—
R/W
Preset Value 1 (Low Word)
D8213
—
—
D8229
—
R/W
Preset Value 2 (High Word)
D8214
—
—
D8230
—
R/W
Preset Value 2 (Low Word)
D8215
—
—
D8231
—
R/W
Reset Value (High Word)
D8216
—
—
D8232
—
R/W
Reset Value (Low Word)
D8217
—
—
D8233
—
R/W
Note:
When using the current value, preset value 1, preset value 2, and reset value in advanced instructions, select the data type of
double word (D).
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]