EasyManuals Logo
Home>Omron>Controller>CQM1H - PROGRAM

Omron CQM1H - PROGRAM User Manual

Omron CQM1H - PROGRAM
602 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
Page #345 background imageLoading...
Page #345 background image
320
BCD Calculation Instructions Section 5-21
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 –3452
CY –0
HR 10 7577 (1029 + (10000 – 3452))
CY 1 (negative result)
Second Subtraction
0000
HR 10 –7577
CY –0
HR 10 2423 (0000 + (10000 – 7577))
CY 1 (negative result)
In the above case, the program would turn ON HR 1100 to indicate that the
value held in HR 10 is negative.
5-21-5 BCD MULTIPLY – MUL(32)
00000 LD 00002
00001 OUT TR 0
00002 CLC(41)
00003 @SUB(31)
010
DM 0100
HR 10
00004 AND 25504
00005 CLC(41)
00006 @SUB(31)
#0000
HR 10
HR 10
00007 LD TR 0
00008 LD 25504
00009 OR HR 1100
00010 AND LD
00011 OUT HR 1100
Address Instruction Operands
Md: Multiplicand (BCD)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Mr: Multiplier (BCD)
IR, SR, AR, DM, EM, HR, TIM/CNT, LR, #
Ladder Symbols
Operand Data Areas
R: First result word
IR, SR, AR, DM, EM, HR, LR
MUL(32)
Md
Mr
R
@MUL(32)
Md
Mr
R

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Omron CQM1H - PROGRAM and is the answer not in the manual?

Omron CQM1H - PROGRAM Specifications

General IconGeneral
BrandOmron
ModelCQM1H - PROGRAM
CategoryController
LanguageEnglish

Related product manuals