Mitsubishi Electric MELSEC-Q/L Programming Manual page 537

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

Advertisement

■DBCDDA
• Converts the individual digit numbers of hexadecimal notation of the BCD 8-digit data designated by (S) into ASCII codes,
and stores the results into the area starting from the device designated by (D).
S
+1
S
b31 b28
b27
b24
b23 b20
b19
b16
b15 b12
b11
b8
Ten
Millions
Hundred
Ten
Thou-
Hundreds
millions
place
thou-
thou-
sands
place
place
sands
sands
place
place
place
For example, if the value 01234056 is designated by (S), the operation result would be stored following (D) in the following
manner:
b31 b28
b27
b24
b23 b20
b19
b16
b15 b12
b11
b8
0
1
2
3
4
0
S
+1
S
• The BCD data designated by (S) can be in the range of from 0 to 99999999.
• The results of calculation stored in the device (D). All zeros on the left side of the "Number of significant digits" are zero-
suppressed.
0 0 0 1
2 0 9 8
Number of significant digits
20
H
• The data to be stored at the device designated by (D)+4 differs depending on the ON/OFF status of SM701 (number of
characters to output select signal).
• When SM701 is OFF: Stores "0"
• When SM701 is ON: Does not change
Operation error
• In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and an error code is stored into SD0.
Error
Error details
code
4100
During the operation of the BCDDA instruction, the data of (S) is other than 0
to 9999.
During the operation of the DBCDDA instruction, the data of (S) is other than
0 to 99999999.
4101
The range of the device specified in (D) exceeds the range of the
corresponding device.
b15
D
ASCII code for millions place
D
+1
ASCII code for ten-thousands place
b7 b4
b3
b0
D
+2
ASCII code for hundreds place
D
+3
ASCII code for unit place
Tens
Units
place
place
b15
D
31
D
+1
33
b7 b4
b3
b0
D
+2
5
6
30
D
+3
36
+4
D
b8b7
b0
ASCII code for ten-millions place
ASCII code for hundred-thousands place
ASCII code for thousands place
ASCII code for tens place
0
b8b7
b0
(1)
20
H
H
(3)
32
(2)
H
H
(0)
34
(4)
H
H
(6)
35
(5)
H
H
00
H
Q00J/
QnH
Q00/
Q01
7.11 Character String Processing Instructions
(Only when
SM701 is OFF)
QnPH
QnPRH
QnU
7 APPLICATION INSTRUCTIONS
7
LCPU
535

Advertisement

Table of Contents
loading

Table of Contents