Mitsubishi Electric MELSEC-Q/L Programming Manual page 52

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

• DINT_TO_BCD, DINT_TO_BCD_E
Converts double word (signed) type data input to (s) into BCD type data, and outputs the operation result from (d).
Double word (signed) type
99999999
0
0
0
0
Must always be 0.
99999999
1
0
0
1
H
Ten
millions
place
The value to be input to (s) is double word (signed) type data within the range from 0 to 99999999.
Word (unsigned)/16-bit string type, double word (unsigned)/32-bit string type data can be specified for (s). Bit type cannot be
specified.
The output from (d) cannot be used with connecting to the input of double word (unsigned)/32-bit string type
data. In this case, use the DBCD instruction.
■Operation result
• Function without EN/ENO
The following table shows the operation results.
Operation result
No operation error
Operation error
• Function with EN/ENO
The following table shows the executing conditions and operation results.
EN
TRUE (Operation execution)
FALSE (Operation stop)
*1 When FALSE is output from ENO, the data output from (d) is undefined. In this case, create a program so that the data output from (d) is
not used.
5 APPLICATION FUNCTIONS
50
5.1 Type Conversion Functions
s
99999999
0
1
0
1
1
1
1
1
0
1
0
1
1
1
0
0
1
1
0
0
1
1
0
0
1
1
Millions
Hundred
Ten
Thousands
place
thousands
thousands
place
place
place
ENO
TRUE (No operation error)
FALSE
d
99999999
H
Double word (unsigned)/32-bit string type
1 1 0 0 0 0 0 1 1 1 1 1 1 1 1
BCD conversion
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1
Hundreds
Tens
Units
place
place
place
(d)
Operation output value
Undefined value
*1
(d)
Operation output value
Undefined value

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents