Word (Signed), Double Word (Signed) Type → Bcd Type Conversion - Mitsubishi Melsec-Q Series Structured Programming Manual

Application functions, qcpu
Hide thumbs Also See for Melsec-Q Series:
Table of Contents

Advertisement

5.1.13
Word (signed), double word (signed) type → BCD type
conversion
INT_TO_BCD(_E)
DINT_TO_BCD(_E)
Structured ladder
INT_TO_BCD_E
EN
ENO
s
d
Input argument,
EN:
Executing condition (TRUE: Execution, FALSE: Stop)
s:
Input
Output argument,
ENO:
Output status (TRUE: Normal, FALSE: Error)
d:
Output
Function
Operation processing
(1) INT_TO_BCD, INT_TO_BCD_E
(a) Converts word (signed) type data input to
operation result from
9999
9999
H
(b) The value to be input to
5.1.13 Word (signed), double word (signed) type
INT_TO_BCD(_E), DINT_TO_BCD(_E)
ST
ENO:=
(EN, s, d);
INT_TO_BCD_E
.
d
9999
Word (signed) type
3276816384
8192
4096
2048
1024
512
0
0
1
0
0
1
1
Must always be 0.
8000 4000
2000
1000
800
400
200
1
0
0
1
1
0
0
Thousand's place Hundred's place
is word (signed) type data within the range from 0 to 9999.
s
INT_TO_BCD(_E), DINT_TO_BCD(_E)
_E: With EN/ENO
functions.
INT_TO_BCD
DINT_TO_BCD
:Bit
:Word (signed), double word (signed)
:Bit
:Word (unsigned)/16-bit string, double word
(unsigned)/32-bit string
into BCD type data, and outputs the
s
9999
H
Word (unsigned)/16-bit string type
256
128
64
32
16
8
4
1
0
0
0
0
1
1
BCD conversion
100
80
40
20
10
8
4
1
1
0
0
1
1
0
Ten's place
Unit's place
5.1 Type Conversion Functions
BCD type conversion
High
Performance
Universal
UD
indicates any of the following
INT_TO_BCD_E
DINT_TO_BCD_E
2
1
1
1
2
1
0
1
5-39
5

Advertisement

Table of Contents
loading

This manual is also suitable for:

Q-kp-ok-e13jw08

Table of Contents