AH500 Programming Manual 
6-472 
API    Instruction code  Operand 
Function 
2110    $FVAL  P 
S, D 
Converting the string into the 
floating-point number 
Device
X  Y  M  S  T  C  HC  D  L  SM  SR  E  PR  K  16#
“$”  DF 
Pulse instruction
16-bit instruction (5-11 steps)  32-bit instruction
Symbol: 
S
:
Source value  Word   
D
:
Device in which the conversion 
result is stored 
Double word   
Explanation: 
1.  The string in S is converted into the floating-point number, and the conversion result is stored 
in D. 
The end of the string
Floating-point number
Sign 
First ASCII code
Second ASCII code
Third ASCII code
Fourth ASCII code
Fifth ASCII code
Sixth ASCII code
Seventh ASCII code
 b15
 b0
 b7
 b8
 16#00
 S
 +1
 S
 +2
 S
 +3
 S
 +4
 S
(D+1, D)
 ......
 +...
 S
 ......
 ......
 
2.  The string in S can be the decimal format of the string or the exponential format of the string. 
  The decimal format: 
 b15
 b0
 b7 b8
16#31H(1)
 2D(-)16#
 30(0)16#  2E(.)16#
 38(8)16#
 37(7)16#
16#00
 31(1)16#
.
 -
 1
 0
 7
 8
 1
 2
 32(2)16#
 HBF89FFD4
 (D+1, D)
 S
 S
 +1
 S
 +2
 S
 +3
 S
 +4
 
Floating-point number -1.07812
 
  The exponential format: 
 b15
 b0
 b7 b8
16#20( )
 2D(-)16#
16#2E(.)  31(1)16#
 32(2)16#
 33(3)16#
16#00
 30(0)16#
.
 -
 1
 3
 2
 0
 1
 31(1)16#
 16#D044B5D1
 (D+1, D)
 S
 S
 +1
 S
 +2
 S
 +3
 S
 +4
 S +5
 S +6
 2B(+)16#
 45(E)16#
 31(1)16#
 30(0)16#
 E
 +
 1
 0
 -1.3201E+10 Floating-point number