932
7 APPLICATION INSTRUCTIONS
7.20 Data Processing Instructions
Sorting 32-bit binary data
DSORTD(_U)
These instructions sort (n) points of 32-bit binary data in ascending or descending order.
■Execution condition
■Description, range, data type
*1 When specifying setting data by using a label, define an array to secure enough operation area and specify an element of the array
label.
■Applicable devices
*1 T, C, and ST cannot be used.
Ladder ST
ENO:=DSORTD(EN,s1,n,s2,d1,d2); ENO:=DSORTD_U(EN,s1,n,s2,d1,d2
);
FBD/LD
Instruction Execution condition
DSORTD
DSORTD_U
Operand Description Range Data type Data type (label)
(s1) DSORTD Start device of the table data to be sorted 32-bit signed binary ANY32_S
*1
DSORTD_U 32-bit unsigned binary ANY32_U
*1
(n) Number of sort data 0 to 65535 16-bit unsigned binary ANY16
(s2) Number of data to be compared once 0 to 65535 16-bit unsigned binary ANY16
(d1) Number of the bit device to be turned on upon
completion of sort
Bit ANY_BOOL
(d2) Device used by the system 16-bit signed binary ANY16_ARRAY
(Number of elements: 2)
EN Execution condition Bit BOOL
ENO Execution result Bit BOOL
Operand Bit Word Double word Indirect
specification
Constant Others
X, Y, M, L,
SM, F, B, SB,
FX, FY
J\ T, ST, C, D, W,
SD, SW, FD, R,
ZR, RD
U\G, J\,
U3E\(H)G
Z LT, LST,
LC
LZ K, H E $
(s1)
(n)
(s2)
(d1)
*1
(d2)
RnCPU
RnENCPU
RnSFCPU RnSFCPURnPCPURnPCPU
(Standard) (Safety)
(Redundant)
(Process)