Converting Word (Signed), Double Word (Signed) Type To Bcd Type - Mitsubishi Electric MELSEC-Q/L Programming Manual

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

Advertisement

Converting word (signed), double word (signed) type to BCD type

INT_TO_BCD(_E), DINT_TO_BCD(_E)
High
Basic
Process
Redundant Universal
performance
Structured ladder/FBD
INT_TO_BCD_E
EN
ENO
s
d
The following function(s) can go in the dotted squares.
INT_TO_BCD, INT_TO_BCD_E, DINT_TO_BCD, DINT_TO_BCD_E
■Argument
Input/output
Name
argument
Input argument
EN
s(_INT, _DINT)
Output argument
ENO
d
Processing details
■Operation processing
• INT_TO_BCD, INT_TO_BCD_E
Converts word (signed) type data input to (s) into BCD type data, and outputs the operation result from (d).
s
9999
Word (signed) type
3276816384
8192
4096
2048
9999
0
0
1
0
0
Must always be 0.
8000 4000
2000
1000
800
9999
1
0
0
1
1
H
Thousands place Hundreds place
The value to be input to (s) is word (signed) type data within the range from 0 to 9999.
LCPU
ST
ENO:=
(EN, s, d);
INT_TO_BCD_E
Description
Executing condition (TRUE: Execution, FALSE:
Stop)
Input
Execution result (TRUE: Normal, FALSE: Error)
Output
Word (unsigned)/16-bit string type
1024
512
256
128
64
32
16
1
1
1
0
0
0
0
BCD conversion
400
200
100
80
40
20
10
0
0
1
1
0
0
1
Tens place
Data type
Bit
Word (signed), double word (signed)
Bit
Word (unsigned)/16-bit string, double word
(unsigned)/32-bit string
d
9999
H
8
4
2
1
1
1
1
1
8
4
2
1
1
0
0
1
Units place
5 APPLICATION FUNCTIONS
5.1 Type Conversion Functions
5
49

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents