EasyManua.ls Logo

Omron CP - PROGRAMMING MANUAL 05-2007 - Page 395

Omron CP - PROGRAMMING MANUAL 05-2007
1175 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
362
Symbol Math Instructions Section 3-10
Description –B(414) subtracts the BCD values in Su from Mi and outputs the result to R. If
the result of the subtraction is negative, the result is output as a 10’s comple-
ment.
Flags
Precautions If Mi and/or Su are not BCD, an error is generated and the Error Flag will turn
ON.
If as a result of the subtraction, the content of R is 0000 hex, the Equals Flag
will turn ON.
If an addition results in a borrow, the Carry Flag will turn ON.
Examples When CIO 0.00 is ON in the following example, D110 will be subtracted from
D100 as 4-digit BCD values, and the result will be output to D120.
Indirect DM addresses
in binary
@ D0 to @ D32767
Indirect DM addresses
in BCD
*D0 to *D32767
Constants 0000 to 9999 (BCD) ---
Data Registers DR0 to DR15
Index Registers ---
Indirect addressing
using Index Registers
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Area Mi Su R
RCY
(BCD)
(BCD)
(BCD)
Mi
Su
CY will turn
ON when there
is a borrow.
Name Label Operation
Error Flag ER ON when Mi is not BCD.
ON when Su is not BCD.
OFF in all other cases.
Equals Flag = ON when the result is 0.
OFF in all other cases.
Carry Flag CY ON when the subtraction results in a borrow.
OFF in all other cases.
0.00
D100
D110
D120

Table of Contents

Related product manuals