7 Applied Instructions
7.20 Character String Control
632
FXCPU Structured Programming Manual
(Basic & Applied Instruction)
2. 32-bit operation (DSTR/DSTRP)
1) All digits (specified by ) of 32-bit binary data stored in the device specified by are converted into
ASCII codes while the decimal point is added to the position specified by the device storing the number of
digits of the decimal part ( + 1), and stored in the device specified by and later.
2) Set the number of all digits in the range from 2 to 13.
3) Set the number of digits of the decimal part + 1 in the range from 0 to 10.
Be sure to satisfy "(Number of digits of decimal part) ≤ (Number of all digits - 3)".
4) 32-bit binary data to be converted stored in should be within the range from -2,147,483,648 to
+2,147,483,647.
8
3
4 3 2 1
+0
+1
56-
+1
-654321
32-bit
binary data
Number of
all digits
Number of digits
of decimal part
Sign
+0
+1
High order 16 bits Low order 16 bits
b31 b16 b15 b0
+1
32-bit binary data
s1
s2 s2
s2
s1
s2 s2
b15
+0
+2
b8 b7 b0
0000H is automatically
stored at the end of a
character string.
+1
For numbe
of all digits
=8
36H(6)
34H(4)
33H(3)
2DH(-)
35H(5)
2EH(.)
+4
+3
31H(1)
0000H
32H(2)
+0
b15
+2
+3
+5
b8 b7 b0
00H is automatically stored at the
end of a character string.
+1
For numbe
of all
digits
For value
stored
in
ASCII code in "(Value
specifying number of
all digits - 1)"th digit
ASCII code in "(Value
specifying number of
all digits - 3)"th digit
ASCII code in "(Value
specifying number of
all digits - 2)"th digit
ASCII code in "(Value
specifying number of
all digits - 4)"th digit
ASCII code in "(Value
specifying number of
all digits - 6)"th digit
ASCII code in "(Value
specifying number of
all digits - 8)"th digit
ASCII code in "(Value
specifying number of
all digits - 10)"th digit
ASCII code in "(Value
specifying number of
all digits - 5)"th digit
ASCII code in "(Value
specifying number of
all digits - 7)"th digit
ASCII code in "(Value
specifying number of
all digits - 9)"th digit
ASCII code
indicating sign
00H
+4
d
d
s1
s1
DSTR
EN ENO
d
s1
s2
Label 1
*1
Command
input
Label 4
*3
Label 3
*2
*1. This defines the head of the device that stores the
number of digits of the value to be converted.
*2. This defines the device that stores the binary data
to be converted.
*3. This defines the head of the device that stores
the data converted into character strings.