Omron C200H Operation Manual page 181

Hide thumbs Also See for C200H:
Table of Contents

Advertisement

BCD Calculations
TR 0
00002
25504
25504
HR 2100
168
turned OFF for at least one cycle (resetting HR 2100) and then turned back
ON.
The first and second subtractions for this diagram are shown below using
example data for 010 and DM 0100.
Note The actual SUB(31) operation involves subtracting Su and CY from 10,000
plus Mi. For positive results the leftmost digit is truncated. For negative
results the 10s complement is obtained. The procedure for establishing the
correct answer is given below.
First Subtraction
IR 010 1029
DM 0100
CY
– 0
HR 20 7577
CY
1
CLC(41)
@SUB(31)
First
subtraction
010
DM 0100
HR 20
CLC(41)
@SUB(31)
Second
subtraction
#0000
HR 20
Address Instruction
HR 21
00000
00001
HR 2100
00002
00003
Turned ON to indicate
negative result.
00004
00005
00006
00007
00008
00009
00010
– 3452
(1029 + (10000 – 3452))
(negative result)
Section 5-17
Operands
LD
00002
OUT
TR
CLC(41)
@SUB(31)
DM
0100
HR
AND
25504
CLC(41)
@SUB(31)
#
0000
HR
HR
LD
TR
AND
25504
OR
HR
2100
OUT
HR
2100
0
010
20
20
20
0

Advertisement

Table of Contents
loading

Table of Contents