EasyManua.ls Logo

Omron CJ - INSTRUCTIONS

Omron CJ - INSTRUCTIONS
1308 pages
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...
3. Instructions
366
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Function
z –B
–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 complement.
z –BL
–BL(415) subtracts the BCD values in Su and Su+1 from Mi and Mi+1 and outputs the result to R, R+1.
If the result is negative, it is output to R, R+1 as a 10's complement.
Hint
10's Complement
A 10's complement is the value obtained by subtracting each digit from 9 and adding one to the
result. For example, the 10's complement for 7556 is calculated as follows: 9999 - 7556 + 1 = 2444.
For a four digit number, the 10's complement of A is 9999 – A + 1 = B. To obtain the true number from
the 10's complement B: A = 10000 – B. For example, to obtain the true number from the 10's
complement 2444: 10000 – 2444 = 7556.
Example: 9,583,960 – 17,072,641 = -7,488,681. (BCD)
In this example, the eight-digit BCD content of CIO 121 and CIO 120 is subtracted from the content of
CIO 201 and CIO 200, and the result is output in eight-digit BCD to D101 and D100. The result is
negative, so the instruction at (2) will be executed, and the true value will then be output to D101 and
D100.
R CY
(BCD)
(BCD)
(BCD)
Mi
Su
CY will turn ON
when there is a
borrow.
R+1
CY
R
(BCD)
(BCD)
(BCD)
Mi +1
Su+1
Mi
Su
CY will turn ON
when there is a
borrow.
BL
200
120
D100
0.00
(1)
CY
CY
(2)
RSET
21.00
SET
21.00
BL
#00000000
D100
D100
"" display

Table of Contents

Related product manuals