« FC4A M
ICRO
S
MART
U
SER
’
S
M
ANUAL
»
10-1
10: D
ATA
C
OMPARISON
I
NSTRUCTIONS
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<> (Compare Unequal To)
CMP< (Compare Less Than)
CMP> (Compare Greater Than)
CMP<= (Compare Less Than or Equal To)
CMP>= (Compare Greater Than or Equal To)
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.
REP
**
S1(R)
*****
D1(R)
*****
CMP=(*)
S2(R)
*****
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.
REP
**
S1(R)
*****
D1(R)
*****
CMP<>(*)
S2(R)
*****
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.
REP
**
S1(R)
*****
D1(R)
*****
CMP<(*)
S2(R)
*****
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.
REP
**
S1(R)
*****
D1(R)
*****
CMP>(*)
S2(R)
*****
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.
REP
**
S1(R)
*****
D1(R)
*****
CMP<=(*)
S2(R)
*****
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.
REP
**
S1(R)
*****
D1(R)
*****
CMP>=(*)
S2(R)
*****
Содержание FC4A-C10R2
Страница 1: ...FC4A SERIES Micro Programmable Logic Controller User s Manual FC9Y B812 ...
Страница 6: ...PREFACE 4 FC4A MICROSMART USER S MANUAL ...
Страница 94: ...2 MODULE SPECIFICATIONS 2 74 FC4A MICROSMART USER S MANUAL ...
Страница 184: ...6 ALLOCATION NUMBERS 6 20 FC4A MICROSMART USER S MANUAL ...
Страница 218: ...8 ADVANCED INSTRUCTIONS 8 8 FC4A MICROSMART USER S MANUAL ...
Страница 240: ...11 BINARY ARITHMETIC INSTRUCTIONS 11 8 FC4A MICROSMART USER S MANUAL ...
Страница 244: ...12 BOOLEAN COMPUTATION INSTRUCTIONS 12 4 FC4A MICROSMART USER S MANUAL ...
Страница 252: ...13 SHIFT ROTATE INSTRUCTIONS 13 8 FC4A MICROSMART USER S MANUAL ...
Страница 274: ...15 WEEK PROGRAMMER INSTRUCTIONS 15 8 FC4A MICROSMART USER S MANUAL ...
Страница 378: ...22 DUAL TEACHING TIMER INSTRUCTIONS 22 4 FC4A MICROSMART USER S MANUAL ...
Страница 386: ...23 INTELLIGENT MODULE ACCESS INSTRUCTIONS 23 8 FC4A MICROSMART USER S MANUAL ...
Страница 408: ...24 ANALOG I O CONTROL 24 22 FC4A MICROSMART USER S MANUAL ...
Страница 426: ...26 COMPUTER LINK COMMUNICATION 26 6 FC4A MICROSMART USER S MANUAL ...