Sorting multiple boxes on the conveyor - Advices?

Hubert12

Member
Join Date
Apr 2014
Location
Denmark
Posts
27
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.

LdPrQxg.png


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
 
That sounds very reasonable. Note that the cases to be rejected do not have to be entered into the array and OS3 is not actually needed.

Edit- this is assuming that the rejected cases are just passing off the end of the line and don't need anything active to remove them.
 
Last edited:
The box B is pushed to the first line, box A to the second, Rejected boxes are passing by the OS3.
It could be a cultural difference between first and second, but in your picture, for me, Box A should be pushed to the first line (downstream from the measurement point), and Box B should be pushed to the second line.
 
The description of the box push and the illustration do differ, but as long as the end result is correct (and the program is understandable and easily modifiable by future users) itreally doesn't matter.
 
I do not know how to program in SCL, but, the BSL (bit shift left) instruction in RSLogix works well for this. Can you use ladder logic and do you need examples shown in ladder logic to program this? Perhaps someone with SCL programming will offer a better solution.

Edit:
If you must program in SCL, TIA13, here is a link to a forums on the Siemens site. Maybe there is already a solution posted there.
http://www.automation.siemens.com/WW/forum/guests/Conference.aspx?ForumID=265

Yes, BS(L/R) is definitely what I am going to use. I do not need to program the solution in SCL, it is a part of semester project for my university, so I am free to choose the method. If you have ladder examples in RSlogix, TIA or Unity Pro XL that would be more than helpful to see them.

I have already searched on Siemens forums, unfortunately with no success.

It could be a cultural difference between first and second, but in your picture, for me, Box A should be pushed to the first line (downstream from the measurement point), and Box B should be pushed to the second line.
Totally correct, it should be exactly as you wrote.

That sounds very reasonable. Note that the cases to be rejected do not have to be entered into the array and OS3 is not actually needed.

Edit- this is assuming that the rejected cases are just passing off the end of the line and don't need anything active to remove them.

Thank you for the notice, but OS3 triggers further actions for rejected box.
 
I'm not clear on how you intend to measure the boxes. One sensor (OS1) on for "A" number of encoder pulses could represent box "A". Using the same sensor on for "B" number of encoder pulses could represent box "B". Is this how you plan to measure the boxes or something else?


Edit:
On a similar system, I used a separate staging belt to check an individual box, then moved it out of the measuring zone. I used a sensor located at OS2 to signal that and to begin the encoder pulse distance to the reject "A" or reject "B" station. I also used a separate BSL for measuring to each reject station. I'm sure there are better ways.
 
Last edited:
I have created the program, it uses array Boxes[0 .. 5, 0 .. 5] which is a temporary tag of the block. Can I somehow make this array as a normal memory tag ,so I can monitor the values inside?

@edit
I use TIA13
 
Yes, BS(L/R) is definitely what I am going to use.
If you use a Bit-Shift register with an encoder, you will need to find out or "create" some details about the encoder range and scale. In other words, when the conveyor moves 1 unit, how much does the encoder value change? Decide on your length units (milimeters or centimeters possibly), then find out the encoder change for that distance. Then find out t he length units from the Measurement Point to: (1) the Box A Pusher; (2) the Box B Pusher; (3) the OS3 sensor only if you need to know whether it is a Box A or B that is rejected.
 
Why do you think that your memory "boxes" should only extend from 0 to 5? How many positions you will need depends on your encoder, your conveyor length, and the physical distances from the Measurement Pint to each diverter point. (I think it will require a LOT more than 5 memory storage locations).

Do it something like the attached example. Change Rung 002 to match your OS1 and OS2 detection sensors. If OS1 detects "A" Boxes and OS2 detects "B" Boxes, then on Rung 002, replace the existing logic and use OS1 to trigger bit B3:0/0 and OS2 to trigger B3:0/1.

I AssUMed that you can use 1440 memory storage value in each of the 2 BSLs. This value may or may not work for your situation, but the method should work.
 
Last edited:
first i not familiar with TIA.

for real application it will invite few problem,since this only semester project it can consider to apply,

as part for understand the PLC application.

OP also need to realize what type of measurement whether length,width,height.

as mention by Lancie1 OP need measure starting point to end point, Pusher-1 and Pusher-2

and mention by BC OS3 not needed,

maybe consider as miscellaneous process/product.

another question what the function the rotary encoder ? - speed/position.

how to reset the encoder value during process ?



http://www.bannerengineering.com/en-US/products/application/17/72/1686

http://www.omega.com/Auto/pdf/ZMD.pdf
 
For these student problems, usually the part detection is made more simple than in real life. In other words, we need to think "outside the box". In a popular student lab industrial simulator, the Part A and Part B detection is done like in the attached picture - simply Short and Tall parts.

another question: what the function the rotary encoder ? - speed/position.
Ossmanmom, if he uses a BSL (Bit-Shift Left), then the only function needed from the encoder is a On/Off pulse for every time that the conveyor moves 1 unit of distance. That distance unit could be 1 milimeter, 1 centimeter, 1 inch, 2 milimeters, 2 centimeters, or something similar. The encoder can simply repeat when it reaches its end, as long as it keeps producing pulses while the conveyor is moving.

The idea of the BSL is to insert a "1" into the A-Box memory area beginning when an A Box is detected, and to insert a "1" into the B-Box memory area beginning storage word when a B Box is detected. Those "1"s move from lower to higher memory locations as the box moves down the conveyor. If set up properly, the moving, shifting "1" bit in PLC memory (controlled by pulses from the encoder) will reach the memory Pusher Point at the same time as the physical box reaches the conveyor Pusher Point.

Sorting Multiple Parts- Box Detection.jpg
 
Last edited:

Similar Topics

I've got a task to be completed within 1 month. The task is to assign categories to different diameter, length, and defect logs; track them along...
Replies
3
Views
1,383
I have worked on small projects using AB Micrologix but now we want to take a photo, process it online, and sort based on returned variables...
Replies
5
Views
315
Hi, I have just started with WinCC unified (v17) and there are alot of things I used on Comfort but now are not available. Currently I am finding...
Replies
3
Views
2,832
I'm trying to be smart about naming my tags so things automatically group together alphabetically, but for some reason it doesn't work like I...
Replies
15
Views
3,636
Hello friends. There is an int type, number that I got from the DataBlock. For example, the DataBlock address is Db1.dbw0. Here's what I want to...
Replies
32
Views
10,438
Back
Top Bottom