5.7 Standard Comparison Functions
175
FXCPU Structured Programming Manual
(Application Functions)
1
O
utlin
e
2
Function Li
st
3
Functi
on
Cons
tructi
on
4
Ho
w t
o R
ea
d
Explanati
on of
Func
tions
5
Appl
ie
d
Functions
6
Stan
dard
Functi
on
Blocks
A
Correspondence
be
tw
een Dev
ice
s
an
d A
ddres
ses
5.7.3
EQ_E
Outline
This function compares data with regard to "= (equal)".
1. Format
*1.
Output variable
2. Set data
In explanation of functions, I/O variables inside ( ) are described.
Explanation of function and operation
1) This function compares the contents of devices specified in
…
, and outputs the operation result
expressed as the bit type data to a device specified in
.
This function executes comparison [
=
] & [
=
] &
…
& [
-1 =
].
a) This function outputs "TRUE" when all comparison results are "
(n-1) =
(n)".
b) This function outputs "FALSE" when any comparison result is "
(n-1)
≠
(n)".
2) The number of pins in
can be changed.
Cautions
When handling 32-bit data in structured programs, you cannot specify 16-bit devices directly, different from
simple projects. Use labels when handling 32-bit data.
You can specify 32-bit counters directly, however, because they are 32-bit devices.
Use global labels when specifying labels.
Program example
In this program, the contents of devices specified in
and
are compared, and the operation result is
output to a device specified in
.
FX
3U(C)
FX
3G
FX
2N(C)
FX
1N(C)
FX
1S
FX
U
/FX
2C
FX
0N
FX
0(S)
Function name
Expression in each language
Structured ladder
ST
EQ_E
EQ_E(EN,_IN,_IN,Output label);
Example:
EQ_E(X000,D0,D10,M0);
Variable
Description
Data type
Input
variable
EN
Execution condition
Bit
_IN (
…
)
Compared data, or word device which stores such data
ANY_SIMPLE
Output
variable
ENO
Execution status
Bit
*1
(
)
Device which will store the comparison result
Bit
[Structured ladder]
[ST]
EQ_E
EN
ENO
*1
M0
X000
_IN
D0
_IN
D10
s1
d
s1
d
s1
s2
s2
s3
sn
sn
s
s
s
s
s
s1
s2
d
EQ_E
EN
ENO
g_bool2
g_bool1
g_int1
g_int2
_IN
_IN
g_bool3
g_bool3:=EQ_E(g_bool1,g_int1,g_int2,g_bool2);
Содержание 09R927
Страница 2: ......
Страница 234: ...232 FXCPU Structured Programming Manual Application Functions Revision History MEMO ...