5: B
ASIC
I
NSTRUCTIONS
5-12
FT1A S
MART
A
XIS
U
SER
’
S
M
ANUAL
FT9Y-B1382
CNT, CDP, and CUD (Counter)
Three types of counters are available; adding (up) counter CNT, dual-pulse reversible counter CDP, and up/down selection
reversible counter CUD. A total of 100 (FT1A-12) or 200 (other FT1A series) counters can be programmed in a user program. Each
counter must be allocated to a unique number C0 through C199.
The valid device range depends on the CPU module type. For details, see pages 6-1 and 6-2.
The preset value can be 0 through 65535 and designated using a decimal constant or data register.
CNT (Adding Counter)
When counter instructions are programmed, two addresses are required. The circuit for an adding (UP) counter must be
programmed in the following order: reset input, pulse input, the CNT instruction, and a counter number C0 through C199, 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.
Counter
Device Address
Preset Value
CNT (adding counter)
C0 to C199
Constant:
0 to 65535
CDP (dual-pulse reversible counter)
C0 to C199
Data registers:
D0 to D1999
CUD (up/down selection reversible counter)
C0 to C199
The same counter number cannot be programmed more than
once.
While the reset input is off, the counter counts the leading edges
of pulse inputs and compares them with the preset value.
When the current value reaches the preset value, the counter
turns output on. The output stays on until the reset input is
turned on.
When the reset input changes from off to on, the current value is
reset.
When the reset input is on, all pulse inputs are ignored.
The reset input must be turned off before counting may begin.
When power is off, the counter’s current value is held, and can
also be designated as “clear” type counters using 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 reset input is off.
When the preset or current value is changed during counter
operation, the change becomes effective immediately.
When power is off, the changed preset values are cleared and the
original preset values are loaded.
For the data movement when changing, confirming, and clearing
preset values, see page 5-18. Preset values can also be changed
and changed preset values can be confirmed using the LCD and
push buttons. See pages 5-63 and 5-65.
WindLDR ladder diagrams show CP (counter preset value) and CC
(counter current value) in advanced instruction devices.
Ladder Diagram
I2
Reset Input I0
ON
OFF
Pulse Input I1
ON
OFF
Counter C0
ON
OFF
Timing Chart
Output Q0
ON
OFF
1
Input I2
• • •
C0
2
3
4
5
6
ON
OFF
CNT
C0
5
I1
Reset
Pulse
I0
The preset value 0 through 65535 can be designated using a data
register D0 through D1999; then the data of the data register
becomes the preset value.
Directly after the CNT instruction, the OUT, OUTN, SET, RST, TML,
TIM, TMH, or TMS instruction can be programmed.
Q0
LOD
LOD
CNT
LOD
AND
OUT
I0
I1
C0
5
I2
C0
Q0
Program List
Instruction
Data
CNT
C28
D5
I1
Reset
Pulse
I0
Q0
Summary of Contents for microsmart pentra
Page 1: ...FT1A SERIES FC9Y B1382 Ladder Programming Manual ...
Page 6: ...Preface 5 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 104: ...7 DATA COMPARISON INSTRUCTIONS 7 10 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 122: ...8 BINARY ARITHMETIC INSTRUCTIONS 8 18 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 138: ...10 SHIFT ROTATE INSTRUCTIONS 10 12 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 162: ...11 DATA CONVERSION INSTRUCTIONS 11 24 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 188: ...12 CALENDAR COMPARISON INSTRUCTIONS 12 26 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 198: ...15 REFRESH INSTRUCTIONS 15 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 202: ...16 INTERRUPT CONTROL INSTRUCTIONS 16 4 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...
Page 266: ...20 DUAL TEACHING TIMER INSTRUCTIONS 20 4 FC5A MICROSMART USER S MANUAL FC9Y B1273 ...
Page 318: ...25 USER COMMUNICATION INSTRUCTIONS 25 22 FT1A SMARTAXIS USER S MANUAL FT9Y B1382 ...