Ladder logic Problem

It smells to me like there is a gap between the boxes always, as part of the assignment, but the no timer rule leads me to believe they are looking for the truth table response.

Otherwise, the photoeye timer and time A to B = length of box.

If conveyor speed is not constant, then encoder feedback can be used to adjust in real time and the timer or some similar counter arrangement would work.

If you had the problem in the real world, a guarenteed space would be induced and required in step one.

If no gap and all boxes are the same height and width, then it is one long box to the system.

Some gap is required or some other means of selecting the box edge. Vision maybe.

More difficult without the timer, but without edge detection, I have to say improbable.

You could just ask the operator to aply a bar code to the side of each box or a reflective sticker at one edge. At the exact same location every time.

Either way it is way easier than using assembly and proms or discrete components.
 
gap is indeed needed i think, had a similar problem, by alining the sensors in the right way (distance), and taking there where only 2 sizes of boxes, this is easily solved with bit logic, i recall to use a divider for every 2 pulses you get one,1up 1 down, hence a box, while counting some pulsbits compared to a set value depending on the lenght of the pulstrain of the longest box or shortest box... your choise
 
Last edited:
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.
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)
Box_Kicker.jpg
 
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?
 
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
icon10.gif
.

Hope this explation makes a bit more sense.
 
Your tutor definitely needs to get out more!

Thinking laterally (or maybe vertically) you would stand the boxes on their ends and do the job with one sensor that tells the kicker when a tall box passes. But hey, why would you want to make life easy!

Bryan
 
FUn is where you find it.

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?


This stopped being about Liam a long time ago.

This forum is like a shark infested pool waiting for a juicey problem to drop in.

The only reason I answered at all was get away from the issues I am having with a "real" project. LOL

If we could see the setup it would eliminate the endless string of questions and half answers.

But that seems to be half the fun here.

Every question is answered with a list of questions and then eventually someone puts it together and the solution becomes obvious to one or more.

And then the original poster learns something and does it a different way all together.

Not knockin it, it's a good system. I like it. Just observing.

I am sure he will get something to work or his teacher/ tormentor will explain it. It's not like a production facility or some one's job is on the line.

Plus forums give me practice typing
 
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
icon10.gif
.

Hope this explation makes a bit more sense.



We were talking about "edge detection" not necessarily "a gap"

All of the solutions here would work regardless of what method you use for edge detection. Any way you do it, you need to "see" each box.
 
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
icon10.gif
.

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.
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.
 
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 .

I see nothing here from preventing you from "rolling your own" "bit shifting array" driven by logic scan and edge triggers. And Lancie's solution.
 
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.


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.
 
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.

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".
 
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
icon10.gif
.

Hope this explation makes a bit more sense.

How far away is the kicker from the first two sensors. If the kicker sensor is 1 large box (or slightly less) away from the middle sensor, then it is just a simple latching circuit after you decide if the box is long or short. I'm guessing this is the case, unless the point is to have you make a bit shift register, without using a bit shift register. As others have said, you only want to decide if the box is large or small, on the sensor transition.

Also, the other thing to think about, is where you place the kicker sensor on the conveyor... You will need this, to tell your kicker cyclinder to retract.

-Mur
 
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".


yep

I like to be as "anal" as I can be with the hardware that is available.

I try to stop my stuff from working. When I do a start up I do everything wrong, push the boxes around, change gap size , eliminate gap, put some on side ways, stop and start the conveyor in the middle of a box, etc. If it works after I get done, then I am reasonabley sure it will survive the end user.
 

Similar Topics

please help i didn't solve this problem with rslogix. I counted but i am not using timer. How i will fix this situation? Please anyone solve this...
Replies
18
Views
4,957
It would be awesome if someone could help me out with this problem. We can only use basic XIC XIO OTE OTL and OTU instructions. I'm not sure on...
Replies
33
Views
9,138
I'm using MotionWorks IEC Pro to write a Function Block program. There is also an HMI that needs to interact with this bit of programming. This is...
Replies
3
Views
4,564
Good evening to everyone, here is my question.. I have typed a software in ladder using a plc dl05 and interfacing it with a Cmore micro lcd...
Replies
5
Views
3,924
I am trying to change the preset valve of timer from HMI (IFIX) seems like i can't put any V mem address in that section Is there any trick for...
Replies
6
Views
6,591
Back
Top Bottom