605
FX
3U
/FX
3UC
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
FN
C
160-FN
C
169
R
eal
Ti
m
e
C
loc
k
C
ont
ro
l
22
FN
C
170
-F
N
C
17
9
E
xt
e
rnal
D
evi
ce
23
FN
C
180
Su
b
st.
I
n
str
. I
n
fo
24
FN
C
181-FN
C
189
O
ther
s
25
FN
C
190-FN
C
19
9
B
loc
k D
a
ta
O
per
at
io
n
26
FN
C
200-FN
C
209
C
har
act
e
r St
ring
C
ont
ro
l
27
F
N
C2
10
-F
NC
21
9
Da
ta
O
per
at
ion 3
28
FN
C
220-FN
C
24
9
Da
ta
Co
m
p
a
ris
o
n
29
FN
C
250-FN
C
269
Da
ta
T
a
b
le
O
per
at
io
n
30
FN
C
27
0-F
N
C
274
Ex
-D
ev
ic
e
In
ve
rte
r C
o
mm
s
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 by 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 units of byte.
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: 12,345,678
→
"12,345,678"
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
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
12t
h c
h
ar
ac
te
r
+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
Si
gn
1s
t c
h
a
rac
te
r
2nd c
h
a
rac
te
r
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
00H
31H(1)
33H(3)
35H(5)
36H(6)
2DH(-)
32H(2)
34H(4)
2EH(.)
38H(8)
37H(7)
7
4
8
1
-12345678
D
2
+1
D
2
D
1
D
1
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......