2 Instruction Descriptions
2-492
NJ-series Instructions Reference Manual (W502)
RecSort
The RecSort instruction sorts the elements of an array of structures.
* If you omit the input parameter, the default value is not applied. A building error will occur.
Instruction Name FB/FUN Graphic expression ST expression
RecSort Record Sort FB RecSort_instance(Execute,
InOut, Size, Member, Order,
Done, Busy, Error);
Variables
Name Meaning I/O Description Valid range Unit Default
Size Number of
elements to
sort
Input
Number of array elements to
sort
Depends on data type.
---
1
Member Member to
sort
Member of In[] structure to
sort
*
Order Sort order Sort order _ASC,
_DESC
_ASC
InOut[]
(array)
Sort array In-out Array of structures to sort
--- --- ---
Boolean
Bit strings Integers
Real
numbers
Times, durations,
dates, and text strings
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
Size OK
Member
OK OK OK OK OK OK OK OK OK OK
Specify the same data type as the sort member of InOut[]
Order Refer to Function for the enumerators of the enumerated type _eSORT_ORDER.
InOut[]
(array)
Specify an array of structures.
RecSort
RecSort_instance
Execute Done
InOut
Size Busy
Member Error
Order