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 #310 background imageLoading...
Page #310 background image
285
Comparison Instructions Section 5-19
Flags ER: Indirectly addressed EM/DM word is non-existent.
(Content of *EM/*DM word is not BCD, or the EM/DM area boundary
has been exceeded.)
GR: ON if Cp1+1,Cp1 is greater than Cp2+1,Cp2.
EQ: ON if Cp1+1,Cp1 equals Cp2+1,Cp2.
LE: ON if Cp1+1,Cp1 is less than Cp2+1,Cp2.
Example:
Saving CMPL(60) Results
The following example shows how to save the comparison result immediately.
If the content of HR 10, HR 09 is greater than that of 011, 010, then 10000 is
turned ON; if the two contents are equal, 10001 is turned ON; if content of HR
10, HR 09 is less than that of 011, 010, then 10002 is turned ON. In some
applications, only one of the three OUTs would be necessary, making the use
of TR 0 unnecessary. With this type of programming, 10000, 10001, and
10002 are changed only when CMPL(60) is executed.
5-19-5 MULTI-WORD COMPARE – MCMP(19)
Limitations TB1 and TB1+15 must be in the same data area.
TB2 and TB2+15 must be in the same data area.
DM 6144 to DM 6655 cannot be used for R.
Description When the execution condition is OFF, MCMP(19) is not executed. When the
execution condition is ON, MCMP(19) compares the content of TB1 to TB2,
TB1+1 to TB2+1, TB1+2 to TB2+2, ..., and TB1+15 to TB2+15. If the first pair
is equal, the first bit in R is turned OFF, etc., i.e., if the content of TB1 equals
the content of TB2, bit 00 is turned OFF, if the content of TB1+1 equals the
content of TB2+1, bit 01 is turned OFF, etc. The rest of the bits in R will be
turned ON.
CMPL(60)
010
HR 09
00000
25505
10000
25507
10002
TR
0
25506
10001
Greater Than
Equal
Less Than
---
Address Instruction Operands
00000 LD 00000
00001 OUT TR 0
00002 CMPL(60)
HR 09
010
00003 AND 25505
00004 OUT 10000
00005 LD TR 0
00006 AND 25506
00007 OUT 10001
00008 LD TR 0
00009 AND 25507
00010 OUT 10002
TB1: First word of table 1
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
TB2: First word of table 2
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
Ladder Symbols
Operand Data Areas
R: Result word
IR, SR, AR, DM, EM, HR, TIM/CNT, LR
MCMP(19)
TB1
TB2
R
@MCMP(19)
TB1
TB2
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