Delta AH500 Programming Manual page 232

Hide thumbs Also See for AH500:
Table of Contents

Advertisement

AH 5 00 Pr ogr am m ing Ma n ua l
API
Instruction code
0056
FCMP
Device
X
Y
M
S
1
S
2
D
Symbol:
Explanation:
1.
The instruction FCMP is used to compare the floating-point number in S
floating-point number in S
2.
The operand D occupies three consecutive devices. The comparison results are stored in D,
D+1, and D+2. If the comparison value in S
be ON. If the comparison value in S
comparison value in S
Example:
1.
If the operand D is M10, the comparison results will be stored in M10, M11 and M12, as
shown below.
2.
When X0.0 is ON, the instruction FCMP is executed. M10, M11, or M12 is ON. When X0.0 is
OFF, the instruction FCMP is not executed. The state of M10, the state of M11, and the state
of M12 remain the same as those before X0.0's being OFF.
If users want to get the comparison result ≧, ≦, or ≠, they can connect M10~M12 is series or
3.
in parallel.
4.
If users want to clear the comparison result, they can use the instruction RST or ZRST.
Additional remark:
1.
If the value in S
or S
1
floating-point numbers, the contact is OFF, SM is ON, and the error code in SR0 is 16#2013.
2.
If users declare the operand D in ISPSoft, the data type will ARRAY [3] of BOOL.
3.
If D+2 exceeds the device range, the instruction is not executed, SM0 is ON, and the error
code in SR0 is 16#2003.
Operand
P
S
, S
, D
1
2
S
T
C
HC
D
Pulse instruction 32-bit instruction (7-9 steps) 64-bit instruction
AH500
: Floating-point number 1
S
1
: Floating-point number 2
S
2
D : Comparison result
. The comparison results are stored in D.
2
1
is equal to the value in S
1
is less than the value in S
1
exceeds the range of values which can be represented by the
2
Comparing the floating-point
numbers
L
SM SR
E
AH500
Double word
Double word
Bit
is greater than the comparison value in S
, D+1 will ON. If the
2
, D+2 will be ON.
2
Function
PR
K
16# "$"
DF
with the
1
, D will
1
6 - 2 7

Advertisement

Table of Contents
loading

Table of Contents