Mitsubishi MELSEC Q Series Programming Manual page 581

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

DSTR
(1) Adds a decimal point to the BIN 32-bit data designated by
, converts the data to character string data, and stores it following the device number
S1
designated by
S1
Total number of digits
S1
+1
Number of digits in decimal fraction
+1
S2
S2
b31
b16 b15
Upper 16 bits
Lower 16 bits
BIN 32 bits
S1
+1
S1
S2
BIN data
(2) The total number of digits that can be designated by
(3) The number of digits that can be designated by
0 to 10.
However, the number of digits following the decimal point must be smaller than or equal to
the total number of digits minus 3.
(4) The BIN data that can be designated by
2147483648 to 2147483647.
(5) After conversion, character string data is stored at the device number following
indicated below:
(a) The sign "20
(minus sign) will be stored if it is negative.
(b) If the setting for the number of digits after the decimal fraction is anything other than "0",
"2E
number of digits.
If the number of digits in the decimal fraction part of the number is "0", the ASCII code
"2E
.
D
.
Sign
b0
8
3
.
6 5 4
3 2 1
+1
S2
6 5 4 3 2 1
" (space) will be stored if the BIN data is positive, and the sign "2D
H
" (.) will automatically be stored at the position before the first of the specified
H
10
Total number of digits
Number of digits
3
in decimal fraction
2 3 4 5 6 7 8
BIN data
1
" (.) will not be stored.
H
at the location designated by
S2
b15
b8 b7
ASCII code for the
D
(total number of digits -1)
ASCII code for the sign
th digit
ASCII code for the
ASCII code for the
+1
(total number of digits -2)
(total number of digits -3)
D
th digit
th digit
ASCII code for the
ASCII code for the
+2
(total number of digits -4)
(total number of digits -5)
D
th digit
th digit
ASCII code for the
ASCII code for the
(total number of digits -7)
(total number of digits -6)
D
+3
th digit
th digit
ASCII code for the
ASCII code for the
(total number of digits -9)
D
+4
(total number of digits -8)
th digit
th digit
ASCII code for the
D
+5
00
(total number of digits -10)
H
th digit
Automatically stored at the
end of the character string
b15
b8 b7
D
36
(6)
H
D
+1
34
(4)
H
+2
33
(3)
D
H
D
+3
31
(1)
H
+4
00
D
H
is from 2 to 13.
S1
+1 as a part of the decimal fraction is from
S1
and
+1 is within the range of from
S1
S2
1 2 3 4 5 . 6 7 8
Number of digits in decimal fraction
Automatically added
STR(P),DSTR(P)
b0
Designated total
number of digits
b0
2D
( )
H
35
(5)
H
2E
(.)
H
32
(2)
H
as
D
"
H
7-207
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents