IDEC FC4A-C10R2 User Manual page 135

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

Example: Two-phase High-speed Counter for Counting Input Pulses from Rotary Encoder
This example demonstrates a program for two-phase high-speed counter HSC1 to punch holes in a paper tape at regular
intervals.
Description of Operation
A rotary encoder is linked to the tape feed roller directly, and
the output pulses from the rotary encoder are counted by the
two-phase high-speed counter in the
When the high-speed counter counts 2,700 pulses, the compar-
ison output is turned on. When the comparison output is turned
on, the high-speed counter continues another cycle of counting.
The comparison output remains on for 0.5 second to punch
holes in the tape, and is turned off before the high-speed
counter counts 2,700 pulses again.
Program Parameters
Group 1 (I0 - I2)
High-speed Counter Settings
Enable Comparison
Comparison Output
Use HSC Reset Input (I2)
HSC Reset Value (D8046)
Timer Preset Value
Note: This example does not use the phase Z signal (input I2).
Programming WindLDR
MicroSmart
CPU module.
Two/Single-phase High-speed Counter
Two-phase High-speed Counter
Yes
Q1
No
To cause current value overflow every 2700 pulses, store 62836 to D8046
(65535 – 2700 + 1 = 62836)
0.5 sec (needed for punching) programmed in TIM instruction
« FC4A M
S
ICRO
MART
Rolled Tape
Rotary Encoder
U
'
M
»
SER
S
ANUAL
5: S
F
PECIAL
UNCTIONS
Feed Roller
Tape Punch
5-15

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents