Delta AS Series Programming Manual page 308

Hide thumbs Also See for AS Series:
Table of Contents

Advertisement

API
Instruction code
0056
FCMP
Device
X
Y
M
S
1
S
2
D
Data
type
S
1
S
2
D
Symbol
Explanation
1.
This instruction compares the floating-point numbers in S
in D.
2.
The operand D occupies three consecutive devices. The comparison results are stored in D, D+1, and D+2. If the
value in S
is greater than the value in S
1
value in S
is less than the value in S
1
Example
1.
If the operand D is M10, the comparison results is stored in M10, M11 and M12, as shown below.
2.
When X0.0 is ON, the FCMP instruction is executed. M10, M11, or M12 is ON. When X0.0 is OFF, the FCMP
instruction is not executed and the state of M10, the state of M11, and the state of M12 remain unchanged.
If you want to get the comparison result ≧, ≦, or ≠, connect M10–M12 is series or in parallel.
3.
4.
If you want to clear the comparison result, use the RST or ZRST instruction.
Operand
,S
,D
P
S
1
2
S
T
C
HC
Pulse Instruction
: Floating-point comparison value1
S
1
: Floating-point comparison value2
S
2
: Comparison result
D
, D is ON. If the value in S
1
, D+2 is ON.
2
C h a p t e r 6 Ap p l i e d I n s t r u c t i o n s
Comparing floating-point numbers
D
FR
SM
SR
16-bit instruction
AS
and S
, and stores the comparison results (>,=,<)
1
2
is equal to the value in S
1
Function
E
K
16#
"$"
F
32-bit instruction
AS
, D+1 is ON. If the
2
6 - 2 9
6_

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents