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

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

Advertisement

3. Instructions
Operand Specifications
Word addresses
Area
CIO
WR
HR
AR
C
S
OK
OK
OK
OK
D1
D2
---
---
---
---
Flags
Name
Error Flag
Carry Flag
Function
The number of records specified by C starting from the record specified by S are sorted according to
the data in the specified location (2 words). When the sort operation has been completed, the Carry
Flag will turn OFF and the number of records that were sorted will be output to D1. If outputting to an
index register is specified in C+4, one address higher than the PLC memory address of the last word in
the sorted records is output to the specified index register. The sort direction is specified as ascending
or descending in C+3.
If split sorting is enabled in C+3, the sort will be executed over multiple cycles. The Carry Flag will be
ON while the sort operation is being executed and will turn OFF when the sort operation has been
completed. If the execution condition of RSORT2 turns OFF before the sort operation has been
finished, the sort will be continued the next time the execution condition turns ON.
Precautions
Always clear C+7 to 0 before starting to sort.
628
Indirect DM/EM
@DM
T
C
DM
EM
@EM
OK
OK
OK
OK
OK
---
---
---
---
---
Label
ER
• ON when the record length in C+1 is not between 2 and 1,024, inclusive.
• ON when the number of records specified in C times the record length in C+1 is greater than
32,768.
• ON when the number of records specified in C times the record length in C+1 is 0.
• ON when the sort data offset in C+2 is greater than two less than the record length in C+1.
• OFF in all other cases.
CY
• ON while the records are being sorted.
• OFF when the sort operation has been completed.
addresses
Con-
stants
*DM
DR
*EM
---
OK
---
OK
---
OK
---
Operation
CS/CJ/NSJ Series Instructions Reference Manual (W474)
Registers
Flags
Pulse
bits
Indirect
IR
TK
CF
using IR
---
OK
---
---
OK
---
TR
bits
---
---

Advertisement

Table of Contents
loading

Table of Contents