jbsquires
I am attempting to create a program for the UniPi1.1 to control a vacuum sealer machine. (the right rails are cut off in the picture) The process is to as follows vc999v2.png  :  Pushing Pump_Start button starts the v_pump and latches it till the Pump_Stop button is pushed. Once pump is running Pushing the Start_Cycle button starts a cycle that:
  1. Closes the lid
  2. Closes the vent valve 
  3. turns on bar coil and waits 4 seconds then turns it off
  4. Seal1 turns on for 4 seconds the shuts off
  5. Seal2 turns on for 4 seconds then shuts off
  6. Resets the cycle and awaits the Start_Cycle input
So far my results are that the Pump relay turns on with the Start_Pump button and holds till Pump_Stop (nc switch) is pushed. The rest of the relays will not start. I am a novice at PLC programming at have attempted to look at as many examples as I can find to accomplish my goals but still haven't found a solution. Any help would be greatly appreciated.
Jeff Squires  - PLC programming novice
Quote 0 0
thiagoralves
It is really hard to see your program from the picture. It is better if you can just compress (.zip) your project folder and attach it here. Perhaps it would be good to build your knowledge from a solid ladder logic course, like the ones available at PLC Academy or Udemy. This is a lot better than trying to read and make sense of loosen examples on the web.
Quote 0 0
jbsquires
Ok, zip'ed my project folder and attached. Problem I am having is getting my head around how to do a cycle (loop) in ladder logic where in this case you push the start button and two valves close (turn on) and 4 seconds pass, a coil comes on for 4 seconds and turns off, another coil comes on for 4 seconds then turns off and finally the two valves open (turn off) which then goes back to wait for the start button. I know this shouldn't be that hard but I am having the hardest time getting this figured out. I am looking into taking a course to help improve my skills.
Jeff Squires  - PLC programming novice
Quote 0 0
thiagoralves

I will take a look at your program later, but you need to wrap your mind around the concept that ladder logic by itself is cyclic, so it makes no sense to have loops inside it. Instead of loops, you need to work on the concept of states. At first, you have your idle state, until the button is pressed, which makes it change the state to close the valves, and so on.

In ladder logic, all rungs are processed in every cycle (big loop), then the concept of states will define which rungs should be activated on which state. You can create additional bool variables that will work as defining states. When a particular bool coil variable is activated it means that this particular state is active. Then you use this condition to turn on/off your valves accordingly.

Quote 0 0
jbsquires
First thanks for your guidance and input. I spent most of the weekend going over ladder logic examples and getting the hang of "states" I rebuilt the program and have it working almost. the problem I now have is that when the PLC is first started "seal1" and "seal2" fire off once before the "start_Cycle" button is pushed. So I am getting closer thanks to you.
vc999v3.png 
Jeff Squires  - PLC programming novice
Quote 0 0
thiagoralves
That's easy to fix. Just put an open contact at the beginning of the seal1 rung, and associate this contact with one of the variables that are turned on when start_Cycle button is pressed (like lid for example)
Quote 0 0
jbsquires
That's easy to fix. Just put an open contact at the beginning of the seal1 rung, and associate this contact with one of the variables that are turned on when start_Cycle button is pressed (like lid for example)

Thanks, I added the "Lid" contact on both seal1 and seal2 and it is now working as it should.  I have also started a online PLC/Ladder Logic class which I am sure will help me learn how to program better. Being 60 it takes a little longer for me to pick up things but I get there eventually. 
Jeff Squires  - PLC programming novice
Quote 0 0