Sign in to follow this  
Followers 0
ammar

Selection Sort Method

1 post in this topic

I'm a novice to S7-200 (CPU 224) and really need help to solve the problem that I'm having at the moment, I have two groups of data to be sorted out as below: 1) The first group of data is for the required length size of sheet metal to be cut (example length value: 23165mm) and going to be stored into a memory location VW204 - VW282 (40 locations). 2) The second group of data is for the required quantity to be produced for each required length (example quantity: 12pcs) and the data going to be stored into a memory location VW404 - VW482 (40 locations). 3) I'm using Add To Table instruction for the data entry via a HMI (Manufacturer: HITECH, Model:PWS1711),where VW100 for length data entry (write to VW200 table)and VW300 for quantity data entry (write to VW400 table). 4) The length data is entered randomly in various length sizes and in pair with the quantity data. Problem: The length size need to be sort out in descending order and the quantity data need to follows the sorted length to whatever location the length data had been moved after the sorting process(example: If VW204 moved to VW210 then VW404 need to be moved to VW410 and so on). I had surfed trough some websites (see below) showing some example programming of data SELECTION SORT method and this might can help for someone whom are also expert in some other programming language to interpret the programm into Simatic ladder. Really appriciate from this forum community for helping me to solve the problem. it might be as simple as 4 or 5 rungs of programming but I'm still learning. Thank you. http://www.vb-helper.com/tut1.htm#Quicksort http://www.ee.unb.ca/brp/lib/java/selectionsort/

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0