607
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
Program example
1) In the program below, the character string data stored in D20 to D22 is regarded as an integer value,
converted into a binary value, and stored in D0 when X000 is set to ON.
2) In the program below, the character string data stored in D20 to D24 is regarded as an integer value,
converted into a binary value, and stored in D0 when X000 is set to ON.
X000
FNC201
VALP
D10
D0
END
D20
-1654
6
2
b15
b8 b7
b0
D20
D21
D22
31H(1)
2EH(.)
00H
2DH(-)
36H(6)
34H(4)
35H(5)
D23
D0
D10
D11
Number of all digits
Number of digits of decimal part
"00H" is stored here.
X000
FNC201
DVALP
D10
D0
END
D20
10
3
b15
b8 b7
b0
D20
D21
D22
37H(7)
31H(1)
00H
20H(space)
39H(9)
30H(0)
30H(0)
D23
D0
D10
D11
Number of all digits
Number of digits of decimal part
36H(6)
2EH(.)
31H(1)
31H(1)
D24
D25
7910061
1
D0
D1
"00H" is stored here.