IDEC MicroSmart User Manual

Page 129

Advertising
background image

5: S

PECIAL

F

UNCTIONS

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

5-9

Special Internal Relays for Two-phase High-speed Counter (Slim Type CPU Modules)

Note: Special internal relays M8130 through M8132 and M8135 through M8137 go on for only one scan.

Special Data Registers for Two-phase High-speed Counter (Slim Type CPU Modules)

Two-phase High-speed Counter Specifications (Slim Type CPU Modules)

Single-phase High-speed Counters HSC1 through HSC4 (Slim Type CPU Modules)

HSC1 and HSC4 can also be used as a single-phase high-speed counter as well as HSC2 and HSC3. The four single-phase
high-speed counters count input pulses to the input terminal allocated to each high-speed counter. When the preset value is
reached, a designated comparison output turns on, and the current value is reset to 0 to count subsequent input pulses.

Two special data registers and four special internal relays are assigned to control and monitor the single-phase high-speed
counter operation. The current value is stored in a special data register (current value) and is updated every scan. The value
stored in another special data register (preset value) is used as a preset value. When a reset input special internal relay is
turned on, the current value is reset to 0.

The single-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 0, and the value stored in a preset value special data register takes
effect for the subsequent counting cycle. When a comparison output reset special internal relay is turned on, the designated
comparison output is turned off.

In addition, only the single-phase high-speed counter HSC1 or HSC4 has reset input I2 or I5 and reset status special inter-
nal relay M8130 or M8135. When reset input I2 or I5 is turned on to reset the current value to 0, reset status special inter-
nal 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-14.

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

Current Value Overflow

M8131

M8136

Over flow occurred

Read only

Current Value Underflow

M8132

M8137

Under flow occurred

Read only

Description

High-speed Counter No.

Updated

Read/Write

HSC1

HSC2

HSC3

HSC4

High-speed Counter Current Value

D8045

D8051

Ever y scan

Read only

High-speed Counter Reset Value

D8046

D8052

R/W

Maximum Counting Frequency

20 kHz

Counting Range

0 to 65535 (16 bits)

Operation Mode

Rotar y encoder (phases A, B, Z)

Gate Control

Enable/disable counting

Current Value Reset

Current value is reset to a given value when the current value over flows 65535 or
under flows 0, or when reset input I2/I5 or reset input special internal relay M8032/
M8046 is turned on.

Control/Status Relays

Special internal relays are provided to control and monitor the high-speed counter
operation.

Comparison Output

Any output number available on the CPU module can be designated as a comparison
output which turns on when the current value reaches the preset value.
Output numbers on expansion output or mixed I/O modules cannot be designated as a
comparison output.

Advertising