Ny-Series Instructions Reference Manual (W560 - Omron NY532-5400 Reference Manual

Ny-series
Hide thumbs Also See for NY532-5400:
Table of Contents

Advertisement

Function
When the value of Execute is TRUE, Size elements of InOut[] (a structure array) is sorted. Specifically,
the elements from InOut[0] to InOut[Size
InOut[Size
1] are sorted. Order specifies the sort order. Details are provided below. One of the mem-
bers to sort in the elements of In[] is passed as an argument to Member.
Always attach the element number to the in-out parameter that is passed to InOut[], e.g., array[3].
The data type of sort order Order is enumerated type _eSORT_ORDER. The meaning of the enumera-
tors are as follows:
Enumerator
_ASC
Ascending
_DESC
Descending
The relationship between values with data types that are not integers or real numbers are determined
as given in the following table.
Data type
TIME
DATE, TOD, or DT
STRING
The following example is for when Size is UINT#5, Member is 3456 and Order is _Asc.
LD
RecSort_instance
A
Execute Done
InOut
abc[0]
UINT#5
Size
Member Error
abc[0].m
_ASC
Order
Order=_ASC
InOut[0]=abc[0]
InOut[1]=abc[1]
InOut[2]=abc[2]
Size=UINT#5
InOut[3]=abc[3]
InOut[4]=abc[4]

NY-series Instructions Reference Manual (W560)

Meaning
The numerically larger value is considered to be larger.
Later dates or times of day are considered to be larger.
The specifications are the same as for the LTascii, LEascii, GTascii, and
GEascii instructions (page 2-104). Refer to the specified page for details.
def
RecSort
abc[0]
ghi
Busy
jkl
0000
Member m
3456
0000
0000
2345
0000
0000
1234
0000
0000
3456
0000
0000
1234
0000
1] are sorted. Specifically, the elements from InOut[0] to
Relationship
ST
RecSort_instance(A, abc[0], UINT#5, abc[0].m, _ASC, def, ghi, jkl);
Member = abc[0].m
InOut[0]=abc[0]
InOut[1]=abc[1]
InOut[2]=abc[2]
Sorted.
InOut[3]=abc[3]
InOut[4]=abc[4]
2 Instruction Descriptions
0000
1234
0000
0000
1234
0000
0000
2345
0000
0000
3456
0000
0000
3456
0000
2
2-519

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents