
Chapter 5. Application instructions
5-12
-
Execution conditions
-
Operation Error
In the following cases, operation error occurs and the error flag (F110) turns on.
a) When BCD(P) instruction is used
The data of source [ S ] is outside the range of 0 to 9999
b) When DBCD(P) instruction is used
The data of source [ S ] is outside the range of 0 to 99999999
2) Program example
-
While P020 is on, convert the binary data of D001 and transfer the result to the P05 word.
Input condition
BCD, DBCD
BCDP, DBCDP
Executed only once
Executed only once
Executed per scan
Executed per scan
BCD D0001 P05
P020
0
8192
1
4096
0
32768
0
16384
0
512
1
256
0
2048
0
1024
0
32
1
16
0
128
0
64
0
2
1
1
0
8
0
4
0
2000
0
1000
0
8000
1
4000
1
200
1
100
0
800
0
400
1
20
0
10
0
80
1
40
0
2
1
1
1
8
0
4
D0001 (h1111)
P05 (4369)
4000
300
60
9