Mitsubishi FX3U Series Programming Manual page 607

Hide thumbs Also See for FX3U Series:
Table of Contents

Advertisement

FX
/FX
Series Programmable Controllers
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
2. 32-bit operation (DVAL and DVALP)
1) A character string stored in
of the binary data acquired by conversion is stored in
stored in
D
1
In conversion from a character string into binary data, the data from
"00H" is handled as a character string in units of byte.
Command
input
FNC201
DVAL
b15
ASCII code of 1st character
+0
S
ASCII code of 3rd character
+1
ASCII code of 5th character
+2
ASCII code of 7th character
+3
ASCII code of 9th character
+4
ASCII code of 11th character
+5
00H
+6
For example, when a character string "-12345.678" is specified in
is stored in
b15
31H(1)
+0
S
33H(3)
+1
35H(5)
+2
36H(6)
+3
38H(8)
+4
+5
2) Character string to be converted
a) Number of characters of character string and the numeric range when the decimal point is ignored
Number of all characters (digits)
Number of characters (digits) of decimal part
Numeric range when decimal point is ignored
b) Character types used in characters to be converted
Sign
Decimal point
Number
3)
D
stores the number of all digits. The number of all digits indicates the number of all characters
1
(including the number, sign and decimal point).
4)
+1 stores the number of digits of the decimal part. The number of digits of the decimal part
D
1
indicates the number of all characters after the decimal point "." (2EH).
and later is converted into 32-bit binary data. The number of all digits
S
+1, and the binary data is stored in [
S
D
D
1
2
b8 b7
ASCII code indicating sign
ASCII code of 2nd character
ASCII code of 4th character
ASCII code of 6th character
ASCII code of 8th character
ASCII code of 10th character
ASCII code of 12th character
It indicates the end of character string.
and
as shown below.
D
D
1
2
b8 b7
b0
2DH(-)
32H(2)
34H(4)
2EH(.)
37H(7)
00H
Positive numeric value
"Space" (20
Negative numeric value "–" (2D
"." (2E
"0" (30
26 Character String Control – FNC200 to FNC209
26.2 FNC201 – VAL / Character String to BIN Conversion
, the number of digits of the decimal part is
D
1
+1,
].
D
D
2
2
b0
-
-
1
2 3
4
5
6
7
Description
2 to 13
0 to 10 and smaller than "number of all digits −3"
−2,147,483,648 to +2,147,483,647
Example: 12,345,678 → "12,345,678"
Character type
)
H
)
H
H
)
) to "9" (39
)
H
H
to a device number storing
S
Number of all
+0
D
digits
1
Number of digits
+1
of decimal part
+1
D
D
2
Integer value in
which decimal
point is ignored
32-bit binary
data
and later, the conversion result
S
+0
10
D
1
+1
3
8
-12345678
+1
D
2
21
22
23
2
24
25
26
D
2
27
28
29
30
605

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx3uc seriesMelsec-f

Table of Contents