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

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

Advertisement

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

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

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents