Search the Community

Showing results for tags 'sort'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Found 3 results

  1. Hello all, I am attempting to sort a selection list via 'part-selection' buttons. Ex. a certain type of model is selected, I only want to have the members of the array which match that model to be selectable. I can move the members into a 'display' array just fine based on comparison, but I'm fuzzy on how to put those 'non-zero' array members into a selectable array in Sysmac HMI code   See For loop attached   Thanks!
  2. Hey Guys, Modicon M221 PLC, programming with Machine Expert. I have a project that I must create shifts for heating elements, requiring that some heating elements, those who were on for the longest period, do not turn on in the next shift. I'm looking for a sorting mechanism to determine what %MW (6 words of 8 total) have the largest value. I would like an array of 8 words, sort them, and retrieve the highest 6 or highest 4 or highest 2.   Thanks.  
  3. Hi guys, I'm using a Schneider Electric M340 PLC, I have a multi-dimensional array: Array[1..10,1..10] of real. To give a little background. Each of those 10 arrays contains 6 parameters for a controller. They're run through a test and the score is recorded in the 7th element. Now my problem is I need to sort those 10 arrays based on that 7th element. More specifically I need to pluck the best two performing ones and write them to a new array set.. I've tried writing my own sorting algorithm although I only manage to take the first, best performing one as opposed to the top two. This of course is programmed in ST. Any advice would be appreciated, Kind regards, Max