Based on that, and assuming that only two boxes are on the conveyor at a time, here is one way to do it. If there are more than two, then you will have to use some type of accumulation method (Bit-shifter, FIFO, Counters, or something similar)Sorry, guys. T
There is a small gap when the boxes are touching. So when two small boxes pass, there will a time when x0 goes on then off then x0 and x1 off and the x0 off and x1 on thats one short box after passing two sensors.
MartB said:Now that everyone has completed the OP's homework for him, how about Liam 28 posts his results and gives us a brief explanation of what he did or didn't understand before we contribute any more?
Liam 28 said:Thanks guys for all the solutions its given me more options to think about .It is a assigment for college.And the limitation given were cant put gap space between boxes but when the boxes are touching there is a lip on each box thats where there touching and below lip that is where the space between the boxes is.We cant use timers or slow conveyor down or shift regesters. We are just allowed use the sensors or input x0 first sensor and x1 secound sensor to tell difference between boxes . The boxes are same height same width but different lengths. Two short boxes touching but with small gap because of lip on boxes is longer than 1 long box.At any one time before a box reaches the first sensor there can 3 boxes on conveyor. The problem i have is if there are first box short secound box short and third box long the plc thiks two long boxes have passed through sensors where in fact 2 short and 1 long has passed all boxes are touching but with small gap because of lip on boxes. xo and x1 on long box x0 off x1 off short box. when two short boxes pass through when first box is activating x1 the secound box is activating xo which looks like a long box. Soory about bad explation hard to put in words what process is.
Lancie problem with part c of your solution is when box 1 at x1 second box is entering x0 so xo and x1 one plc thiks its long box.
There 15 guys in class and were all are stuck were pretty thick.
Hope this explation makes a bit more sense.
Try a different aproach. Try detecting the small box. If both sensors are off at the same time then this must be a short box so when that box gets to the kicker you ignore it. The long box will be one sensor off one senosr on. and that is the one you kick.Liam 28 said:Thanks guys for all the solutions its given me more options to think about .It is a assigment for college.And the limitation given were cant put gap space between boxes but when the boxes are touching there is a lip on each box thats where there touching and below lip that is where the space between the boxes is.We cant use timers or slow conveyor down or shift regesters. We are just allowed use the sensors or input x0 first sensor and x1 secound sensor to tell difference between boxes . The boxes are same height same width but different lengths. Two short boxes touching but with small gap because of lip on boxes is longer than 1 long box.At any one time before a box reaches the first sensor there can 3 boxes on conveyor. The problem i have is if there are first box short secound box short and third box long the plc thiks two long boxes have passed through sensors where in fact 2 short and 1 long has passed all boxes are touching but with small gap because of lip on boxes. xo and x1 on long box x0 off x1 off short box. when two short boxes pass through when first box is activating x1 the secound box is activating xo which looks like a long box. Soory about bad explation hard to put in words what process is.
Lancie problem with part c of your solution is when box 1 at x1 second box is entering x0 so xo and x1 one plc thiks its long box.
There 15 guys in class and were all are stuck were pretty thick.
Hope this explation makes a bit more sense.
Liam 28 said:We cant use timers or slow conveyor down or shift regesters. We are just allowed use the sensors or input x0 first sensor and x1 secound sensor to tell difference between boxes .
Clay B. said:Try a different aproach. Try detecting the small box. If both sensors are off at the same time then this must be a short box so when that box gets to the kicker you ignore it. The long box will be one sensor off one senosr on. and that is the one you kick.
FYI... In the real world we would use a timer to give some "fudge factor" to our sensor setup.
Yes "fudge factor" is a trade term. And very improtant in design.
dahnuguy said:2 off bits indicate something is not.
Could be a box condition could be a loose wire could be a blown fuse maybe all the boxes were short today. Maybe not.........
Whats that stack of long boxes doing over there in the floor ?
I prefer to see a something to indicate a positive presence and get a change from condition to condition.
Of course it's a class room, so................doesn't have to "really" work, just "kinda" work for a couple minutes.
Liam 28 said:Thanks guys for all the solutions its given me more options to think about .It is a assigment for college.And the limitation given were cant put gap space between boxes but when the boxes are touching there is a lip on each box thats where there touching and below lip that is where the space between the boxes is.We cant use timers or slow conveyor down or shift regesters. We are just allowed use the sensors or input x0 first sensor and x1 secound sensor to tell difference between boxes . The boxes are same height same width but different lengths. Two short boxes touching but with small gap because of lip on boxes is longer than 1 long box.At any one time before a box reaches the first sensor there can 3 boxes on conveyor. The problem i have is if there are first box short secound box short and third box long the plc thiks two long boxes have passed through sensors where in fact 2 short and 1 long has passed all boxes are touching but with small gap because of lip on boxes. xo and x1 on long box x0 off x1 off short box. when two short boxes pass through when first box is activating x1 the secound box is activating xo which looks like a long box. Soory about bad explation hard to put in words what process is.
Lancie problem with part c of your solution is when box 1 at x1 second box is entering x0 so xo and x1 one plc thiks its long box.
There 15 guys in class and were all are stuck were pretty thick.
Hope this explation makes a bit more sense.
Clay B. said:I agree looking for 2 off states is asking for it. In the "real" world you would design so you only had to look at one box at a time. If you want to get anal you could use an edge detection function and trigger on the down swing. That way you would first have to see the sensors come "on" then go "off".