100
4
4 Instructions4.3.2 Comparison Output
Example:
M3 = ON when K100 > C30's current value
M4 = ON when K100 <= C30's current value <= K200
M5 = ON when C30's current value > K200
M3, M4, or M5 switches to ON when X0 = ON.
The ZCP instruction is not executed when X0 switches from ON to
OFF, and M3 to M5 remain in the state prior to X0 = OFF. Use the
RST or ZRST instruction to clear the comparison result of M3 to M5.
Ă
M3
ǒZCP K100 K200 C30 M3 Ǔ
S1 S2 S
Ă
Ă
M4
M5
X0
D
EZCP: Binary oating-point range comparison
◆
Overview
The EZCP instruction compares a binary oating-point variable range with a oating-point variable. The
comparison result is output to three variables from head address D.
EZCP S1 S2 S D
Binary oating-
point range
comparison
Applicable model:
H3U
S1
Lower limit
for range
comparison
Lower limit of a binary oating-point variable range
16-bit instruction
(17 steps)
EZCP: Continuous
execution
32-bit instruction
(17 steps)
DEZCPP: Jump
execution
S2
Upper limit
for range
comparison
Upper limit of a binary oating-point variable range
S
Comparand
Binary oating-point variable to be compared
D
Comparison
result
Comparison result storage unit, which occupies three (bit)
variables
◆
Operands
Operand
Bit Element Word Element
System·User System·User Bit Designation Indexed Address Constant
Real
Number
S1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
S2 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
S X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
D1 X Y M T C S SM D R T C SD KnX KnY KnM KnS KnSM
V,Z
Modication K H E
Note: The elements in gray background are supported.
◆
Function
A binary oating-point variable range is compared with a oating-point variable. The comparison result is
output to three variables from head address D.
S1 is the lower limit of a binary oating-point variable range.
S2 is the upper limit of a binary oating-point variable range.
S is the binary oating-point variable to be compared.