465
STR, STRP, DSTR, DSTRP
1
2
3
4
4
6
7
8
7.11
Char
acter
string processing inst
ructions
7.11.9
S
TR, ST
RP, DSTR
, DSTR
P
: Head number of the devices where the digits numbers for the numerical value to be converted are stored (BIN 16 bits)
: BIN data to be converted (BIN 16/32 bits)
: Head number of the devices where the converted character string will be stored (character string)
F
unct
i
on
STR
(1) Adds a decimal point to the BIN 16-bit data designated by at the location designated by , converts the data to
character string data, and stores it in the area starting from the device number designated by .
(2) The total number of digits that can be designated by is from 2 to 8.
(3) The number of digits that can be designated by +1 as a part of the decimal fraction is from 0 to 5.
However, the number of digits following the decimal point must be smaller than or equal to the total number of digits
minus 3.
(4) BIN data in the range between -32768 and 32767 can be designated at .
(5) After conversion, character string data is stored at the device number or later device number as indicated below:
(a) The sign "20
H
" (space) will be stored if the BIN data is positive, and the sign "2D
H
" (minus sign) will be stored if it is
negative.
STR, STRP
Conversion from BIN 16-bit data to character string
DSTR, DSTRP
Conversion from BIN 32-bit data to character string
7.11.9
STR, STRP, DSTR, DSTRP
• Basic model QCPU: The serial number (first five digits) is
"04122" or later.
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
K, H
Other
Bit
Word
Bit
Word
––
––
––
––
––
––
––
Basic
Process
High
performance
Redundant Universal
LCPU
Ver.
Command
Command
P
S1
S2
D
S1
S2
D
STRP, DSTRP
STR, DSTR
i
nd
i
cates
an
i
nstruct
i
on
symbo
l
of
S
T
R
/
DS
T
R
.
S1
S2
D
S1
D2
D
S2
S1
D
Total number of digits
Number of digits in decimal fraction
BIN data
Sign
.
S1
S1
S2
ASCII code for the
(total number of digits -1)
th digit
ASCII code for the
(total number of digits -3)
th digit
ASCII code for the
(total number of digits -5)
th digit
ASCII code for the
(total number of digits -7)
th digit
ASCII code for the sign
ASCII code for the
(total number of digits -2)
th digit
ASCII code for the
(total number of digits -4)
th digit
ASCII code for the
(total number of digits -6)
th digit
D
D
D
D
D
b15
b8b7
b0
Designated total
number of digits
Automatically stored at
the end of the character string
00
H
5
1
+1
1 2 3
.
+2
31
H
(1)
32
H
(2)
2E
H
(.)
b15
b7
b0
33
H
(3)
00
H
+1
1 2
3
S1
S2
D
S1
D
D
2D
b8
( )
S1
S1
S2
D