Mitsubishi Electric MELSEC FX3U Programming Manual page 651

Melsec fx series programmable logic controllers
Table of Contents

Advertisement

FX
/FX
/FX
Series Programmable Controllers
3G
3U
3UC
Programming Manual - Basic & Applied Instruction Edition
For example, when a character string "-123.45" is specified in
stored in
D
1
b15
+0
S
+1
+2
+3
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)
stores the number of all digits. The number of all digits indicates the number of all characters
D
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 indicates
D
1
the number of all characters after the decimal point "." (2EH).
5)
stores 16-bit data (bin) converted from a character string with the decimalpoint ignored.
D
2
In the character string located in
sign and the first number other than "0" are ignored in the conversion to 16-bit binary data.
-
1 2
3
4 5
Ignored
and
as shown below.
D
2
b8 b7
31H(1)
2DH(-)
33H(3)
32H(2)
34H(4)
2EH( )
00H
35H(5)
It indicates the end of the character string.
Positive numeric value
"Space" (20
Negative numeric value "–" (2D
"." (2E
"0" (30
and later, "space" (20H) and "0" (30H) characters between the
S
Number of all
digits
Number of digits
of decimal part
16-bit binary
-12345
data
26 Character String Control – FNC200 to FNC209
26.2 FNC201 – VAL / Character String to BIN Conversion
S
b0
- 1 2 3
4 5
Description
2 to 8
0 to 5 and smaller than "number of all digits -3"
−32768 to +32767
Example: 123.45 → 12345
Character type
)
H
)
H
)
H
) to "9" (39
)
H
H
8
2
0
0
0 1 2
Sign
Ignored
and later, the conversion result is
+0
7
D
1
+1
2
-12345
D
2
Number of all
7
digits
Number of digits
4
of decimal part
16-bit binary
12
data
21
22
23
24
25
26
27
28
29
30
649

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec fx3ucMelsec fx3g

Table of Contents