snaggletto
Member
- Join Date
- Jul 2004
- Posts
- 61
| |
| In1 Ls2 Out1 |
|-| |---| |---O---|
| |
| Ls1 Ls3 Out2 |
|-| |---|/|---O---|
| |
| Ls2 Out1 |
|-|/|---------O---|
| |
|-----|END RUNG|--|
Hello,
Be easy this is my first program. This is a basic program of how my drill machine is currently setup, except with limit switches rather than timers to control when 'activities' happen. I'm using Entertrons free software as an editor/simulator and the PLC programming book from this site, PLCs.net, as my guide.
*RUNG 1*
In 1 is a "cycle start" toggle switch.
Ls 2 is a limit switch showing that the drill head is safely retracted.
Out 1 is an output which triggers the air cylider to load a part. This needs to *STAY ACTIVATED* to hold the part while it's being drilled by Out 2.
*RUNG 2*
Ls 1 is a limit switch showing that the part is loaded into the fixture and is ready to drill. Triggered by Out 1 from the previous rung.
Ls 3 is a limit switch showing when the drill has fully punctured the part, and tells Out 2 to turn off (IE retracting the drill).
Out 2 is an output which triggers another air cylinder to advance the drill bit. This needs to STAY ACTIVATED until Ls 3 is hit. After Ls 3 is made, turn Out 2 off/retract the drill.
*RUNG 3*
Here is where I'm kinda stuck. Out 1 can only be enabled when the drill is retracted (sitting on Ls 2) for safety reasons. However, Out 1 needs to *STAY ON* while the drill is drilling (not touching Ls 2). Out 1 can only turn off when the drill is fully retracted again, (IE. hits Ls 2 the second time.) Then it all has to start over again automatically.
I tried to use a NOT Ls 2 to keep Out 1 on while the drill is not retracted. But, I think it just cancels out RUNG 1 and then does nothing.
According to my plcs.net programming manual, it looks as if I need a one shot or flip flop and/or an output latch. I can't seem to get it straight in my head. Basically I need;
While LS 2 is on, Out 1 turns on. Out 1 stays on until Ls 2 is hit the second time.
PLEASE DON'T give me the code. Just give me verbal recommendations/logic and I'll see if I can figure it out and right the code on my own. THANKS.
Last edited: