Function, Sample program, 2 instructions – Omron SYSMAC CP CP1E-N@@D@-@ User Manual
Page 199
2-163
2 Instructions
CP1E CPU Unit Instructions Reference Manual(W483)
Sym
bol
Math I
n
stru
ctio
ns
2
+B/+
BL
Function
+B
+B(404) adds the BCD values in Au and Ad and outputs the result to R.
+BL
+BL(405) adds the BCD values in Au and Au+1 and Ad and Ad+1 and outputs the result to R, R+1.
Sample program
+
R
CY
(BCD)
(BCD)
(BCD)
Au
Ad
CY will turn ON
when there is a
carry.
+
CY
R
(BCD)
(BCD)
(BCD)
R+1
Au+1
Ad+1
Au
Ad
CY will turn ON
when there is a
carry.
+B
D100
D110
D120
0.00
+BL
D100
D110
D120
0.00
When CIO 0.00 is ON in the following example, D100 and
D110 will be added as 4-digit BCD values, and the result will
be output to D120.
When CIO 0.00 is ON in the following example, D101 and
D100 and D111 and D110 will be added as 8-digit BCD
values, and the result will be output to D121 and D120.