
562
7 APPLICATION INSTRUCTION
7.17 Data operation instruction
16-bit data alignment 2
SROTTBL2(_U)
These instructions sort data lines in the data table (sorting source) of 16-bit binary data having (m1
m2) points specified by (s)
in the ascending order or descending order based on the group data in the column number (n), and store the result in the data
table (sorting result) of 16-bit binary data having ((m1)
(m2)) points specified by (d).
Setting data
■
Descriptions, ranges, and data types
■
Applicable devices
Processing details
• These instructions sort data lines in the data table (sorting source) of 16-bit binary data having (m1
m2) points specified by
(s) in the ascending order or descending order based on the group data in the column number (n), and store the result in
the data table (sorting result) of 16-bit binary data having ((m1)
(m2)) points specified by (d).
• The data table configuration is explained in an example in which the sorting source data table has 3 lines and 4 columns
(m1 = K3, m2 = K4). For the sorting result data table, understand (s) as (d).
• Set the sorting order by setting SM703 to on or off.
Ladder diagram
Structured text
ENO:=SROTTBL2(EN,s,m1,m2,n,d);
ENO:=SROTTBL2_U(EN,s,m1,m2,n,d);
Operand
Description
Range
Data type
Data type (label)
(s)
SROTTBL2
Head device number storing the data table
16-bit signed binary
ANY16
SROTTBL2_U
16-bit unsigned binary
(m1)
Number of data (lines)
1 to 32
16-bit unsigned binary
ANY16
(m2)
Number of group data (columns)
1 to 6
16-bit unsigned binary
ANY16
(d)
SROTTBL2
Head device number for storing the operation result
16-bit signed binary
ANY16
SROTTBL2_U
16-bit unsigned binary
(n)
Column number of group data (column) used as the basis of
sorting
16-bit unsigned binary
ANY16
Operand
Bit
Word
Double word
Indirect
specification
Constant
Others
X, Y, M, L,
SM, F, B, SB
U
\G
T, ST,
C, LC
T, ST, C, D,
W, SD, SW, R
U
\G
Z
LC
LZ
K, H
E
$
(s)
(m1)
(m2)
(d)
(n)
Number of groups (m2 = K4)
Column No. 1
Column No. 2
Column No. 3
Column No. 4
Control number
Height
Weight
Age
Number of data (m1) = 3
Line No. 1
(s)
(s)+1
(s)+2
(s)+3
Line No. 2
(s)+4
(s)+5
(s)+6
(s)+7
Line No. 3
(s)+8
(s)+9
(s)+10
(s)+11
Sorting order
SM703 = ON
Descending order
SM703 = OFF
Ascending order
(s)
(m1) (m2)
(d)
(n)
Summary of Contents for MELSEC iQ-F FX5 series
Page 1: ...MELSEC iQ F FX5 Series Programming Manual Instructions Standard Functions Function Blocks ...
Page 2: ......
Page 21: ...19 PART 1 PART 1 OVERVIEW Part 1 consists of the following chapter 1 OVERVIEW ...
Page 98: ...96 4 STANDARD FUNCTIONS FUNCTION BLOCKS 4 2 Standard Function Blocks MEMO ...
Page 840: ...838 23 TIME DATA FUNCTIONS 23 4 Division MEMO ...
Page 887: ......