![Omron CJ1G-CPUxx Instructions Manual Download Page 663](http://html1.mh-extra.com/html/omron/cj1g-cpuxx/cj1g-cpuxx_instructions-manual_742491663.webp)
642
Table Data Processing Instructions
Section 3-17
3-17-8 DATA SEARCH: SRCH(181)
Purpose
Searches for a word of data within a range of words.
In CS1-H, CJ1-H, and CJ1M CPU Units, this instruction can be run in the
background. Refer to the CS/CJ Series Programmable Controllers Program-
ming Manual for details on background execution.
Ladder Symbol
Variations
Applicable Program Areas
Operands
C and C+1: Control words
C specifies the number of words in the range and bit 15 of C+1 indicates
whether or not to output the number of matches to DR00.
Note C and C+1 must be in the same data area.
R1: First word in range
R1 specifies the first word in the search range. The words from R1 to R1+(C–
1) are searched for the desired data. (C is the number of words set in C.)
Note R1 and R1+C–1 must be in the same data area.
C: First control word
R1: First word in range
Cd: Comparison data
SRCH(181)
C
R1
Cd
Variations
Executed Each Cycle for ON Condition
SRCH(181)
Executed Once for Upward Differentiation
@SRCH(181)
Executed Once for Downward Differentiation Not supported.
Immediate Refreshing Specification
Not supported.
Block program areas
Step program areas
Subroutines
Interrupt tasks
OK
OK
OK
OK
Number of words in range
Output selection
0: Does not output number of
matches.
1: Outputs number of matches.
15
0
C
15
0
14
0
C+1
000
0000
0000
0000
Output selection
0000 hex: Does not output number of
matches.
8000 hex: Outputs number of matches.
Search range
R1
R1+(C–1)
15
0
---
to
Summary of Contents for CJ1G-CPUxx
Page 3: ...iv N o t i c e ...
Page 5: ...vi ...
Page 21: ...xxii Conformance to EC Directives 6 ...
Page 35: ......
Page 1131: ...1110 CJ series Instruction Execution Times and Number of Steps Section 4 2 ...