Omron CP - PROGRAMMING MANUAL 05-2007 Programming Manual page 618

Cp1h/cp1l cpu unit
Table of Contents

Advertisement

Table Data Processing Instructions
Note
Note
Operand Specifications
Description
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.)
15
R1
Search range
to
---
R1+(C–1)
R1 and R1+C–1 must be in the same data area.
Area
CIO Area
Work Area
Holding Bit Area
Auxiliary Bit Area
Timer Area
Counter Area
DM Area
Indirect DM addresses
in binary
Indirect DM addresses
in BCD
Constants
Data Registers
Index Registers
Indirect addressing
using Index Registers
SRCH(181) searches the range of memory from R1 to R1+C–1 for words that
contain the comparison data (Cd). If a match is found, SRCH(181) writes the
PLC memory address of the word to IR0 and turns the Equals Flag ON.
(If there are two or more matches, just the address of the first word containing
the comparison data is written to IR0.)
When bit 15 of C+1 has been set to 1, SRCH(181) writes the number of
matches to DR0. When bit 15 of C+1 is 0, DR0 is left unchanged.
PLC memory
address
R1
R1+(C–1)
0
C
CIO 0 to
CIO 0 to CIO 6143
CIO 6142
W0 to W510
W0 to W511
H0 to H510
H0 to H511
A0 to A958
A0 to A959
T0000 to T4094
T0000 to T4095
C0000 to C4094
C0000 to C4095
D0 to D32766
D0 to D32767
@ D0 to @ D32767
*D0 to *D32767
Specified values
---
only
---
---
,IR0 to ,IR15
–2048 to +2047 ,IR0 to –2048 to +2047 ,IR15
DR0 to DR15, IR0 to IR15
,IR0+(++) to ,IR15+(++)
,–(– –)IR0 to, –(– –)IR15
Search
Cd
C
Match
Section 3-16
R1
Cd
#0000 to #FFFF
(binary)
DR0 to DR15
585

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CP - PROGRAMMING MANUAL 05-2007 and is the answer not in the manual?

Questions and answers

Table of Contents