619
FX3G/FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
26 Character String Control – FNC200 to FNC209
26.2 FNC201 – VAL / Character String to BIN Conversion
21
FNC160-FNC169
Real Time Clock
Control
22
FNC170-FNC179
External Device
23
FNC180
Alternate
Instructions
24
FNC181-FNC189
Others
25
FNC190-FNC199
Block Data
Operation
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC274
Ex-Device
Inverter Comms
2. 32-bit operation (DVAL and DVALP)
1) A character string stored in and later is converted into 32-bit binary data. The number of all digits of the
binary data acquired for conversion is stored in , the number of digits of the decimal part is stored in
+1, and the binary data is stored in [ +1, ].
In conversion from a character string into binary data, the data from to a device number storing "00H" is
handled as a character string in byte units.
For example, when a character string "-12345.678" 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).
Description
Number of all characters (digits) 2 to 13
Number of characters (digits) of decimal part 0 to 10 and smaller than "number of all digits −3"
Numeric range when decimal point is ignored
−2,147,483,648 to +2,147,483,647
Example: 12345.678 → "12345678"
Character type
Sign
Positive numeric value "Space" (20
H)
Negative numeric value "–" (2D
H)
Decimal point "." (2E
H)
Number "0" (30
H) to "9" (39H)
S
D
1
D
1
D
2
D
2
S
Command
input
FNC201
DVAL
D
1
S
D
2
+0
-
D
1
+0
+1
b15
+2
+3
+6
b8 b7 b0
It indicates the end of character string.
S
D
2
+1
32-bit binary
data
12th character
+4
+5
Integer value in
which decimal
point is ignored
+1
D
2
00H
ASCII code of 1st character
ASCII code of 3rd character
ASCII code of 5th character
ASCII code of 7th character
ASCII code indicating sign
ASCII code of 2nd character
ASCII code of 4th character
ASCII code of 6th character
ASCII code of 12th character
ASCII code of 9th character
ASCII code of 11th character
ASCII code of 8th character
ASCII code of 10th character
Sign
1st character
2nd character
Number of all
digits
Number of digits
of decimal part
S
D
1
D
2
+0
10
3
-
2 3 5 6
D
1
+0
+1
b15
+2
+3
b8 b7 b0
S
+1
+4
+5
31H(1)
33H(3)
35H(5)
36H(6)
2DH(-)
32H(2)
34H(4)
2EH(.)
38H(8) 37H(7)
74 81
-12345678
D
2
+1
D
2
00H
D
1
D
1