New with PLC's. Need advice for a Cycle Timer

Join Date
Mar 2015
Location
KY
Posts
16
I am having trouble building a cycle timer to turn on outputs one at a time and to descend turning them off from highest output to first output.. I can turn them on but am having trouble turning them off.

So far I have the outputs turning on every .5 second in order. Here is what I have:

Rung000- I have a start switch, On-delay timer.
Rung001- T4:0/DN bit and output 1.
Rung002- NO contact of output 1 and On delay Timer
Rung 0003- T4:1/DN bit and output 2.

I hope you can visualize what I have done. Any help or advice would be great!!
 
You could use one timer. Have it go to your max time. E.g. for what you currently have shown, timer PRE = 4 seconds

Use LIM (limit test) instructions

Double click the side of the rung and paste in

Rung 1:
XIO T4:0 TON T4:0 1.0 4 0

Rung 2:
BST LIM 0.5 T4:0.ACC 1 NXB XIC O:0.0/1 BND OTE O:0.0/0

Rung 3:
LIM 1 T4:0.ACC 1.5 OTE O:0.0/1

Rung 4:
LIM 1.5 T4:0.ACC 2.0 OTE O:0.0/0

Note you can only address each output once, hence the branch in rung 2. Another method would be to address B bits, and then at the end have rung branch XIC B bits turning on the single output

Note 2 I haven't a controller or simulator to test the above code, trying to show you the concept just

Edit: you could also try EQU instructions
 
Last edited:
Let's assume three TONs. As you have found, the done bit of each can energize outputs sequentially when arranged in order. Try this - add three more timers and insert their DN bits one at a time in reverse order in series with the existing done bits, except, use the XIO version instead of XIC. Enable the first 'OFF' timer by the done bit of the last ON timer and the rest of the OFF timers sequentially enable each other in the same way as the on timers. XIO of the last OFF timer enables the first ON timer.
 
Use internal output bits with your timing chains. Use one timing chain to control the physical outputs "On" conditon and one timing chain to control the physical "Off" condition. Build a rung that will energize an internal output bit that latch itself on at the end of the "On" start-up chain and unlatch itself at the end of the "Off" chain. Use the internal output of this rung plus the "Stop" button to initiate the"Off" chain. I am having trouble describing this, maybe I can post an example if needed.
 
I am still having trouble descending the timers. I attempted in Doug-P's way but i guess I got side tracked somewhere.

And jrw4gbm, I did'nt really follow what you were saying.
 
I’d use one timer, compare instructions and move instructions. In the example you have, have T4:0 go to 61. When the timer’s acc reaches 10 move “1” to the outputs (this will turn on output 0). When the timer reaches 20 move “2” to the outputs (this will turn output 0 off and 1 on). When the timer reaches 30 move “4” to the outputs (this will turn output 1 off and 2 on). When the timer reaches 40 move “2” to the outputs. When the timer reaches 50 move a “1” to the outputs and when the timer reaches 60 move “0” to the outputs. The reason I would have the timer run to 61 is so it can reach 60 without going done giving the rung time to go true. Once the timer is done you can reset it.
 
@Firejo,
I like your method much better and could have used it in my example. The only reason I didn't use that method is that I was trying to follow the general theme of the OP in post #1. This method also is similar to what Doug-P posted.
 
I’ve found over the years that people tend to look at the obvious way even if it’s harder than to step back and look at the simplest way that might not be so obvious. Using cascading timers (in my mind) is the obvious way to do a sequence but gets complicated pretty fast and can be a lot of timers. Sometimes pointing out something that goes against general theme lets someone see a whole new way of doing programming (that’s what happened to me. I used to use many, many timers until a friend turned me on to using compare instructions).
 

Similar Topics

I'm currently working on a PLC setup and could use some advice on the best way to manage my power supply units (PSUs). Here's the configuration...
Replies
3
Views
407
First, thank you to anyone who reads and attempts to advise and/or help me. Let me start off by giving some background. I have been a Computer...
Replies
23
Views
7,348
Hi everyone, not a native PLC programmer here, just an engineer trying to make the thing work. I have a sensor that I'm working with that...
Replies
5
Views
3,397
So I have a personal project where I want to use a photosensor relay (no/nc) as inputs on my Siemens logo. When the lights are on I want the...
Replies
4
Views
2,497
Hello all and thank you for making this awesome forum. First of all, my English is not the best, so please try to bare with me. I love...
Replies
8
Views
2,849
Back
Top Bottom