18 TYPE CONVERSION FUNCTIONS
18.29 Converting DINT to BCD
933
18
18.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, FBD/LD
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(IN)
Input
Input variable
DINT
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
Output variable
BOOL
d(DINT_TO_BCD(_E))
Output
Output variable
ANY_BIT
(1): Make sure to set them to "0".
s
d
EN
ENO
d
s
DINT
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
BCD
(1)
×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)
Summary of Contents for MELSEC iQ-F FX5
Page 1: ...MELSEC iQ F FX5 Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 17: ...15 CONTENTS ...
Page 24: ...22 MEMO ...
Page 1050: ...1048 26 TIME DATA FUNCTIONS 26 4 Division MEMO ...
Page 1068: ...1066 29 COUNTER FUNCTION BLOCKS 29 4 Counter Function Block Operation error There is no error ...
Page 1107: ...I 1105 MEMO ...
Page 1111: ......