Mitsubishi Electronics FX3G User Manual

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