Cmp= (Compare Equal To); Cmp<> (Compare Unequal To); Cmp< (Compare Less Than); Cmp> (Compare Greater Than) - IDEC FC4A-C10R2 User Manual

Fc4a series microsmart micro programmable logic controller
Table of Contents

Advertisement

10: D
ATA
Introduction
Data can be compared using data comparison instructions, such as equal to, unequal to, less than, greater than, less than or
equal to, and greater than or equal to. When the comparison result is true, an output or internal relay is turned on. The
repeat operation can also be used to compare more than one set of data.
Three values can also be compared using the ICMP>= instruction.
Since the data comparison instructions are executed in each scan while input is on, a pulse input from a SOTU or SOTD
instruction should be used as required.

CMP= (Compare Equal To)

CMP=(*)
S1(R)
*****
CMP<> (Compare Unequal To)
CMP<>(*)
S1(R)
*****
CMP< (Compare Less Than)
CMP<(*)
S1(R)
*****
CMP> (Compare Greater Than)
CMP>(*)
S1(R)
*****
CMP<= (Compare Less Than or Equal To)
CMP<=(*)
S1(R)
*****
CMP>= (Compare Greater Than or Equal To)
CMP>=(*)
S1(R)
*****
C
OMPARISON
S2(R)
D1(R)
REP
*****
*****
**
S2(R)
D1(R)
REP
*****
*****
**
S2(R)
D1(R)
REP
*****
*****
**
S2(R)
D1(R)
REP
*****
*****
**
S2(R)
D1(R)
REP
*****
*****
**
S2(R)
D1(R)
REP
*****
*****
**
« FC4A M
I
NSTRUCTIONS
S1 = S2 → D1 on
When input is on, 16-bit data designated by source operands S1
and S2 are compared. When S1 data is equal to S2 data, desti-
nation operand D1 is turned on. When the condition is not met,
D1 is turned off.
S1 ≠ S2 → D1 on
When input is on, 16-bit data designated by source operands S1
and S2 are compared. When S1 data is not equal to S2 data,
destination operand D1 is turned on. When the condition is not
met, D1 is turned off.
S1 < S2 → D1 on
When input is on, 16-bit data designated by source operands S1
and S2 are compared. When S1 data is less than S2 data, desti-
nation operand D1 is turned on. When the condition is not met,
D1 is turned off.
S1 > S2 → D1 on
When input is on, 16-bit data designated by source operands S1
and S2 are compared. When S1 data is greater than S2 data,
destination operand D1 is turned on. When the condition is not
met, D1 is turned off.
S1 ≤ S2 → D1 on
When input is on, 16-bit data designated by source operands S1
and S2 are compared. When S1 data is less than or equal to S2
data, destination operand D1 is turned on. When the condition is
not met, D1 is turned off.
S1 ≥ S2 → D1 on
When input is on, 16-bit data designated by source operands S1
and S2 are compared. When S1 data is greater than or equal to
S2 data, destination operand D1 is turned on. When the condi-
tion is not met, D1 is turned off.
S
U
'
M
ICRO
MART
SER
S
ANUAL
»
10-1

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents