IDEC FC4A-C10R2 User Manual page 137

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

Example: Single-phase High-speed Counter
This example demonstrates a program for single-phase high-speed counter HSC2 to count input pulses and turn on output
Q2 every 1000 pulses.
Program Parameters
Group 2 (I3)
Enable Comparison
Comparison Output
HSC Preset Value (D8048)
Programming WindLDR
Ladder Diagram
When the
MicroSmart
special internal relay M8035 is turned on at the end of the third scan to start the high-speed counter to count input pulses.
MOV(W)
S1 –
1000
M8120
SOTU
M0
SOTD
M8120
Single-phase High-speed Counter
Yes
Q2
1000
starts operation, preset value 1000 is stored to preset value special internal relay D8048. Gate input
D1 –
REP
D8048
R
M8035
R
M0
S
M8035
S
M0
END
« FC4A M
M8120 is the initialize pulse special internal relay.
1st scan
MOV instruction stores a reset value of 1000 to D8048 (preset value).
M8035 (gate input) is turned off.
M0 is turned off.
3rd scan
At the rising edge of M0, M8035 (gate input) is turned on. After the END
processing of the third scan, HSC2 starts counting.
2nd scan
At the falling edge of M8120 (initialize pulse), M0 is turned on. HSC2 is
initialized in the END processing of the second scan.
When HSC2 current value reaches 1000, output Q2 (comparison output)
is turned on, and HSC2 starts to repeat counting from zero.
S
U
'
M
ICRO
MART
SER
S
ANUAL
5: S
PECIAL
»
F
UNCTIONS
5-17

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents