677
FX3S/FX3G/FX3GC/FX3U/FX3UC 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-FNC169
Real Time Clock
Control
22
FNC170-FNC179
External Device
23
FNC180
Alternate
Instructions
24
FNC181-FNC189
Others
25
FNC190-FNC199
Block Data
Operation
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
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
XYMTCSD
.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
D
+1
b0b15
16-bit binary data
S
+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
D
+1
-12345
b0
b15
S
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