Chapter 6 Applied Instructions 
6-467 
API    Instruction code  Operand 
Function 
2109    $FSTR  P
S
1
, S
2
, D 
Converting the floating-point 
number into the string 
Device
X  Y  M  S  T  C  HC  D  L  SM  SR  E  PR  K  16#
“$”  DF 
16-bit instruction (7-8 steps) 
Symbol: 
S
1
:
Source value  Double word   
S
2
:
Initial device in which the 
format is stored 
Word 
D
:
Initial device in which the 
conversion result is stored 
Word 
Explanation: 
1.  The floating-point number in S
1
 is converted into the string in accordance with the setting of S
2
, 
and the conversion result is stored in D. 
2.  The conversion result varies with the setting of S
2
. 
3.  The value in S
2
+1 should be within the range between 2 and 24. 
0: Decimal format
1: Exponential
S2
S2+1
S2+2
Number of characters
Number of decimal places
 
4.  Decimal format 
 b15
 b0
 b7 b8
 D
 +1
 D
 +2
 D
 +3
 D
 +4
 D
 
 
Decimal point (.)
S2
Number of characters
Decimal foramt
Number of decimal places
 +2
S2
 +1
S2
.
Floating-point number
(S1+1, S1)
 
Fourth ASCII code
Sign 
F
irst ASCII code
Second ASCII code
Third ASCII code
Fifth ASCII code
Sixth ASCII code
 16#00 ( )Ending character
Automatically stored at the end of the string
Sign