PLC - Help with repeating program

bmillerx94

Member
Join Date
Feb 2017
Location
United States
Posts
26
Hello,

I am returning for some guidance on how to get my program to repeat itself infinitely until a stop button is pressed.

I need a particular section of my program to repeat. I have a lot of timers in this program, which are necessary to establish clearance between actuators in the cycle. I am incredibly confused on how to do this, but I know its a matter of resetting something (timers or outputs).

Here is some critical info you may need:


1. I need the program to repeat from rung 12-30, over and over, until someone hits a stop button, but its the repeat part I need to figure out.

2. Let me know if you really need to now the process and project in detail

3. PDF:

https://www.dropbox.com/sh/aqqy1foyv5fvyvj/AAB4qFwDDJ6CPwpk5i2ka0Pca?dl=0


4. The program is still rough draft

5. Sub alarm check - a sub routine that checks for errors (i have it bypassed for testing purposes)


Please let me know how I can assist you in helping me. I appreciate your time.

Regards
 
Do not confuse the execution of the rungs of your ladder logic with operation of the machine. The PLC program continuously executes the ladder logic. After the last rung of ladder logic there is an implied "Go back to the first rung" command. This confusion is something just about every new PLC programmer has to overcome.
I suggest you try to set up a series of internal bits representing the states the machine must got through and a set of internal bits representing the conditions under which you transition from one step to the next. After that, you control the PLC's real-world outputs according to which steps of the sequence they should be energized in.
 
Steve, thanks for the reply.

Ahh, wise words. I often forget that a PLC program is not like a book (top - down), even if my logic is somewhat written with top-down execution (timers linked to one another, etc).

So with that said, I guess I need to reset my "end of cycle" outputs as well as the timers and have the last switch re-energize the output that starts the timer sequence.

Regards
 
If you are planning a sequence strictly controlled by time, you can use a single timer along with "Greater Than" and "Less Than" instructions to control which outputs are energized at which points in the sequence.
You can also set up an event-driven sequence where sensors control the transition from step to step.
Most sequences are a hybrid of timed transitions and sensor-driven transitions. Give some thought to timers that track the duration of each step of the sequence. They can give you important troubleshooting information. A step that suddenly takes a lot less time to complete could be a sign of a faulty sensor. A step that takes too long to complete could indicate a jam.
 
So with that said, I guess I need to reset my "end of cycle" outputs as well as the timers and have the last switch re-energize the output that starts the timer sequence.

Regards

Yes, you need to add only couple bits to your program.

Steps can be controlled by series of bits as Steve writed or saving step number to integer and modifing this step number.
Integer is easier to look, only one step can be on at one time. Bits can have several status, if there is set/reset commands etc.
 
Hi, all,

It's difficult for me to entirely grasp what your saying as I'm still a novice to PLC... But, I don't think I can use the drum sequence because I have switches in the rungs that must false for the outputs to turn on and so fourth.

Regards
 
Will Y105 (rung 29) complete its task when X005 becomes true? I see that Y105 will turn off. Will X005 stay true? If so then add a rung after rung 30. Use NO C10, NO X005, OUT C11 (I think that's unused) so that C11 turns TRUE when Y105 is done.

Next add a NC of C11 into the enable line of timer T7 in rung 11. This will reset the timer and restart the cycle - BUT first...

Place a NO of T7 into each rung (starting with rung 13) which is latched. E.g rungs 13, 14, 16 ... You find the rest. This will reset them when T7 is turned off by the action of C11.

Good luck.
 

Similar Topics

I have a network with 4 PLCs PLC1 is controllogix and PLCs 2-4 are compactlogix and they all need to communicate. The current way I have this...
Replies
8
Views
224
So to start off: I have no experience with PLC's, but I'm good at figuring stuff out, but I need some help to know if my PLC is just dead in the...
Replies
2
Views
99
Hi guys, I have no experience when working with AllenBradley PLC, but I hope someone could clarify the result of multiplication shown in the...
Replies
14
Views
2,133
To quickly test a plc output which is wired to a relay do I dob a cable between the output and 24vdc+ source I.e something with 24vdc+ live such...
Replies
6
Views
635
we have shihlin a1-20mr plc .now the plc show the program error indication due to battery train.i change the battery but till the error shown...
Replies
9
Views
826
Back
Top Bottom