675
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
29 Data Table Operation – FNC250 to FNC269
29.6 FNC261 – BINDA / BIN to Decimal ASCII 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
Related devices
Related instructions
Errors
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is
stored in D8067.
• When the ASCII code character range
to
+2(5) exceeds the corresponding device range
(error code: K6706)
Program example
In the program below, 16-bit binary data stored in D1000 is converted into decimal ASCII codes when X000 is
set to ON, and the ASCII codes converted by PR (FNC 77) instruction are output one by one in the time
division method to Y040 to Y051.
By setting to OFF the output character selector signal M8091 and setting to ON PR mode flag M8027, ASCII
codes up to "00H" are output.
→
For PR mode flag and PR (FNC 77) instruction, refer to Section 15.8.
Device
Name
Description
M8091
Output character
quantity selector signal
•
In the case of 16-bit operation
-
When M8091 is OFF,
+3 is set to "00H (NULL)."
-
When M8091 is ON,
+3 does not change.
•
In the case of 32-bit operation
-
When M8091 is OFF, the high-order byte of
+5 is set to "00H (NULL)."
-
When M8091 is ON, the high-order byte of
+5 is set to "20H (space)."
Instruction
Description
ASCI(FNC 82)
Converts hexadecimal codes into ASCII codes.
HEX(FNC 83)
Converts ASCII codes into hexadecimal codes.
ESTR(FNC116)
Converts binary floating point data into a character string (ASCII codes) of specified number of
digits.
EVAL(FNC117)
Converts a character string (ASCII codes) into binary floating point data.
DABIN(FNC260)
Converts numeric data expressed in decimal ASCII codes (30H to 39H) into binary data.
D
D
D
D
D
D
D0
b15
b8 b7
b0
5126
D1000
16-bit binary
data
36H(6)
32H(2)
20H (space)
31H(1)
20H (space)
35H(5)
X000
RST
M8091
D1
D2
FNC261
BINDAP
D1000
D0
FNC 77
PR
D0
Y040
END
00H
D3
M8091=OFF
M8027
SET
" 5126" is
output.
PR (FNC 77)
instruction
Y040 to Y051
Содержание FX3U Series
Страница 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...
Страница 2: ......
Страница 889: ......