Omron CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 Reference Manual page 644

Programmable controllers
Hide thumbs Also See for CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

RSORT2
C: D300
0 0 0 8
Number of records = 8
C+1: D301
0 0 0 5
Record length = 5 words
C+2: D302
0 0 0 3
Sorting data offset = 3 words
C+3: D303
0 0 0 0
Split sort setting = Disabled, Ascending
C+4: D304
8 0 0 1
Index register output designation = Output, Setting to end sort = Enabled
C+5: D305
F F F F
End data = FFFF hex
C+6: D306
F F F F
End data = FFFF hex
C+7: D307
System
work
to
area
C+86: D386
RSRCH2
C: D0
0 0 0 8
C+1: D1
0 0 0 5
0 0 0 3
C+2: D2
C+3: D3
0 0 1 2
C+4: D4
0 4 0 6
C+5: D5
0 0 0 1
Step 1: The records are sorted in ascending order according to the delivery code using the RSORT2 instruction.
0.0
Step 2: The corresponding record is searched for using the RSRCH2= instruction with a split search.
0.0
P EQ
P CY
W0.0
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Number of records = 8
Record length = 5 words
Search data offset = 3 words
Index register output designation: Output
Search method = Split search/ascending, Setting to end search = Enabled for PLC memory address
PLC memory address of search end, lower word
PLC memory address of search end, upper word
RSORT2
D1000
MOVL
RSRCH2=
D1000
A2000038
#00000000
W0.0
W0.1
Processing
for matching
record
First control word: D300
D300
First word of first record: D1000
First source results output word: D200
D200
Designation IR: IR1
IR1
End PLC memory address: IR1 (output by RSORT2).
IR1
D4
D0
First control word: D0
First word of first record: D1000
Search data: A200 0038 hex
First destination word: D100
D100
Designation IR: Not output (0000 0000 hex)
Matching record found.
Matching record not found.
3. Instructions
3
607

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CJ - INSTRUCTIONS REFERENCE MANUAL 07-2009 and is the answer not in the manual?

Questions and answers

Table of Contents