Hello All,
Needing some help with finding Min max values in an array that can have a dynamic element count. The Sort function in Logix 5K only allows an immediate value for length. I am looking for a way to sort an Array with varying Element Count. 100 being minimum to 1000 being max elements.
Element count is known before sorting and always will be a value divisible by 100. Between runs array is cleared of previous data.
Short of having 10 Element count checks and then selecting between 1 of 10 sorting instructions..... wondering if there is a much elegant way of doing this.
For Example: (Array is sized for 1000 elements. Note: there is more than 1 array is involved but during each run, each array will have same number of elements or samples per run.)
Run 1 = 1000 Elements in Array
Run 2 = 100 Elements in Array
Run 3 = 600 Elements in Array
etc., etc.
Thanks-
Needing some help with finding Min max values in an array that can have a dynamic element count. The Sort function in Logix 5K only allows an immediate value for length. I am looking for a way to sort an Array with varying Element Count. 100 being minimum to 1000 being max elements.
Element count is known before sorting and always will be a value divisible by 100. Between runs array is cleared of previous data.
Short of having 10 Element count checks and then selecting between 1 of 10 sorting instructions..... wondering if there is a much elegant way of doing this.
For Example: (Array is sized for 1000 elements. Note: there is more than 1 array is involved but during each run, each array will have same number of elements or samples per run.)
Run 1 = 1000 Elements in Array
Run 2 = 100 Elements in Array
Run 3 = 600 Elements in Array
etc., etc.
Thanks-