Mitsubishi Electronics FX3G User Manual

Page of 964
268
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
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 ranging 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
When the data of 
 is not binary-coded decimal (BCD), M8067 (operation error) turns ON. But M8068 (operation
error latch) does not turn ON.
[
+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
When "K8X000"
is specified
Command
input
  S
  S
   
S