beautypg.com

Delta DVP-ES2 User Manual

Page 297

background image

3 . I n s t r u c t i o n S e t

3 - 1 8 1

API Mnemonic

Operands

Function

69

D SORT

Data sort

Controllers

ES2/EX2 SS2 SA2

SE

SX2

Bit Devices

Word devices

Program Steps

Type

OP

X Y

M S K H KnX KnY KnM KnS T C D E F

S

*

m

1

* *

m

2

* *

D

*

n

*

*

*

SORT: 11 steps

DSORT: 21 steps

PULSE 16-bit 32-bit

ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2 ES2/EX2 SS2

SA2

SE

SX2

Operands:

S: Start device for the source data m

1

: Groups of data to be sorted (m

1

=1~32) m

2

: Number of

columns in the table (m

2

=1~6) D: Start device for the sorted data n: The No. of column to be

sorted. (n=1~ m2)

Explanations:

154. The sorted data is stored in the m

1

× m

2

registers starting from the device designated in D.

Therefore, if S and D designate the same register, the sorted results will be the same.

155. SORT instruction is completed after m

1

times of scan. Once the SORT instruction is completed,

the Flag M1029 (Execution completed flag) = ON.

156. There is no limitation on the times of using this instruction in the program. However, only one

instruction can be executed at a time

Program Example:

When X0 = ON, the sorting process starts. When the sorting is completed, M1029 will be ON. DO

NOT change the data to be sorted during the execution of the instruction. If the sorting needs to be

executed again, turn X0 from OFF to ON again.

X0

SORT

D0

K5

K5

D50

D100

This manual is related to the following products: