627
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Tracking Instructions
3
RSRCH4<, RSRCH4<=, RSRCH4=,
RSRCH4>, RSRCH4>=
RSRCH4<, RSRCH4<=, RSRCH4=,
RSRCH4>, RSRCH4>=
Applicable Program Areas
Operands
S1: First word of first record to search
S2: First search data word
Instruction Mnemonic Variations
Function
code
Function
Unsigned Four-word
Record Search Instructions
RSRCH4<
RSRCH4<=
RSRCH4=
RSRCH4>
RSRCH4>=
@RSRCH4<
@RSRCH4<=
@RSRCH4=
@RSRCH4>
@RSRCH4>=
380
381
382
383
384
An Unsigned Four-word Record Search Instruction
searches the specified table of records for a record with
the specific data (4 words) in the specified location.
When a record matching the specified condition is
found, its record number and data are output.
Symbol
RSRCH4<, RSRCH4<=, RSRCH4=, RSRCH4>, RSRCH4>=
Area
Function block
definitions
Block program areas Step program areas Subroutines Interrupt tasks
SFC action or
transition programs
Usage OK OK OK OK OK OK
Operand Description Data type Size
C First control word WORD 8
S1 First word of first record to search WORD Variable
S2 First word of search data LWORD 4
D1 First destination word WORD Variable
D2 Destination index register DWORD 2
C
S1
S2
D1
D2
Symbol
C: First control word
S1: First word of first record to search
S2: First word of search data
D1: First destination word
D2: Destination index register
S1
0
15
S2
S2+1
S2+2
S2+3
0
15
S2: Search data lowest word
S2+1: Search data lower word
S2+2: Search data upper word
S2+3: Search data highest word
S2
S2+1
S2+2
S2+3
The data would be set as follows to search for #0123456789ABCDEF.
#CDEF
#89AB
#4567
#0123