243
FX
3U
/FX
3UC
Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
9 Move and Compare – FNC 10 to FNC 19
9.10 FNC 19 – Conversion to Binary
1
In
troduct
io
n
2
Ov
e
rv
ie
w
3
In
st
ru
ct
ion
Li
st
4
D
evi
ce
s
in
De
ta
il
5
Speci
fied t
h
e
D
evi
ce &
C
onst
a
nt
6
Bef
o
re
Pr
ogr
a
m
m
ing
7
Bas
ic
In
st
ru
cti
o
n
8
FNC0
0
-FNC0
9
P
ro
g
ra
m F
lo
w
9
FNC1
0
-FNC1
9
M
ov
e
&
C
om
par
e
10
FNC
20-
FNC
2
9
Ar
ith.
&
Logi
c
O
per
at
io
n
2. 32-bit operation (DBIN and DBINP)
This instruction converts the binary-coded decimal (BCD) data of [
+1,
] into binary (BIN) data, and
transfers the converted binary data to [
+1,
].
• The data of [
+1,
] can be converted if it is within the range from 0 to 99,999,999 (BCD).
• The table below shows digit specification for [
+1,
] and [
+1,
].
Related instruction
Cautions
1. When using DSW (FNC 72) instruction
Because conversion between binary-coded decimal data and binary data is automatically executed in DSW
(FNC 72) instruction, BIN instruction is not required.
2. Handling of BCD inputs and outputs
Binary data is used in all operations in PLCs including arithmetic operations (+,
−
,
×
and
÷
), increment and
decrement instructions.
• When receiving the digital switch information in the binary-coded decimal (BCD) format into a PLC, use
BIN (FNC 19) instruction for converting BCD data into binary data.
• When outputting data to the seven-segment display unit handling binary-coded decimal (BCD) data, use
BCD (FNC 18) instruction for converting binary data into BCD data.
Error
M8067 (operation error) turns ON when the source data is not binary-coded decimal (BCD).
[
+1,
]
Number of digits
Data range
K1X000
1
0 to 9
K2X000
2
00 to 99
K3X000
3
000 to 999
K4X000
4
0000 to 9999
K5X000
5
00000 to 99999
K6X000
6
000000 to 999999
K7X000
7
0000000 to 9999999
K8X000
8
00000000 to 99999999
Instruction
Function
BCD (FNC 18)
Converts binary (BIN) data into binary-coded decimal (BCD) data.
S
S
D
D
S
S
S
S
D
D
X034
X030
X024
X020
X014
X010
X004
X000
X037
X033
X027
X023
X017
X013
X007
X003
DBIN (FNC 19)
PLC
BCD
BIN
9
7
8
6
5
3
4
2
…
…
…
…
…
…
…
…
FNC 19
DBIN
S
D
When "K8X000"
is specified
Command
input
S
S