Bin 16-Bit Data Sort Operations, Bin 32-Bit Data Sort Operations - Mitsubishi Electric MELSEC-Q/L Programming Manual

Hide thumbs Also See for MELSEC-Q/L:
Table of Contents

Advertisement

BIN 16-bit data sort operations, BIN 32-bit data sort operations

SORT, DSORT
High
Basic
Process
performance
SORT, DSORT
(S1): Head device number in the table to be sorted (BIN 16/32 bits)
n:
Number of data blocks to be sorted (BIN 16 bits)
(S2): Number of data blocks to be compared in one sort operation (BIN 16 bits)
(D1): Number of the bit device to be turned ON at the completion of the sort operation (bits)
(D2): Device reserved for the system (BIN 16 bits)
Setting
Internal device
data
Bit
(S1)
n
(S2)
(D1)
(D2)
Processing details
■SORT
• Sorts (rearranges data) BIN 16-bit data n points from (S1) in ascending or descending order. Sort order is designated by the
ON/OFF status of SM703:
• When SM703 is OFF: Ascending order sort
• When SM703 is ON: Descending order sort
Data before sort
S
35
S
+1
-10
S
+2
500
-124
S
+3
• Several scans are required for sorts performed by the SORT instruction. The number of scans executed until completion is
the value obtained by dividing the maximum number of times executed until the completion of the sort by the number of
data blocks compared at one execution designated by (S2). (Decimal fractions are rounded up.) When the value of (S2) is
increased, the number of scans until completion of the sort is reduced, but the amount of time per scan is lengthened.
7 APPLICATION INSTRUCTIONS
444
7.5 Data Processing Instructions
Redundant Universal
LCPU
R, ZR
Word
 (Other than T, ST, C)
S
+1
S
When SM703 = OFF
S
+2
S
+3
S
S
+1
S
+2
When SM703 = ON
S
+3
indicates an instruction symbol of SORT/DSORT.
Command
S 1
J\
Bit
Word
-124
-10
Sort in the ascending order
35
500
500
35
Sort in the descending order
-10
-124
n
S2
D1
U\G
Zn
Constant
K, H
D2
Others

Advertisement

Table of Contents
loading

Table of Contents