Mitsubishi Electric MELSEC-Q/L Programming Manual page 546

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

Advertisement

■DDABCD
• Converts decimal ASCII data stored in the area starting from the device designated by (S) to 8-digit BCD data, and stores it
into the area starting from the device designated by (D).
b15
S
ASCII code for millions place
+1
S
ASCII code for ten-thousands place
S
+2
ASCII code for hundreds place
S
+3
ASCII code for units place
For example, if the ASCII code of 87654321H is designated for the area starting from (S), the operation results would be
stored at (D)+1 and (D) in the following manner:
b15
37
(7)
S
H
+1
35
(5)
S
H
S
+2
33
(3)
H
S
+3
31
(1)
H
• The ASCII data designated by (S) to (S)+3 can be in the range of from 0 to 99999999.
• The ASCII code set at each digit can be in the range of from "30H" to "39H".
• If ASCII code for individual digits is from "20H" to "00H", it is processed as "30H".
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
A character other than 0 to 9 is put in the data of (S).
4101
The range of the device specified in (S) exceeds the range of the
corresponding device.
7 APPLICATION INSTRUCTIONS
544
7.11 Character String Processing Instructions
b8
b7
b0
ASCII code for ten-millions place
ASCII code for hundred-thousands place
ASCII code for thousands place
ASCII code for tens place
b8 b7
b0
38
(8)
H
36
(6)
H
34
(4)
H
32
(2)
H
D
+1
b31 b28
b27
b24
b23 b20
b19
b16
b15 b12
Hundred
Ten
Milli-
Ten
Thou-
thou-
milli-
ons
thou-
sands
ons
place
sands
sands
place
place
place
place
b31 b28
b27
b24
b23 b20
b19
b16
b15 b12
8
7
6
5
4
D
+1
Q00J/
Q00/
Q01
D
b11
b8
b7 b4
b3
b0
Hund-
Tens
Units
reds
place
place
place
b11
b8
b7 b4
b3
b0
3
2
1
D
QnH
QnPH
QnPRH
QnU
LCPU

Advertisement

Table of Contents
loading

Table of Contents