Mitsubishi MELSEC Q Series Programming Manual page 471

Common instruction 1/2
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

(2) Several scans are required for sorts performed by the DSORT 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
is increased, the number of scans until completion of the sort is reduced, but the amount of
time per scan is lengthened.
(3) The maximum number of executions until completion of the sort should be calculated
according to the following equation:
The maximum number of executions until completion
Example
When n 10, the number of executions is obtained as 10
If S2 2, then the number of scans until the completion of sort is calculated as
45/2 22.5 23 [scans].
(4) The device designated by
SORT instruction, and turned ON when the sort is completed. Because the device desig-
nated by
D1
it OFF if required.
(5) The 2 points from the device designated by
of a DSORT instruction. These 2 points from the device designated by
not be used by the user.
Changing these points may cause an error code to be returned
(6) If the value of n is changed during the execution of the SORT instruction, the sort will be
conducted in accordance with the number of sort data blocks after the change.
(7) If the execution command is turned OFF during the execution of the SORT instruction, the
sort is suspended. The sort resumes from the beginning when the execution command is
turned ON again.
(8) To execute another sort operation immediately after the completion of the previous sort, turn
OFF the execution command once, then turn it ON.
Operation Error
(1) In any of the following cases, an operation error occurs, the error flag (SM0) turns ON, and
an error code is stored into SD0.
• For the SORT(P) instruction, the range for n points starting from the device at
the corresponding device range.
• For the DSORT(P) instruction, the range for 2
exceeds the corresponding device range.
• The device range of the (n/2
overlaps with the device range of the 2 points starting from the device designated by
is 0 or is a negative value.
S2
. (Decimal fractions are rounded up.)When the value of
S2
(the completion device) is turned OFF by the execution of the
D1
is maintained in the ON state after the completion of the sort, the user must turn
n) points starting from the device designated by
(n)
(n 1)/2 [times executed]
(10 1)/2 45 [times executed].
are used by the system during the execution
D2
(Error code: 4100).
n points starting from the device at
SORT,DSORT
S2
should therefore
D2
exceeds
S1
(Error code: 4101)
S1
(Error code: 4101)
S1
.
D2
(Error code: 4101)
(Error code: 4100)
7-97
1
2
3
4
6
6
7
8

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents