
248
6 BASIC INSTRUCTIONS
6.5 Data Conversion Instructions
Converting BCD 8-digit data to binary data
DBIN(P)
These instructions convert the binary-coded decimal data in the device specified by (s) to binary data, and store the converted
data in the device specified by (d).
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 CPU module.
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
Processing details
• These instructions convert the BCD 8-digit data (0 to 99999999) in the device specified by (s) to 32-bit binary data, and
store the converted data in the device specified by (d).
• The data in the device specified by (s) can be converted if it is in the range from 0 to 99999999 (BCD).
• The table below shows nibble specification for the data in the device specified by (s) and (d).
Ladder diagram
Structured text
ENO:=DBIN(EN,s,d);
ENO:=DBINP(EN,s,d);
Operand
Description
Range
Data type
Data type (label)
(s)
Binary-coded decimal data or the head device where the
binary-coded decimal data is stored
0 to 99999999
BCD 8-digit
ANY32
(d)
Head device for storing the binary data
32-bit signed binary
ANY32
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s)
(d)
(s)
(d)
(s)
(d)
0
BIN 99999999
0
0 0 0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 0 0 0 0 0 1 1 1 1 1 1 1 1
0
BCD 99999999 1
0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1
4
8
2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1 8 4 2 1
10
7
10
6
10
5
10
4
10
3
10
2
10
1
10
0
2
31
2
30
2
29
2
28
2
27
2
26
2
25
2
24
2
23
2
22
2
21
2
20
2
19
2
18
2
17
2
16
2
15
2
14
2
13
2
12
2
11
2
10
2
9
2
8
2
7
2
6
2
5
2
4
2
3
2
2
2
1
2
0
(s)+1
(s)
(d)+1
(d)
Always becomes "0".
Binary conversion
Ten-millions
place
millions
place
Hundred-
thousands
place
Ten-
thousands
place
Thousands
place
Hundreds
place
Tens
place
Ones
place
DBIN
(s)
(d)
BCD
BIN
9
7
8
6
5
3
4
2
X34 to
X37
X30 to
X33
X24 to
X27
X20 to
X23
X14 to
X17
X10 to
X13
X4 to
X7
X0 to
X3
In case of K8X0
DBIN
CPU module
Command
input
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......