Mitsubishi Electronics FX3G User Manual

Page of 964
679
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
29 Data Table Operation – FNC250 to FNC269
29.6 FNC261 – BINDA / BIN to Decimal ASCII Conversion
21
FNC160
-F
NC1
69
R
eal
 T
ime C
lock
 
C
ontrol
22
FNC17
0-F
NC
179
E
xternal D
evice
23
FNC
180
Alternate 
Instructions
24
FN
C181-
FNC18
9
O
thers
25
FNC190
-F
NC1
99
Bl
oc
k D
ata
 
Op
er
ation
26
FNC20
0-F
NC209
C
har
ac
te
r S
trin
Con
tro
l
27
FNC2
10-
FNC21
9
Dat
Operati
on 3
28
FNC220
-F
NC2
49
Da
ta 
C
omp
ari
son
29
FNC25
0-F
N
C
269
D
ata T
abl
Operation
30
FNC2
70-
FNC276
Ex
-Dev
ice
Related devices
Related instructions
Cautions
1. Occupied device points
The table below shows the occupied device points of 
 for 16-bit operation(BINDA/BINDAP) when M8091 is ON/
OFF and 32-bit operation (DBINDA/DBINDAP).
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 occupied device point of 
 storing the ASCII code character string exceeds the corresponding 
device rang (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 the PR (FNC 77) instruction are output one by one by the time division method
to Y040 to Y051.
By turning 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 the PR (FNC 77) instruction, refer to Section 15.8.
Device
Name
Description
M8091
Output character quantity 
selector signal
For 16-bit operation
-
When M8091 is OFF, 
+3 is set to "0000H (NULL)".
-
When M8091 is ON, 
+3 does not change.
For 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 values into ASCII code.
HEX (FNC 83)
Converts ASCII code into hexadecimal values.
STR (FNC200)
Converts binary data into a character string (ASCII code).
VAL (FNC201)
Converts a character string (ASCII code) into binary data.
DABIN (FNC260)
Converts numeric data expressed in decimal ASCII code (30H to 39H) into binary data.
Occupied Points of 
16-bit operation
M8091=ON
3
M8091=OFF
4
32-bit operation
6
  D
  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
0000H
D3
M8091=OFF
M8027
SET
"       5126" is
output.
PR (FNC 77)
instruction
Y040 to Y051