EasyManua.ls Logo

Delta AH500 - Page 232

Delta AH500
749 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
AH500 Programming Manual
6-27
API Instruction code
Operand
Function
0056 FCMP P
S
1
, S
2
, D
Comparing the floating-point
numbers
Device
X Y M S T C HC D L SM SR E PR K 16# “$” DF
S
1
S
2
D
Pulse instruction
32-bit instruction (7-9 steps)
64-bit instruction
AH500 AH500
Symbol:
S
1
Floating-point number 1 Double word
S
2
Floating-point number 2 Double word
D
Comparison result Bit
Explanation:
1. The instruction FCMP is used to compare the floating-point number in S
1
with the
floating-point number in S
2
. The comparison results are stored in D.
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
1
is greater than the comparison value in S
1
, D will
be ON. If the comparison value in S
1
is equal to the value in S
2
, D+1 will ON. If the
comparison value in S
1
is less than the value in S
2
, D+2 will be ON.
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.0s being OFF.
3. If users want to get the comparison result , , or , they can connect M10~M12 is series or
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
1
or S
2
exceeds the range of values which can be represented by the
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.

Table of Contents

Other manuals for Delta AH500

Related product manuals