Mitsubishi Electronics FX3G User Manual

Page of 964
267
FX
3S
/FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 Series
Programming Manual - Basic & Applied Instruction Edition
9 Move and Compare – FNC 10 to FNC 19
9.10 FNC 19 – BIN / Conversion to Binary
1
Introdu
ction
2
Ov
ervi
ew
3
Instruction 
Li
st
4
D
evices 
in Det
ai
l
5
Specifi
ed the
De
vice
 &
 
C
onst
ant
6
Bef
ore
 
Pr
og
ra
mmi
ng
7
Bas
ic 
Instruction
8
FN
C00-FN
C0
9
Program Fl
ow
9
FNC
10-FN
C19
Mov
e & Com
pare
10
FNC
20-FNC
29
Arith. & Lo
gi
Operati
on
9.10
FNC 19 – BIN / Conversion to Binary
Outline
This instruction converts binary-coded decimal (BCD) data into binary (BIN) data.
Use this instruction to convert a binary-coded decimal (BCD) value such as a value set by a digital switch into binary
(BIN) data and to receive the converted binary data so that the data can be handled in operations in PLCs.
1. Instruction format
2. Set data
3. Applicable devices
S1: This function is supported only in FX
3G
/FX
3GC
/FX
3U
/FX
3UC
 PLCs.
S2: This function is supported only in FX
3U
/FX
3UC
 PLCs.
Explanation of function and operation
1. 16-bit operation (BIN and BINP)
This instruction converts the binary-coded decimal (BCD) data of 
 into binary (BIN) data, and transfers the
converted binary data to 
.
• The data of 
 can be converted if it is ranging from K0 to K9999 (BCD).
• The table below shows digit specification for 
 and 
.
Operand Type
Description
Data Type
Word device number storing the conversion source (binary-coded decimal) data
16- or 32-bit binary
Word device number of the conversion destination (binary)
16- or 32-bit binary
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
S1
S2
S1
S2
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
DBIN
DBINP
Mnemonic
Operation Condition
16-bit Instruction
 5 steps
BIN
BINP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
32-bit Instruction
 9 steps
Continuous
Operation
Pulse (Single)
Operation
P
FNC 19
BIN
D
  S
  D
  S
  D
   
S
   
D
   
S
   
S
   
D
FNC 19
BIN
X014 X010 X004 X000
X017 X013 X007 X003
BIN (FNC 19)
PLC
BCD
BIN
9
7
8
6
When "K4X000"
is specified
Command
input
  S