635
3. Instructions
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Tracking Instructions
3
RSORT2
C: First control word
D1: First word of sorting results
D2: Destination index register
C
015
Number of records: 1 to 16384 decimal (maximum: 16,384)
C+1
015
Record length (in words): 2 to 1024 decimal (maximum: 1,024)
C+2
015
Sort data offset (in words): 0 to 1022 decimal
0
C+5
C+6
15
C+3
015
0: Ascending
1: Descending
0114
0: Disable split sort
1: Enable split sort
Always 0.
00000000000000
C+4
015
04314
Index register output designation
0: Do not output
1: Output
Always 0. Setting to end sorting
0 hex: Disabled
1 hex: Enabled for end data
2 hex: Enabled for end PLC memory address
00000000000
Searching with the Setting to End the Sort Disabled
C+5: Always 0.
C+6: Always 0.
Searching with End Data Enabled to End the Sort
C+5: Sort end data
(0000 0000 to FFFF FFFF hex)
C+6: Sort end data (0000 0000 to FFFF FFFF hex)
Searching with PLC Memory Address Enabled to End the Sort
C+5: Lower word of end PLC memory address
C+6: Upper word of end PLC memory address
15
System word area
Always clear C+7 to 0 before starting to sort records.
C+7 to C+86
0
0000000000000000
D1
015
Number of records that were sorted
This word contains the number of records that were sorted.
D2
0
One higher than the PLC memory address of the last word in
the range of records that was sorted. If index register output is
not specified in D+4, then 0000 0000 hex is stored in D2.
IR**