Logic Help

mdeltat

Member
Join Date
May 2007
Location
Los Angeles, Ca
Posts
84
I have written the attached program for a bottle packer. Everything seems to be working well so far but I have run into a challenge. After the lift comes down and the outfeed conveyor is energized, a new box is fed into the lift and the lift "up" is energized. The challenge that I face is that if the first box doesn't actually leave the lift (due to it being stuck etc.) a box is detected by the PE and the lift"up" is agian energized causing a jam since the machine is now dropping bottles into a full box. This could be a safety concern. I am only working with one PE. This PE does not move with the lift so it goes like this...the box enters the lift and the PE sees it, next the lift goes up and the PE doesn't see it, then the lift comes down and the PE again sees the box, finally the box outfeeds and the PE doesn't see it. I've tried to use counters without success. What are some of my options? Thank You for your help. Joe

Also, I should note that my program is a little disorganized at this time, however, I fear at this point changing rung order may lead to more issues for me. I'm not sure. Disregard rungs 3,4,11,and 12 they are just left over from a few ideas I've tried.
 
Hi,

If an empty case (next case) pushes the full case out of the case lift, then you may add an extra PE to detect the next empty case. Then create a logic that will pause the sequence until the next empty case is ready. If you are using live roller to take the full case out of the case lift then place the PE at the outfeed conveyor. Create a logic that will pause the sequence if the exit PE does not detect the full case. Hope this will help.

Regars,
Edwin
 
I agree with Edwin, another photswitch detector would help solve your problem.

If that is not practical or not allowed for some reason, then you need to add some "stage relays. Robertmee told you about stages or steps, way back in the 4th message of your previous post on this program, but you must have missed it:

http://www.plctalk.net/qanda/showthread.php?t=39304

Don't forget your steps, and with only 1 photoswitch, it is almost necessary to use a relay to seal-in at the completion of each step.

Steps.........Action
1 - Place the bottles in rows.
2 - Apply brake to waiting bottles.
3 - Load box into lift with conveyor.
4 - Raise the lift.
5 - Actuate the slide to drop bottles.
6 - Lower the lift.
7 - Activate the conveyor to discharge a filled box.

Stage 1 Finished Relay = The bottles are in rows.

Stage 2 Finished Relay = Stage 1 is Done, and the brake has been applied.

Stage 3 Finished Relay = Stage 2 is Done, and the box infeed conveyor has run (box entered lift) AND the Photoswitch has seen a box.

Stage 4 Finished Relay = Stage 3 is Done, and the lift motor has moved UP, AND the Photoswitch did not see a box.

Stage 5 Finished Relay = Stage 4 is Done, and the slide has been activated.

Stage 6 Finished Relay = Stage 5 is Done, and the lift motor has moved DOWN, AND the Photoswitch has seen a box.

Stage 7 Finished Relay = Stage 6 is Done, and the box outfeed conveyor has run, AND the Photoswitch did not see a box.

I should note that my program is a little disorganized at this time,...I'm not sure.
I agree totally. You are doing what many try to do - write the program, then go back and organize it. You are looking at the trees and missing the whole forest. You are getting bogged down in each rung, forgetting what the goal is --to fill the boxes with bottles. Step back and look at your mess, and divide it into Steps, add the Step Relays, and add some rung comments that clearly indicate where each Step begins and ends.

It is so much easier to first decide on how to organize it, make an outline or list of the steps, and only then write the program. I AM sure of this, because I learned it the hard way, as you will too - eventually.

It is not so much as the order of the rungs as it is having a clear idea of the different tasks that must be done, and what order they must be done in, and organizing your program around that same group of steps, as much as is possible.
 
Last edited:
The OP stated that the final step is that the full case is fed out and the PE is clear. Add a condition that the first step (loading an empty box) can not start unless the PE is clear.
 
There is a problem if there is only one conveyor bringing in empty cases and discharging full cases.

Ideally there would be individual sections. The fist would be the conveyor leading up to, but not into, the bottle lift. The second would be the bottle lift section itself. Finally would be the take-away section.

If there is only one conveyor then you must somehow stop the next empty case from driving in before the filled case exits.
 
I fear at this point changing rung order may lead to more issues for me.
Fear Not. I added the Step Relays for you in Revision 2. Now you can delete a bunch of the counters and timers that you stuck in trying to make it work.

Notice that you still need to go through and check it, because I am only guessing at how things work. A written process description would have helped a lot, or a list of the Inputs, Outputs, and exactly what each one is.
 
Last edited:
bernie_carlton said:
There is a problem if there is only one conveyor bringing in empty cases and discharging full cases.

Ideally there would be individual sections. The fist would be the conveyor leading up to, but not into, the bottle lift. The second would be the bottle lift section itself. Finally would be the take-away section.

If there is only one conveyor then you must somehow stop the next empty case from driving in before the filled case exits.

