10: DATA COMPARISON INSTRUCTIONS
10-2 OPENNET CONTROLLER USER’S MANUAL
Valid Operands
For the valid operand number range, see page 6-2.
▲ Internal relays M0 through M2557 can be designated as D1. Special internal relays cannot be designated as D1.
When T (timer) or C (counter) is used as S1 or S2, the timer/counter current value is read out.
Valid Data Types
When a bit operand such as I (input), Q (output), M (internal relay), or R (shift register) is designated as the source, 16
points (word or integer data type) or 32 points (double-word or long data type) are used. When repeat is designated for a
bit operand, the quantity of operand bits increases in 16- or 32-point increments.
When a word operand such as T (timer), C (counter), D (data register), or L (link register) is designated as the source, 1
point (word or integer data type) or 2 points (double-word or long data type) are used. When repeat is designated for a
word operand, the quantity of operand words increases in 1- or 2-point increments.
When an output or internal relay is designated as the destination, only 1 point is used regardless of the selected data type.
When repeat is designated for the destination, outputs or internal relays as many as the repeat cycles are used.
Examples: CMP>=
The comparison output is usually maintained while the input to the data comparison instruction is off. If the comparison
output is on, the on status is maintained when the input is turned off as demonstrated by this program.
This program turns the output off when the input is off.
Operand Function I Q M R T C D L Constant Repeat
S1 (Source 1) Data to compare XXXXXXXX X 1-99
S2 (Source 2) Data to compare XXXXXXXX X 1-99
D1 (Destination 1) Comparison output — X ▲ ————— — 1-99
W (word) I (integer) D (double word) L (long)
XX X X
Input I0
ON
OFF
Comparison
D10 ≥ C1
D10 < C1
Comparison
ON
OFF
I0
REPS1 –
D10
D1 –
Q0
CMP>=(W)
Result
Output Q0
S2 –
C1
I0
M0
REPS1 –
D10
D1 –
M0
S2 –
C1
Input I0
ON
OFF
Comparison
D10 ≥ C1
D10 < C1
ON
OFF
Result
Output Q0
Q0
CMP>=(W)
Phone: 800.894.0412 - Fax: 888.723.4773 - Web: www.clrwtr.com - Email: info@clrwtr.com