ab timer

bbseay

Member
Join Date
May 2003
Location
OK.
Posts
54
I am coping a ab program to ad. The program has a location in the program , that in the same rung, using the same timer and enable bit and then a done bit [EN] -------[DN]---------------------------------(out)

what is this doing. The only way I know to enable a timer is making a rung true.


thanks

Billy
 
I'm not a guru like some guys are on here. That said take this with a grain of salt.

Always on except for the first scan?
 
That rung is referencing the enable and done bits of the timer.(EN,DN)

These are status bits from the timer.

The EN bit of a TON or a TOF is set to 1 anytime the timer rung is true. It is set to 0 anytime the timer rung is false. (No delay at all)

It makes a difference on the DN bit if this a TON or a TOF.

TON DN bits are set to zero until the timer rung goes true and the timer reaches it's preset then they are set to 1. If the timer rung goes false the DN bit is set to 0.

TOF DN bits are set to 1 from the time the timer rung goes true until after the timer rung goes false and then the preset times out. Once the rung goes false and the timer reaches it's preset then the DN bit is set to 0 again.

All of that said, I don't know what was trying to be accomplished by this rung.

If your timer references a TOF then the delay function is negated by the EN bit in that rung. The DN bit would have no effect.

If your timer references a TON then the DN bit will be the one making and breaking that rung. The EN would have no effect.

It might be scan dependant logic in a TON? I don't think so though. Maybe someone else knows? If it is not scan dependent then it serves no purpose I can think of.

If you can give more detail and or post the code. Then a better answer can be given.

Maybe one of the more knowledgeable guys can give you a better answer.

Also,

The instruction set reference is available from the Rockwell site. It will provide the detail of each instructions execution. Based on your asking this question you need the reference manual. I do not envy your task if you are not familiar with both AD and AB PLC's.

Good luck.
 
Last edited:
Another guess...

Perhaps the original programmer thought you needed BOTH in order for the rung to solve true. IOW, when "timer is enabled" AND "timer is done", then OUT.

Similar to using a one-shot to increment a counter when the counter will only increment when there is an false-to-true transition anyway. For example:

| INPUT 1-Shot
|---] [------[ OSR ]-------( OUT )
|
| 1-Shot +-----+
|---] [--------------------| CTU |
+-----+


Works the same as:

| INPUT +-----+
|---] [--------------------| CTU |
+-----+


🍻

-Eric
 
Eric is probably right. It could be that the programmer didn't realize that the EN bit was unnecessary, he may have possibly been used to one of the many PLCs where you have to program your own output bit for a timer, and thats what he thought he was doing. You seen things like this sometimes, not that its a big deal, it still works.

We've got a machine that we relocated here from another division and an XIO S:1/13 (major error halt) is programmed in every output rung, obviously the programmer was unclear on the concept. We all had a good laugh when we saw it, but it still works so I've never bothered to go and clean it all up.
 
Dear Professionals!

I'm a new guy for PLC.

Need answer for the following:
I use AB PLC5. I use TOF for counting to 4 hours (14.400 sec). I have to modify it to 2000 hours (7.200.000 sec). How can I do it? The maximum allowable if the time base is 1.0 sec is 32.767 (9.1 hours).

Recomendations?
Thanks.
g.
 
I usually do this at a point in the logic to be able to see the enabled and done bit of the timer for faster troubleshooting of a timed sequence.
 
Garvai what you need to do is called cascading timers. You first enable the first timer then use its done bit to enable the next, keep using this sequence until you reach the desired time base that you need. Then use the dn bit of the last timer to give the desired output you wanted.
 
Well, it seems to me I need more than 200 timers to solve the original problem counting not to 14.400 sec, but 7.200.000 sec. I don't think its a good idea.
May I wrong?
g.

PS.: I think I have to use PLC clock somehow...
 
Garvai said:
Dear Professionals!

I'm a new guy for PLC.

Need answer for the following:
I use AB PLC5. I use TOF for counting to 4 hours (14.400 sec). I have to modify it to 2000 hours (7.200.000 sec). How can I do it? The maximum allowable if the time base is 1.0 sec is 32.767 (9.1 hours).

Recomendations?
Thanks.
g.


Try this:


You will need to invert your TOF logic for TIMER_PERMISSIVE

TIMER_PERMISSIVE
-------][------------------+TON--------+-(EN)
| T4:100 |
|Base .01 |-(DN)
|PRE 32767 |
|ACC 0 |
+-----------+


--+GEQ A>B------+-----+----+-SUB--------+-
|A T4:100.ACC | | | T4:100.ACC |
|B 360 | | | 360 |
+-------------+ | | T4:100.ACC |
| +------------+
|
+----+-ADD--------+-
| 0.001 |
| F8:100 |
| F8:100 |
+------------+
TIMER_PERMISSIVE
----]\[--------------------+CLR---------+
| F8:100 |
+------------+




F8:100 will contain your time value in thousandths of hours.

By not resetting the timer but instead subracting 3.6 seconds from the timer accumulator you can maintain better timing precision and the timer will never time out. If you use a preset of 360 and the DN bit to increment then you will add the timing error due to scan time into the total also. Over time this can become a significant error. This method eliminates the totalized error.

(Note that single precision IEEE floating point numbers can loose precision as they get larger, but even 10,000 hours is not a problem at thousandths of an hour - just don't try doing micro hours)
 

Similar Topics

Hello, I still do not have equipment in to test. But the RTAC ladder does not have a timer reset coil. I wonder if a reset coil on Timer.IN is...
Replies
1
Views
122
I have some logic that I have written within a 5380 series controller that tracks the time an event is started, while the event is running an RTO...
Replies
2
Views
108
Hi all, I have a simple question that I have overcomplicated and gotten stuck on. I have a variable, we can call it "light" that I need to stay...
Replies
4
Views
361
Question to anyone with ideas about my thoughts on upgrading a very vintage timer, which is being used to switch between 2 5hp domestic water...
Replies
14
Views
459
why my timer only executes once here? After first time i use it, ET stays at 0ms all the time. It is in FB
Replies
5
Views
326
Back
Top Bottom