Delta AH500 Programming Manual page 262

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
0213
FBIN
Device X
Y
M
S
D
Symbol:
Explanation:
1.
The decimal floating-point number in the register specified by S is converted into the
single-precision floating-point number, and the conversion result is stored in the register
specified by D.
2.
Suppose the value in S is 1234, and the value in S+1 is 3. The value in S is converted into
6
1.234x10
.
3.
The value in D should be a single-precision floating-point number, and the values in S and S+1
represent the decimal real number and the decimal exponent respectively.
4.
The instruction FBIN is used to convert the decimal floating-point number into the
single-precision floating-point number.
5.
The real number of decimal floating-point numbers range from -9,999 to +9,999, the exponents
of decimal floating-point numbers range from -41 to +35, and the practical range of decimal
floating-point numbers in PLC is between ±1175×10-41 and ±3402×10+35. When the
operation result is zero, SM600 is ON.
Example 1:
When X0.0 is ON, the decimal floating-point number in the register in (D1, D0) is converted into the
single-precision floating-point number, and the conversion result is stored in (D3, D2).
Decimal fl oating-point number
Binary floating-point number
Example 2:
1.
Before the floating-point operation is performed, users have to use the instruction FLT to
convert the binary integer into the single-precision floating-point number. The premise of the
6 - 9 4
Operand
P
S, D
S
T
C
HC
D
Pulse instruction 32-bit instruction (5 steps) 64-bit instruction
AH500
S : Data source
D : Conversion result
Exponent
Real number
Mathematic al form
D 1
D 0
Real number: 23 bits; Ex ponent: 8 bits ; sign: 1 bit
D 3
D 2
Converting the decimal
floating-point number into the
binary floating-point number
L
SM SR
E
PR
AH500
Double word
Double word
[D0]
10
X
Function
K
16# "$"
DF
-
[D 1]

Advertisement

Table of Contents
loading

Table of Contents