459
DABCD, DABCDP, DDABCD, DDABCDP
1
2
3
4
4
6
7
8
7.11
Char
acter
string processing inst
ructions
7.11.6
D
ABCD, D
A
BC
DP, DDABCD, D
D
ABCDP
(2) The following program converts the hexadecimal, 8-digit ASCII data set at D20 to D23 to BIN values, and stores the
result at D10 and D11.
[Ladder Mode]
[List Mode]
[Operation]
: ASCII data to be converted to BCD value or head number of the devices where the ASCII data is stored (character string)
: Head number of the devices where the conversion result will be stored (BCD 4 digits/8 digits)
F
unct
i
on
DABCD
(1) Converts decimal ASCII data stored in the area starting from device number designated by into 4-digit BCD data, and
stores at device number designated by .
For example, if the ASCII code of 8765
H
is designated for the area starting from , the operation results would be stored
at in the following manner:
(2) The ASCII data designated by to +1 can be in the range of from 0 to 9999.
(3) The ASCII code set at each digit can be in the range of from "30
H
" to "39
H
".
(4) If ASCII code for individual digits is "20
H
" or "00
H
", it is processed as "30
H
".
DABCD, DABCDP
Conversion from decimal ASCII to BCD 4-digit data
DDABCD, DDABCDP
Conversion from decimal ASCII to BCD 8-digit data
7.11.6
DABCD, DABCDP, DDABCD,
DDABCDP
Setting
Data
Internal Devices
R, ZR
J \
U \G
Zn
Constants
$
Other
Bit
Word
Bit
Word
––
––
––
––
––
Step
I
nstruct
i
on
De
vi
ce
D21
34
H
(4)
46
H
(F)
44
H
(D)
32
H
(2)
b15
b8b7
b0
D20
Regarded as 4FD28750
H
(1339197264 in decimal
v
alue)
4FD28750
38
H
(8)
37
H
(7)
35
H
(5)
30
H
(0)
D22
D23
D11
BIN
v
alue
D10
7 2 6 4
1 3 3 9 1 9
Process
High
performance
Redundant Universal
LCPU
Bas
i
c
Command
Command
P
D
S
D
S
DABCD, DDABCD
DABCDP, DDABCDP
i
nd
i
cates
an
i
nstruct
i
on
symbo
l
of
DABCD
/
DDABCD
.
S
D
S
D
S
D
Thousands
place
Hundreds
place
Tens
place
U
nits
place
ASCII code for thousands place
+1
b15
b12
b8
b11
b7
b4
b0
b3
b15
b8b7
b0
ASCII code for hundreds place
ASCII code for units place
S
S
D
ASCII code for tens place
S
D
8
7
6
5
b15
b12
b8
b11
b7
b
4
b0
b3
38
H
(8)
37
H
(7)
36
H
(6)
35
H
(5)
b8b7
b0
b15
D
+
1
S
S
S
S