Converting Dint To Bcd - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

Hide thumbs Also See for MELSEC iQ-R Series:
Table of Contents

Advertisement

25.32

Converting DINT to BCD

DINT_TO_BCD(_E)
RnPCPU
RnPCPU
RnCPU RnENCPU
(Process)
(Redundant)
These functions convert a value from DINT data type to BCD data type.
Ladder, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Description, type, data type
Argument
Description
EN
Execution condition (TRUE: Executed, FALSE: Not executed)
s (IN)
Input
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d
Output
Processing details
■Operation processing
• These functions convert the value input to (s) from DINT data type to BCD (DWORD) data type, and output the converted
value from (d).
(s)
99999999
DINT
99999999
0 0 0 0 0 1 0 1 1 1 1 1 0 1 0 1 1
(1)
99999999H
1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
(1) Set 0s.
• Input a DINT data type value to (s). When (d) is of WORD date type, the input value range is 0 to 9999. When (d) is of
DWORD date type, the input value range is 0 to 99999999.
• WORD or DWORD data type can be specified for (d). BOOL data type cannot be specified.
RnSFCPU RnSFCPU
(Standard)
(Safety)
[With EN/ENO]
EN
ENO
s
d
1
1
0
0
0
0
0
0
1
1
0
0
Structured text
[Without EN/ENO]
d:=DINT_TO_BCD(s);
[With EN/ENO]
d:=DINT_TO_BCD_E(EN,ENO,s);
Type
Input variable
Input variable
Output variable
Output variable
(d)
99999999H
BCD(DWORD)
0
1
1
1
1
1
1
1
1
1
1
0
0
1
1
0
0
1
25 TYPE CONVERSION FUNCTIONS
Data type
BOOL
DINT
BOOL
ANY_BIT
25.32 Converting DINT to BCD
25
1831

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents