Hello,
I am trying to develop sorting algorithm for a conveyor belt with pushers where incoming boxes are measured by reflective diffusive optical sensors OS1 and OS2, then assigned to category A, B or Rejected.
The box B is pushed to the first line, box A to the second, Rejected boxes are passing by the OS3.
Illustrated on the picture below.
There can be up to 3 boxes on the main conveyor at the same time, so the sorting gets a little tricky.
My idea is to create a 4x2 array with Desired distance for each registered box (according to the type A,B,Rejected) and Current distance which will be incremented by encoder. On each scan I will check if Desired distance =< Current distance of each element, if yes then I will give signal to the pusher, then remove element from the array and shift it to the left ,so there will be a place for the new element.
Is it a good and optimal way of sorting? I hope you can understand my idea and give some good tips.
I am doing the programming in SCL, TIA13
BR,
Hubert
I am trying to develop sorting algorithm for a conveyor belt with pushers where incoming boxes are measured by reflective diffusive optical sensors OS1 and OS2, then assigned to category A, B or Rejected.
The box B is pushed to the first line, box A to the second, Rejected boxes are passing by the OS3.
Illustrated on the picture below.
There can be up to 3 boxes on the main conveyor at the same time, so the sorting gets a little tricky.
My idea is to create a 4x2 array with Desired distance for each registered box (according to the type A,B,Rejected) and Current distance which will be incremented by encoder. On each scan I will check if Desired distance =< Current distance of each element, if yes then I will give signal to the pusher, then remove element from the array and shift it to the left ,so there will be a place for the new element.
Is it a good and optimal way of sorting? I hope you can understand my idea and give some good tips.
I am doing the programming in SCL, TIA13
BR,
Hubert