I agree totaly with this. The conveyor that brings the bottles into the lift must also run faster that the one infront of it in order to create a gap to count the number of crates.
Ideally you must have 2 or more PE's to detect crates on conv.
I pressume you use some sort of stopper on the conveyor to stop the crates. Once the 1st PE is cleared you can start feeding in the new crates. And once the last PE is cleared the stopper can come up to stop the new incoming crates (I do this to speed up production, but if a crate gets stuck alot you may need to wait untill all PE's are cleared before feeding in new crates. This is not ideal as the lift will have to wait for new crates every time)
 
All of our case packers have limit switches that detect the case on the case-elevator. It won't alow a case to go up unless it is not made then made again. Also the case rack has to be in the down position before the grid closes. This helps to keep it from double packing. If the grid closes before the rack hits bottom it will bring it back up again. So be sure to check your grid closing flow controls and slow them down a bit.
 
Thank you for taking the time to help me. The program improvements look very promising and show me a good example of how to organize. I will review this in detail and get back to you soon..
 
mdeltat said:
The program improvements look very promising and show me a good example of how to organize.
In addition to being a way to organize, Step Relays are a way to allow one photoswitch (or other sensor) to perform more than one function.

For Step 3: Use the photoswitch to see if box has entered lift.

For Step 4: Use the same photoswitch to see if lift has moved box up.

For Step 6: Use it again to see if box has moved back down.

For Step 7: Use it again to see if same box has been moved out by the outfeed conveyor.

How is it possible to use a switch for different functions? It is done through the magic of adding a second variable, TIME you might call it, or Where You Are in a Sequence of Steps. Where your are (number of steps since beginning) and What (the switch) combine to make a variable with many personalities that can mean different things at different times.

In other words, the meaning of the switch depends on what has happened in previous steps. To know that, you have to have a way to record which steps of the process have been completed. Step Relays (or Stage Programming) provides an easy method to accomplish that.

I notice that you have been forced to add some pseudo-Step relays already, but if you bring them out in the open and mark them for what they are, things become much clearer. What I mean is that now you will see that the program has many places where the Step Relay is piggy-backed in parallel with one of your old pseudo-step relays. Everywhere that happens, you can probably get rid of some things.
 
Also, for the clutch to energize and the empty box to infeed, step 2 must have completed. However, the lift must be in the up position for step 2 to complete. This would not happen since when initially turning the unit on there would not be a box in the lifter yet.
 
Would you point out a specific example of the pseudo relay so that I know what to look for when cleaning up my program?
It is not "pseudo relays" that I meant but pseudo-STEP Relays. I meant relays doing the function of Step Relays, but not identified and treated as such, therefore confusing and messy. Rungs 7 & 24, Counter C5:0 is an effort to use the photoeye for different functions. If you use the new Step Relays, you will not need C5:0. Also in Rung 8, B3:0/7 Box in Lifter Latch can be replaced with the new "Step 3 Done" relay. The description of the Symbol Step_3_Done can be changed to "Box in Lifter".

Rung 14 can be deleted, and on Rung 15, I:1/7 changed to B3:0/1 and B3:0/3 changed to I:2/3. This will do the same thing as old Rungs 14 and 15, but with one less rung and one less internal relay.

Also, for the clutch to energize and the empty box to infeed, step 2 must have completed. However, the lift must be in the up position for step 2 to complete. This would not happen since when initially turning the unit on there would not be a box in the lifter yet.
Yes, it appears that the Step_2_Done relay on Rung 003 is not correct. You are the on-site expert. What does it really take to complete Step 2? I have very little knowledge about how this machine is supposed to run. All I really have to go by is your information in this thread:

http://www.plctalk.net/qanda/showthread.php?t=39304

You said the Steps were these:

Steps.........Action
1 - Place the bottles in rows.
2 - Apply brake to waiting bottles. _______DOES STEP 2 REALLY GO
3 - Load box into lift with conveyor. _____AFTER STEP 4?
4 - Raise the lift.
5 - Actuate the slide to drop bottles.
6 - Lower the lift.
7 - Activate the conveyor to discharge a filled box.
Now you are saying that the brake cannot be applied until a box is loaded into the lift (at least for the first time). That means that your Step Sequence has an error or an omission. In many cases, when initially turning on a machine, there has to be an "Initialize" (or Setup) command to move everything into the start position. Maybe moving the first box onto the lifter should not even be part of Step 3, but a separate step. It may need a new Step 0: Initialze, move box into lifter, set variables to start position.

For sure, the Step_2_Done relay should be put on a new rung after the current Rung 5.

On the other hand, Steps 2 and 3 could be reversed. Does a box ALWAYS move into the lifter before the brake is applied to stop the bottles?

Looking at it some more, if the lift ALWAYS must go up before the brake is applied, then Step 2 actually belongs after Step 4. In which event your initial list of steps was really screwed up. Now is the time to fix this and publish a corrected list.

Your first program (and your second one too!) had NO comments explaining how each rung is supposed to work. Even the Outputs were not identified very well, so I was not sure Which did What. Don't blame me if I guessed wrong!

When did you plan to add some explanatory comments? When you get it working, right? It never happens. When you get it working, you will move on to something else, and several years later someone else will have to go through this ordeal again, because he will not know what you did or how it is supposed to work.
 
Last edited:
Thank you for setting me straight on this matter. I will do some work on this and get back to you. You are right in suggesting that doing this correctly the first time is the way to go. My original explanation of this does seem to be lacking clarity which tells me that I need to rethink my approach to this task. Thank you for taking the time to help me.
Joe
 

Similar Topics

Hello, I am trying to replicate a piece of logic on the PLC5 onto an SEL RTAC. I am using ladder on SEL and FBD. I am having issue on the ladder...
Replies
13
Views
226
Working on project will update after it is completed.
Replies
2
Views
356
Can someone help me piece this problem together. I have a lot of it down I think but cannot seem to get it right. Probably an easy one for most on...
Replies
1
Views
303
Hi everyone, I'm working on a project that involves using a Keyence LR-X100 sensor in Studio 5000 V35 ladder logic to determine the object's...
Replies
4
Views
677
Hey. I am new to PLCs and LogixPro. A friend and I have been trying to build this diagram and instructions using LogixPro500. Could anyone help us...
Replies
15
Views
1,286
Back
Top Bottom