Mitsubishi Electronics FX3G User Manual

Page of 964
677
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
29.6
FNC261 – BINDA / BIN to Decimal ASCII Conversion
Outline
This instruction converts binary data into decimal ASCII codes (30H to 39H).
1. Instruction format
2. Set data
3. Applicable devices
Explanation of function and operation
1. 16-bit operation (BINDA and BINDAP)
1) Each digit of 16-bit binary data stored in 
 is converted into an ASCII code (30H to 39H), and stored in
 and later.
For example, when 
 stores "-12345", the conversion result is stored in 
 and later as follows:
2) The numeric range of 16-bit binary data stored in 
 is from -32768 to +32767.
3) The conversion result stored in 
 is as follows:
a) As "sign data" (low-order byte of 
), "20H (space)" is set when the 16-bit binary data stored in 
 is
positive, and "2DH (-)" is set when 16-bit binary data stored in 
 is negative.
Operand Type
Description
Data Type
Device number storing binary data to be converted into ASCII codes
16- or 32-bit binary
Head device number storing conversion result
Character string
Oper-
and 
Type
Bit Devices
Word Devices
Others
System User
Digit Specification
System User
Special 
Unit
Index
Con-
stant
Real 
Number
Charac-
ter String
Pointer
X Y M T C S D .b KnX KnY KnM KnS T C D R U \G
V Z Modify K H
E
" "
P
P
FNC 261
BINDA
D
Mnemonic
Operation Condition
16-bit Instruction
 5 steps
BINDA
BINDAP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
 9 steps
DBINDA
DBINDAP
Continuous
Operation
Pulse (Single)
Operation
  S
  D
  S
  D
   
S
   
D
Command
input
FNC261
BINDAP
S ‚
D ‚
+0
b15
+2
b8 b7
b0
+1
b0
b15
16-bit binary data
+3
M8091=OFF: 0000H
M8091=ON: Does
not change.
ASCII code for 1's digit
ASCII code for 10's digit
ASCII code for 10000's digit
ASCII code for 100's digit
Sign data
ASCII code for 1000's digit
0000H or source data
   
S
   
D
+0
b15
+2
b8 b7
b0
+1
-12345
b0
b15
35H(5)
34H(4)
31H(1)
33H(3)
2DH(-)
32H(2)
0000H or source data
+3
M8091=OFF: 0000H
M8091=ON: Does not change.
   
S
   
D
   
D
   
S
   
S