![IDEC OpenNet series User Manual Download Page 126](http://html.mh-extra.com/html/idec/opennet-series/opennet-series_user-manual_617384126.webp)
7: B
ASIC
I
NSTRUCTIONS
O
PEN
N
ET
C
ONTROLLER
U
SER
’
S
M
ANUAL
7-13
CUD (Up/Down Selection Reversible Counter)
The up/down selection reversible counter CUD has a selection input to switch the up/down gate, so that three inputs are
required. The circuit for an up/down selection reversible counter must be programmed in the following order: preset input,
pulse input, up/down selection input, the CUD 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.
Ladder Diagram
I0
I1
CUD
C2
500
I2
Preset Input
Pulse Input
U/D Selection
I3
C2
Rung 2
Rung 1
Prgm Adrs
Instruction
Data
Rung 1
0
1
2
3
4
LOD
LOD
LOD
CUD
I0
I1
I2
C2
500
Rung 2
5
6
7
LOD
AND
OUT
I3
C2
Q2
Program List
•
The same counter number cannot be
programmed more than once.
•
The preset input must be turned on ini-
tially so that the current value returns to
the preset value.
•
The preset input must be turned off
before counting may begin.
•
The up mode is selected when the up/
down selection input is on.
•
The down mode is selected when the
up/down selection input is off.
•
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 desig-
nated as “clear” type counters using the
Function Area Settings (see page 5-3).
•
Counter preset and current values can
be changed using
WindLDR
without
transferring the entire program to the
CPU (see page 7-12).
•
When the preset or current value is
changed during counter operation, the
change becomes effective immediately.
500 500
Preset Input I0
ON
OFF
Pulse Input I1
ON
OFF
U/D Selection Input I2
ON
OFF
Timing Chart
Counter C2
ON
OFF
500 501 502 501
Counter C2 Value
500 499
0
1
• • •
• • •
Caution
• When using
WindLDR Ver. 3
, any instruction cannot be
programmed immediately above and below the CUD
instruction. To program other instructions, start a new
rung. If an instruction is entered above or below the
CUD instruction in the same rung, the program is not
compiled correctly.
Q2
•
The reset or preset input has priority over the pulse
input. One scan after the reset or preset input has
changed from on to off, the counter starts counting
the pulse inputs as they change from off to on.
Reset/Preset
ON
OFF
Pulse
ON
OFF
More than one scan
time is required.
Valid
Invalid
Valid
•
When the CPU is turned off, counter current values are
maintained unless designated as “clear” type counters.
When resetting the counter current values is required at
start up, include initialize pulse special internal relay
M8120 in an OR circuit with the reset input.
CNT
C0
5
M8120
Reset
Pulse
I0
I1
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: [email protected]