7: BASIC INSTRUCTIONS
7-14 OPENNET CONTROLLER USER’S MANUAL
CC= and CC≥ (Counter Comparison)
The CC= instruction is an equivalent comparison instruction for counter current values. This instruction will constantly
compare current values to the value that has been programmed in. When the counter value equals the given value, the
desired output will be initiated.
The CC≥ instruction is an equal to or greater than comparison instruction for counter current values. This instruction will
constantly compare current values to the value that has been programmed in. When the counter value is equal to or greater
than the given value, the desired output will be initiated.
When a counter comparison instruction is programmed, two addresses are required. The circuit for a counter comparison
instruction must be programmed in the following order: the CC= or CC≥ instruction, a counter number C0 through C255,
followed by a preset value to compare from 0 to 65535.
The preset value can be designated using a decimal constant or a data register D0 through D7999. When a data register is
used, the data of the data register becomes the preset value.
• The CC= and CC≥ instructions can be used repeatedly for different preset values.
• The comparison instructions only compare the current value. The status of the counter does not affect this function.
• The comparison instructions also serve as an implicit LOD instruction, and must be programmed at the beginning of a
ladder line.
• The comparison instructions can be used with internal relays, which are ANDed or ORed at a separate program
address.
• Like the LOD instruction, the comparison instructions can be followed by the AND and OR instructions.
• To compare three values, use the ICMP (interval compare greater than or equal to). See page 10-4.
Ladder Diagram (CC=)
Ladder Diagram (CC≥)
Counter # to compare with
Preset value to compare
CC=
10
C2
CC>=
D15
C3
Prgm Adrs Instruction Data
0
1
2
CC=
OUT
C2
10
Q0
Program List
Prgm Adrs Instruction Data
0
1
2
CC>=
OUT
C3
D15
Q1
Program List
Q0
Q1
Ladder Diagram
Prgm Adrs Instruction Data
0
1
2
3
4
5
CC=
OUT
LOD
AND
OUT
C5
10
M0
I0
M0
Q0
Program List
Ladder Diagram
Prgm Adrs Instruction Data
0
1
2
3
CC=
AND
OUT
C5
10
I0
Q0
Program List
Prgm Adrs Instruction Data
0
1
2
3
CC=
OR
OUT
C5
10
I0
Q0
Program List
Ladder Diagram
I0
I0
M0
CC=
10
C5 CC=
10
C5
I0
CC=
10
C5
Q0
Q0M0 Q0
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com