IDEC MicroSmart User Manual

Page 127

Advertising
background image

5: S

PECIAL

F

UNCTIONS

« FC4A M

ICRO

S

MART

U

SER

S

M

ANUAL

»

5-7

Special Data Registers for Two-phase High-speed Counter (All-in-One Type CPU Modules)

Two-phase High-speed Counter Specifications (All-in-One Type CPU Modules)

Single-phase High-speed Counters HSC1 through HSC4 (All-in-One Type CPU Modules)

HSC1 can also be used as a single-phase high-speed counter as well as HSC2 through HSC4. 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 has reset input I2 and reset status special internal relay
M8130. When reset input I2 is turned on to reset the current value to 0, reset status special internal relay M8130 turns on
in the next scan. When reset input special internal relay M8032 is turned on, M8130 does not turn on. See page 5-14.

Special Internal Relays for Single-phase High-speed Counters (All-in-One Type CPU Modules)

Note: Special internal relays M8130, M8131, M8133, M8134, and M8136 go on for only one scan.

Description

High-speed Counter No.

Updated

Read/Write

HSC1

HSC2

HSC3

HSC4

High-speed Counter Current Value

D8045

Ever y scan

Read only

High-speed Counter Reset Value

D8046

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 or reset input special internal relay M8032 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.

Description

High-speed Counter No.

ON

Read/Write

HSC1

HSC2

HSC3

HSC4

Comparison Output Reset

M8030

M8034

M8040

M8044

Turns off comparison output

R/W

Gate Input

M8031

M8035

M8041

M8045

Enables counting

R/W

Reset Input

M8032

M8036

M8042

M8046

Resets the current value

R/W

Reset Status

M8130

Current value reset by I2

Read only

Comparison ON Status

M8131

M8133

M8134

M8136

Preset value reached

Read only

Advertising