Download Print this page

Converting Dint To Bcd - Mitsubishi Electric MELSEC iQ-F FX5 Programming Manual

Instructions, standard functions/function blocks
Hide thumbs Also See for MELSEC iQ-F FX5:

Advertisement

18.29

Converting DINT to BCD

DINT_TO_BCD(_E)
These functions convert DINT type data to BCD type data.
Ladder diagram, FBD/LD
[Without EN/ENO]
s
d
Setting data
■Descriptions, types, and data types
Argument
Description
EN
Execution condition (TRUE: Execution, FALSE: Stop)
s(IN)
Input
ENO
Output status (TRUE: Normal, FALSE: Abnormal)
d(DINT_TO_BCD(_E))
Output
Processing details
■Operation processing
• These functions convert the DINT type data input to (s) to BCD type data and output from (d).
(s)
99999999
DINT
99999999
0
0
0
0
0
1
0
1
(1)
99999999H
1
0
0
1
1
0
0
1
(1): Make sure to set them to "0".
• 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.
[With EN/ENO]
EN
ENO
s
d
1
1
1
1
0
1
0
1
1
1 1 0 0 0 0 0 1 1 1 1 1 1 1 1
BCD
1
0
0
1
1
0
0
1
1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1
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
18 TYPE CONVERSION FUNCTIONS
Data type
BOOL
DINT
BOOL
ANY_BIT
18.29 Converting DINT to BCD
18
933

Hide quick links:

Advertisement

loading