Chapter 6 Instruction Details
XBC E-Type Main Unit
6-100
Ver. 1
6.20 Conversion Instruction
6.20.1 BCD, BCDP, DBCD, DBCDP
Instruction
Area Available
Step
Flag
P M K F L T C S Z D.x R.x
Co
nst.
U N D R
Error
(F110)
Zero
(F111)
Carry
(F112)
BCD(P)
DBCD(P)
S O O O O O O O - O -
- O O O O O
2~4
O
-
-
D O O O - O O O - O -
-
- O O O O
Operand
Description
Data Type
S
Device Number data is saved in
WORD/DWORD
D
Device number of Destination area
WORD/DWORD
[Flag Set]
Flag
Description
Device Number
Error
For BCD(P) when S’ value is other than 0~9999 (h270F).
For DBCD(P) when S+1,S’s value is other than 0~99999999 (h5F5E0FF)
F110
1) BCD (Binary-Coded Decimal)
(1) It converts specified S device’s BIN data (0~h270F) to BCD so to save in D.
Instruction
Data Size
BIN format
BCD format
BCP(P)
16-bit
0~h270F
0~9999
DBCD(P)
32-bit
0~h05F5E0FF
0~99999999
BCD, DBCD
means BCD/DBCD
S
D
BCDP, DBCDP
S
D
S: h270F
0 0 1 0 0 1 1 1 0 0 0 0 1 1 1 1
2
15
2
5
2
6
2
7
2
8
2
9
2
10
2
11
2
12
2
13
2
14
2
0
2
1
2
2
2
3
2
4
Convert to BCD
1 0 0 1 1 0 0 1 1 0 0 1 1 0 0 1
2
3
2
1
2
2
2
3
2
0
2
1
2
2
2
3
2
0
2
1
2
2
2
0
2
1
2
2
2
3
2
0
D: BCD 9999
X10
3
X10
2
X10
1
X10
0
Summary of Contents for XBC-DN10E
Page 1: ......
Page 10: ...Table of Contents Table of Contents 6 10 10 CLEAR ALL PLC 29...