Mitsubishi Electronics FX2C Home Theater Server User Manual


 
FX Series Programmable Controlers Applied Instructions 5
5-119
5.11.1 ECMP (FNC 110)
Operation:
The data of S
1
is compared to the data of S
2
. The
result is indicated b
y
3 bit devices specified with
the head address entered as D. The bit devices
indicate:
S
2
is less than < S
1
- bit device D is ON
S
2
is equal to = S
1
- bit device D
+1
is ON
S
2
is
g
reater than > S
1
- bit device D
+2
is ON
5.11.2 EZCP (FNC 111)
Operation:
The operation is the same as the ECMP instruction
except that a sin
g
le data value (S
3
) is compared to
a data ran
g
e (S
1
- S
2
).
S
3
is less than S
1
and S
2
- bit device D is ON
S
3
is between S
1
and S
2
- bit device D
+1
is ON
S
3
is
g
reater than S
2
- bit device D
+2
is ON
Mnemonic Function
Operands
Program steps
S
1
S
2
D
ECMP
FNC 110
(Floatin
g
Point
Compare)
Compares two
floatin
g
point
values - results of
<, = and > are
g
iven
K, H - inte
g
er value automati-
call
y
converted to floatin
g
point
D - must be in floatin
g
point
format (32bits).
Y, M, S
Note:
3 consecutive
devices are
used.
DECMP,
DECMPP:
13 steps
Mnemonic Function
Operands
Program steps
S
1
S
2
S
3
D
EZCP
FNC 111
(Floatin
g
Point Zone
Compare)
Compares a float
ran
g
e with a float
value - results of
<, = and > are
g
iven
K, H - inte
g
er value automaticall
y
converted to floatin
g
point
D - must be in floatin
g
point format
(32 bits).
Note:
S
1
must be less than S
2
Y, M, S
Note: 3
consecu-
tive devices
are used.
DEZCP,
DEZCPP:
13 steps
DECMP
M8000
M16
M17
M18
D12 D20
M16
[ S1 ] [ S2 ]
[ D ]
D20 < D12
D20 = D12
D20 > D12
Points to note:
The status of the destination devices will be kept even if the ECMP instruction is deactivated.
Full al
g
ebraic comparisons are used: i.e. -1.79
×
10
27
is smaller than 9.43
×
10
-15
DEZCP
M8000
M50
M51
M52
D50 D60
D100
M50
[ S
1
][ S
2
][ S
3
]
[ D ]
D100 < D50,D60
D100 £ D50 £ D60
D100 > D50,D60