7: B
ASIC
I
NSTRUCTIONS
FC5A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
FC9Y-B1268
7-13
CDP (Dual-Pulse Reversible Counter)
The dual-pulse reversible counter CDP has up and down pulse inputs, so that three inputs are required. The circuit for a
dual-pulse reversible counter must be programmed in the following order: preset input, up-pulse input, down-pulse
input, the CDP instruction, and a counter number C0 through C255, followed by a counter preset value from 0 to 65535.
The preset value can be designated using a decimal constant or a data register. When a data register is used, the data of the
data register becomes the preset value.
Caution
500 500
Ladder Diagram
Preset Input I0
ON
OFF
Up Pulse I1
ON
OFF
Down Pulse I2
ON
OFF
Timing Chart
Counter C1
ON
OFF
500 501 502 501
Counter C1 Value
500 499
0
1
• • •
• • •
I0
I1
CDP
C1
500
I2
Preset Input
Up Pulse
Down Pulse
I3
C1
Instruction
Data
LOD
LOD
LOD
CDP
LOD
AND
OUT
I0
I1
I2
C1
500
I3
C1
Q1
Program List
The same counter number cannot be pro-
grammed more than once.
The preset input must be turned on initially so
that the current value returns to the preset value.
The preset input must be turned off before count-
ing may begin.
When the up pulse and down pulses are on simul-
taneously, no pulse is counted.
The counter output is on only when the current
value is 0.
After the current value reaches 0 (counting down),
it changes to 65535 on the next count down.
After the current value reaches 65535 (counting
up), it changes to 0 on the next count up.
When power is off, the counter’s current value is
held, and can also be designated as “clear” type
counters using the Function Area Settings (see
page 5-5).
Counter preset and current values can be changed
using WindLDR without downloading the entire
program to the CPU again. From the WindLDR
menu bar, select
Online
>
Monitor
>
Monitor
,
then
Online
>
Custom
>
New Custom Monitor
.
Change the current value while the counter preset
input is off.
When the preset or current value is changed dur-
ing counter operation, the change becomes effec-
tive immediately.
For the data movement when changing, confirm-
ing, and clearing preset values, see page 7-18. Pre-
set values can also be changed and changed
preset values can be confirmed using the HMI
module. See pages 5-63 and 5-65.
WindLDR ladder diagrams show CP (counter pre-
set value) and CC (counter current value) in
advanced instruction devices.
Q1
For restrictions on ladder programming
of counter instructions, see page 7-32.
Counter Operation after Count out
Condition
Counter Output
When the counter has counted
out, either the current value or
preset value is changed.
The counter maintains the
counted out status.
Before the counter has counted
out, the current value is changed
to a larger value than the preset.
The counter output is turned
on.
The preset value is changed to 0.
The counter output is turned on
without regard to the current
value.
When the reset value is on, the
preset value is changed to 0.
The counter output is not
turned on.
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]