Sign in to follow this  
Followers 0
reklaw

2 time periods using one timer?

7 posts in this topic

Hello! I am new to the forum here and thought I would join because it seems like a great place for PLC info. I am just beginning to design really basic PLC logic and had a n00b question. I was wondering if it were possible to use one timer with two or more time periods with an Allen Bradely PLC. Ex. When input A is turned on, a light will be on for 10 seconds. After that it will be off for 2 seconds and then again on for 5 seconds. After this, the light will not turn off again until input A is turned off. I know how to do this easily with more than one timer but it is supposed to be done using one timer only. But the AB plc only allows a timer (TON) with a single preset value as far as I know. Maybe this can only be done using something like a S7 or GE Fanuc, Modicon etc...? Any insight??? Thanks in advance for you time.

Share this post


Link to post
Share on other sites
Timer preset word is addressed as .PRE (e.g. T:0.PRE). You can write there different values on demand. The timer resolution remains the same.

Share this post


Link to post
Share on other sites
try setting the timer's preset value for the highest/longest time you need ... then use comparisons (GRT, LES, etc.) based on the timer's accumulator to control the various outputs ...

Share this post


Link to post
Share on other sites
Ron and Sergei both make good points. You can change the length of your timer from 10 seconds to 5 seconds by mov a value into .pre. Also seen the .acc checked and action taken at fixed points. Post your sample logic and we can help, but don't ask us to do your classwork for you.

Share this post


Link to post
Share on other sites
Yeah, but if there is only one timer, there would only be one source. Cmp instructions compare source a to source b. I wouldn't have a source b, correct? @ BobLFoot --I would post the sample logic but this is all on paper. The lab is the only place I have access to any kind of simulator. I was using RSLogix to practice on my home PC but it was only for a limited trial period.

Share this post


Link to post
Share on other sites
Source "b" can be a constant. Hint, a limit instruction is just one type of compare insrtuction. Edited by Mickey

Share this post


Link to post
Share on other sites
Unless I am wrong we're only talking 3 to 6 rungs of code. Next time you're at the lab jot down the mnemonics and post them. The more experienced of us can work from them almost as well and mnemonics are plain text easily typed into mrplc forum posts. If you'd like some hlep that is.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0