Cascading timers to control a sequencer

creroh

Member
Join Date
Apr 2015
Location
Lancaster
Posts
3
Hello. I am a student doing an independent study on PLCs. I am using a Allen Bradley SLC 5/02. What I am trying to accomplish is to step a simple pneumatic robot through 9 steps that would control its operation. Me and my partner started out with just the sequencer and a simple program to make sure everything was working. Once we were able to control the robot using the sequencer and a PBNO we attempted to control it using timers.

I tried cascading the timers and set up the EN bit to trip the sequencer. In my head each timer should have gone off and the EN bits would have stepped the sequencer through each step. The problem I ran into with this is that the timers would go off and nothing would happen. I tried to solve this by having each substantial timer turn off the previous one. This just created a recycle timer (which worked), but it isn't stepping through the way we need it to. I would just settle with the recycle timer, but each step needs a different time.
I apologize for the long winded explanation I hope it is clear and will gladly provide more information if needed. I appreciate your help.
 
So, at the risk of helping you cheat on homework , have you thought of using one timer and comparison instructions? When the timer hits 10 seconds for example you could have a comparison (equal to / greater than) execute a process. Then at 12 seconds another one. I don’t know if will work for what you’re doing but just an idea.
 
Welcome to the forums!

Firejo's suggestion is a good one. Another approach to sequential programming if it's based solely on time is to use one timer and a "step" tag (e.g. N7:0) in this sort of manner:

- Sequence starts: add 1 to "step" tag and start timer
- When timer completes, add 1 to "step" tag, move the next step's duration into the timer preset, and reset the timer
- Repeat

Then look at the value of the "step" tag to determine which step the machine is in, and which outputs to turn on.

In both cases your logic is much simpler, and much more flexible - adding in extra steps is now just a matter of another "add one and reset timer" (or in Firejo's example, extending your timer preset and adding another comparison). And if you need to skip steps for whatever reason, you can jump directly to a step by means of MOV'ing the step number directly into the step tag.

Experiment with both and see which one you like best, the more methods you have at your disposal the better at PLC's you'll be!

Good luck!
 
For pick and place's I use a SQI to a SQO and a timer. The SQO loads the bit pattern for the valves and a second branched SQO loads a preset into a single timer (previous rung). Then the SQI detects the feedback proxes on the cylinders (using the mask to enable only the proxes required) and then when the timer is done it goes to the next step. All of the SQI and SQO have the same R6:x register.
 
I tried cascading the timers and set up the EN bit to trip the sequencer. In my head each timer should have gone off and the EN bits would have stepped the sequencer through each step. The problem I ran into with this is that the timers would go off and nothing would happen.
Yes, if you used the Timer EN bits, then when a timer is done (and the DN bit activates), then nothing would happen.

Try using the DN bit to trigger your sequencer.
 
Thank you everybody for the quick replies. I got it to work by adding an additional timer between each timer and changing the EN bits to DN bits, but it is long so I am going to try the comparison option that both Firejo and ASF were talking about. I will let you know if it works. If I have time I will also try JaxGTO's suggestion.Thank you all for your input.
 
You don't need extra timers between timers. One timer per step should be enough, if you do it similar to the attached picture. Use the Step Relay bits to control your robot outputs.

Cascading Timers- Ceroh.jpg
 

Similar Topics

Good Evening , I have a Conveyor system that requires Speed Cascading from one conveyor to another. Meaning that if one conveyor speed is...
Replies
10
Views
2,587
Happy Holidays Folks! I am working on a robot cell and as we are adding PLC control to the system, I have some questions about implementing an...
Replies
6
Views
4,734
I'm new to PLC. Have little knowledge of VFDs. I've 5 nos of Delta M series VFDs and all are connected to motors running the conveyor belts...
Replies
3
Views
2,849
I am wondering if its a good idea to cascade pid loops. For example If I want to control two variables Current and Voltage. If i can feed output...
Replies
4
Views
2,767
I need a little help tuning this system. I am using a SLC 5/05 processor. What I have is a paint booth that requires me to be able to control the...
Replies
12
Views
4,608
Back
Top Bottom