EasyManua.ls Logo

Delta AH500 - Page 663

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...
Chapter 6 Applied Instructions
6-495
API Instruction code
Operand
Function
2120 FMOD P
S
1
, S
2
, D
Converting the floating-point
number into the binary-coded
decimal floating-point number
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-8 steps) 64-bit instruction
AH500 AH500 -
Symbol:
S
1
Floating-point number Double word
S
2
Number of places Word
D
Conversion result Word
Explanation:
1. The decimal point in the floating-point number in S
1
is moved to the right in accordance with
the setting of S
2
first, and then the result is converted into the binary-coded decimal
floating-point number. The final conversion result is stored in D.
S1
Floating-point number
Number of places
S1
S2
D
D
D
D
D
+1
+2
+1
+3
+4
Sign
Seven-digit
binary-coded
decimal number
Sign (Exponent)
Exponent
Binary-coded decimal
floating-point number
The binary-coded decimal floating-point number format:
S
2
: The number of places
The value in S
2
should be within the range between 0 and 7.
D: If the floating-point number in S
1
is a positive number, the value in D is 0. If the floating-point
number in S
1
is a negative number, the value in D is 1.
(D+2, D+1): The seven-digit binary-coded decimal number converted from the floating-point
number
D+3: If the exponent is a positive number, the value in D+3 is 0. If the exponent is a negative
number, the value in D+3 is 1.
D+4: The exponent
If the floating-point number in S
1
is -0.03225547 and the value in S
2
is 4, the conversion result
is as follows.
()
S1+1,S1
S2
D
D
D
D
D
+1
+2
+3
+4
0.03225547
4
1
16#3225550
1
4
Number of places
Since the value in S
2
is 4, the decimal point in the floating-point number in S
1
is moved to the
right by four decimal places. The floating-point number in S
1
becomes -322.5547.
-322.5547 is equal to -3225547E-4. The binary-coded decimal floating-point number format is

Table of Contents

Other manuals for Delta AH500

Related product manuals