Mitsubishi MELSEC-Q/L Programming Manual page 472

Table of Contents

Advertisement

VAL, VALP, DVAL, DVALP
(5) The sign "20
" will be stored if the numerical value is positive, and the sign "2D
H
(6) "2E
" is set for the decimal point.
H
(7) The total number of digits stored at
decimal points).
The characters following the decimal point stored at
The BIN data stored at
(8) In cases where the character string designated by
numerical value other than "0", these "20
Total number of digits
Number of digits
1 2
3 . 4 5
in decimal fraction
BIN data
Ignored
DVAL
(1) Converts the character string stored in the area starting from the device designated by
the digits numbers and BIN data in
For conversions from character strings to BIN, all data from the device number designated by
where "00
" is stored will be processed as character strings.
H
b15
b8 b7
ASCII code for the 1st character
S
S
ASCII code for the 3rd character
+1
ASCII code for the 5th character
S
+2
+3
ASCII code for the 7th character
S
ASCII code for the 9th character
S
+4
ASCII code for the 11th character
S
+5
00
S
+6
H
Indicates the end of character string
b15
b8 b7
S
31
(1)
H
S
+1
33
(3)
H
S
35
(5)
+2
H
+3
36
(6)
S
H
38
(8)
S
+4
H
00
S
+5
(2) The total number of characters in the character string indicated by
(3) From 0 to 10 characters in the character string indicated by
However, this number must not exceed the total number of digits minus 3.
(4) The range of the numerical character string that can be converted to BIN value is from -2147483648 to 2147483647,
excluding the decimal point.
Numerical value character strings, excluding the sign and the decimal point, can be designated only within the range
from "30
" to "39
".
H
H
(5) The sign "20
" will be stored if the numerical value is positive, and the sign "2D
H
(6) "2E
" is set for the decimal point.
H
(7) The total number of digits stored at D1 amounts to all characters expressing numerical values (including signs and
decimal points).
The characters following the decimal point stored at
The BIN data stored at
470
amounts to all characters expressing numerical values (including signs and
D1
is the character string ignoring the decimal point that has been converted to BIN data.
D2
S
" and "30
H
H
8
2
0 .
1 2 3 4 5
Sign
and
.
D1
D2
b0
ASCII code for the sign
ASCII code for the 2nd character
ASCII code for the 4th character
ASCII code for the 6th character
.
ASCII code for the 8th character
Sign 1st
ASCII code for the 10th character
char-
ASCII code for the 12th character
acter
b0
2D
( )
H
32
(2)
H
34
(4)
H
1 2 3 4 5
2E
(.)
H
37
(7)
H
H
is the character string ignoring the decimal point that has been converted to BIN data.
D2
" will be stored if it is negative.
H
+1 include the number of characters from "2E
D1
contains "20
" (space) or "30
H
" are ignored in the conversion into a BIN value.
Total number of digits
Number of digits
0 0 1 2
in decimal fraction
BIN data
Ignored
2nd
12th
char-
char-
acter
acter
6 7 8
.
is from 2 to 13.
S
can be the decimal fraction part.
S
" will be stored if it is negative.
H
+1 include the number of characters from "2E
D1
" (.) onward.
H
" (0) between the sign and the first
H
7
4
12
to BIN 32-bit data, and stores
S
to the device number
S
D1
Total number of digits
Number of digits
D1
+1
in decimal fraction
+1
D2
D2
Integer value ignoring decimal point
BIN 32 bits
D1
10
D1
+1
3
1 2 3 4 5 6 7 8
+1
D2
D2
" (.) onward.
H

Advertisement

Table of Contents
loading

Table of Contents