3. Instructions
638
CS/CJ/NSJ Series Instructions Reference Manual (W474)
C: First control word
D1: First word of sorting results
D2: Destination index register
C
015
Number of records: 1 to 8192 decimal (maximum: 8,192)
C+1
015
Record length (in words): 4 to 1024 decimal (maximum: 1,024)
C+2
015
Sort data offset (in words): 0 to 1020 decimal
0
C+5
C+6
C+7
C+8
15
C+3
015
0: Ascending
1: Descending
0114
0: Disable split sort
1: Enable split sort
Always 0.
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
Setting to End Sorting Disabled
C+5: Always 0.
C+6: Always 0.
End Data Enabled
C+5 to C+8: Sort end data
(0000 0000 0000 0000 to FFFF FFFF FFFF FFFF hex)
Store the end data in the following order starting from C+5: Lowest 16 bits, lower 16 bits, higher
16 bits, highest 16 bits.
End PLC Memory Address Enabled
C+5: Lower word of end PLC memory address
C+6: Upper word of end PLC memory address
C+7: Always 0.
C+8: Always 0.
00000000000000
00000000000
15
System word area
Always clear C+7 to 0 before starting to sort records.
C+9 to C+88
0
0000000000000000
D1
0
15
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 were sorted. If index register
output is not specified in C+4, then 0000 0000 hex is
stored in D2.
IR**