5-102
5.1 Type Conversion Functions
5.1.33
BCD type
→
word (signed), double word (signed) type conversion
BCD_TO_INT(_E), BCD_TO_DINT(_E)
(2) BCD_TO_DINT, BCD_TO_DINT_E
(a) Converts BCD type data input to into double word (signed) type data, and outputs
the operation result from .
(b) The value to be input to is double word (unsigned)/32-bit string type data within the
range from 0
H to 99999999H (0 to 9 for each digit).
Operation result
(1) Function without EN/ENO
An operation is executed and the operation value is output from .
(2) Function with EN/ENO
The following table shows the executing conditions and operation results.
*1 When FALSE is output from ENO, the data output from is undefined.
In this case, create a program so that the data output from is not used.
EN ENO
TRUE (Operation execution) TRUE Operation output value
FALSE (Operation stop)
FALSE
*1
Undefined value
s
d
Double word (unsigned)/32-bit string type
99999999H
Double word (signed) type
99999999
99999999 11010111110100000 110000011111111
DINT conversion
Always filled with 0s.
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
Ten
million's
place
Million's
place
Hundred
thousand's
place
Ten
thousand's
place
Thousand's
place
Hundred's
place
Ten's
place
Unit's
place
11001100110011001
8
4
2
1
8
4
2
1
001100110011001
99999999H
10
7
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
d
d
d