
15 TYPE CONVERSION FUNCTIONS
15.29 Converting DINT to BCD
723
15
15.29
Converting DINT to BCD
DINT_TO_BCD(_E)
These functions convert DINT type data to BCD type data.
Setting data
■
Descriptions, types, and data types
Processing details
■
Operation processing
• These functions convert the DINT type data input to (s) to BCD type data and output from (d).
• A value input to (s) is the DINT type data value. When (d) is WORD, the input value is within the range from 0 to 9999.
When (d) is DWORD, the input value is within the range from 0 to 99999999.
• WORD or DWORD can be specified to (d). BOOL cannot be specified.
Ladder diagram
Structured text
[Without EN/ENO]
[With EN/ENO]
[Without EN/ENO]
d:=DINT_TO_BCD(s);
[With EN/ENO]
d:=DINT_TO_BCD_E(EN,ENO,s);
Argument
Description
Type
Data type
EN
Execution condition (TRUE: Execution, FALSE: Stop)
Input variable
BOOL
s
Input
Input variable
DINT
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d
Output
Output variable
ANY_BIT
s
d
EN
ENO
d
s
DINT
Tens place Ones place
99999999
BCD
99999999H
99999999
1
1
0
1
0
1
1
1
1
1
0
1
0
0
0
0
0
1 1 0 0 0 0 0 1 1 1 1 1 1 1 1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
0
0
1
8
4
2
1
8
4
2
1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1
99999999H
Conversion to Binary Coded Decimal
Make sure to set them to "0".
×10
7
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
×10
6
8
4
2
1
×10
5
8
4
2
1
×10
4
8
4
2
1
×10
3
8
4
2
1
×10
2
8
4
2
1
×10
1
8
4
2
1
×10
0
(s)
(d)
Ten-millions
place
Hundred-
thousands
place
Ten-
thousands
place
Thousands
place
Hundreds
place
Millions
place
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: ......