1020
24 COMPARISON FUNCTIONS
24.1 Compare
24
COMPARISON FUNCTIONS
24.1
Compare
GT(_E), GE(_E), EQ(_E), LE(_E), LT(_E)
These functions output the data comparison result of input values.
*1 The input variable "s" can be changed in the range of 2 to 28.
*2 Supported by engineering tool version "1.035M" and later. In earlier versions, write in operator form. (
MELSEC iQ-F FX5
Programming Manual (Program Design))
Setting data
■
Descriptions, types, and data types
Processing details
■
Operation processing
• These functions perform a comparison operation of input values of (s) and output operation results from (d) in the BOOL
type.
• A data value of the INT, DINT, REAL, BOOL, WORD, DWORD, TIME, or STRING type can be input to (s).
Ladder diagram, FBD/LD
Structured text
[Without EN/ENO]
[With EN/ENO]
[Without EN/ENO]
d:=GT(s1,s2);
d:=GE(s1,s2);
d:=EQ(s1,s2);
d:=LE(s1,s2);
d:=LT(s1,s2);
[With EN/ENO]
d:=GT_E(EN,ENO,s1,s2);
d:=GE_E(EN,ENO,s1,s2);
d:=EQ_E(EN,ENO,s1,s2);
d:=LE_E(EN,ENO,s1,s2);
d:=LT_E(EN,ENO,s1,s2);
Argument
Description
Type
Data type
EN
Execution condition (TRUE: Execution, FALSE: Stop)
Input variable
BOOL
s1(IN1) to s28(IN28)
Input
Input variable
ANY_ELEMENTARY
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d(GT(_E) / GE(_E) / EQ(_E) / LE(_E) / LT(_E))
Output (TRUE: True value, FALSE: False value)
Output variable
BOOL
• GT(_E): These functions compare [(s1)>(s2)]&[(s2)>(s3)]&
&[(s)
(n-1)
>(s)
(n)
].
• When all the operation results are (s)
(n-1)
>(s)
(n)
, these functions output TRUE.
• When any of the operation results is (s)
(n-1)
(s)
(n)
, these functions output FALSE.
• GE(_E): These functions compare [(s1)
(s2)]&[(s2)
(s3)]&
&[(s)
(n-1)
(s)
(n)
].
• When all the operation results are (s)
(n-1)
(s)
(n)
, these functions output TRUE.
• When any of the operation result is (s)
(n-1)
<(s)
(n)
, these functions output FALSE.
• EQ(_E): These functions compare [(s1)=(s2)]&[(s2)=(s3)]&
&[(s)
(n-1)
=(s)
(n)
].
• When all the operation results are (s)
(n-1)
=(s)
(n)
, these functions output TRUE.
• When any of the operation results is (s)
(n-1)
(s)
(n)
, these functions output FALSE.
• LE(_E): These functions compare [(s1)
(s2)]&[(s2)
(s3)]&
&[(s)
(n-1)
(s)
(n)
].
• When all the operation results are (s)
(n-1)
(s)
(n)
, these functions output TRUE.
• When any of the operation result is (s)
(n-1)
>(s)
(n)
, these functions output FALSE.
• LT(_E): These functions compare [(s1)<(s2)]&[(s2)<(s3)]&
&[(s)
(n-1)
<(s)
(n)
].
• When all the operation results are (s)
(n-1)
<(s)
(n)
, these functions output TRUE.
• When any of the operation results is (s)
(n-1)
(s)
(n)
, these functions output FALSE.
s1
d
s2
EN
ENO
d
s1
s2
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......