Is there a way to reset many timers with one rung?

maci

Member
Join Date
Aug 2003
Posts
12
I was wondering if one can reset any number of timers acc.value with just one rung with out using a bunch of resets? Thanks for your help
 
Last edited:
Use the one rung to create a bit then place that bit in front of the timers you want reset.
OR
Were you looking for a way to reset certain timers at certain times depending on condition?
 
Last edited:
The simple answer to your simple question is "YES".

As Ron (rsdoran) suggested, use one rung of conditionals to turn ON a particular bit. That bit is then used to reset any timers that you apply that bit to.

That means, you have to define the set of conditionals to do so, and that you have to specify those timers that are subject to that particular "Reset".

That is accomplished by defining the particular timers as being "subject to" the particular "Reset".
 
Maci:

Are you looking for the the FLL equivalent of the RES command (in the AB PLC)?

Sorry. No such animal.







Pause 30 seconds while Allen stares off into space.....











Ok. Here's how you can do it.

With none of the timers running, execute a COP #T4:0 #N14:0 x command (where x is three times the number of timers you are interested in).

You can delete this instruction now. N14: now contains the bit pattern of all reset timers. You can, if you want, manually set words 2, 5, 8, etc to zero, since those are your ACCs. You can also reset the lower 7 bits, and bits 11-15 in words 0, 3, 6, 9, etc, as these are your internal timers, and the status bits (TT, EN, DN). Leave bit 9 alone - this is your time base (1 sec / 0.01 sec).

Now you have an "image" of a series of reset timers. To reset the actual timers, just COP #N14:0 T4:0 x/3.

It's not particularly clean or elegant, but it will do what you ask. Personally, I think a bunch of branches with RES instructions is easier to follow, but you're the programmer.
 
Thanks guys that is getting me closer. I'm wondering if there is a way to move a O into say 30 timer acc words that are in the same timer file?
 
Allen, a hypothetical question:

Lets's say, instead of your method, you reset all the timers by moving values of zero into all three words of each timer. Let's also assume you trigger the move by a one-shot.

Would you have to stop and restart the PLC to restore the time base or would it be restored the next time the PLC evaluated the rung containing the timer instruction?
 
Depends

I'm wondering if there is a way to move a O into say 30 timer acc words that are in the same timer file?
If you're working with a PLC-5, use the FAL instruction. If you're working with a PLC-3, use the MVF instruction. If you're working with a SLC-500 then use Allen's method or try looping and indirect addressing.
 
I was wondering if one can reset any number of timers acc.value

I am lost, nothing unusual there. I gave 2 answers because my first thought was that he want to "reset" a bunch of say timers all at the same time. Wouldnt using one bit from a conditioned rung do just that? I did fail to mention to use a oneshot if you want the timers to start running again if that is the only condition to stop them.

My second thought was he wanted one rung to reset "certain" timers at same time but conditions could mean different timers under different conditions which my one rung bit couldnt do.

I have attempted to follow Allens code but it seems to do the same thing as my one rung bit...reset all the timers.

Is there a difference in resetting the timers from moving/copying 0 into the accumulator word?

Maybe more specific details could be given to better understand?
 
Reverse engineering is such fun.

Steve Bailey said:
Allen, a hypothetical question:

Lets's say, instead of your method, you reset all the timers by moving values of zero into all three words of each timer. Let's also assume you trigger the move by a one-shot.

Would you have to stop and restart the PLC to restore the time base or would it be restored the next time the PLC evaluated the rung containing the timer instruction?

I actually had both a little bit of time this morning, and a SLC to play with, so I was able to do some experimenting.

I set up a four T4 TONs, two with a time base of 1 sec, two with a time base of 0.01 sec. I copied each timer into an N file. On the two with the 1 sec time base, the /9 bit was set. Otherwise, the data structures were identical.

I changed the /9 bit on one of the 1 sec and one of the 0.01 sec timers, and then copied the bit pattern back into the T4 data file.

When I did so, the T4 data file said that the timer had the new time base
BUT THE TIMERS CONTINUED TO TIME AT THE OLD TIME BASE !!!

And when I looked at the ladder rungs, it shows the OLD TIME BASE even though the data table showed different.

So it would seem that the "real" time base is stored with the TON instruction, and that bit 9 is only used for the programmer's benefit.

Cycling power on the SLC didn't change the apparent time base, nor did switching to program mode.

There are all sorts of other experiments to try, such as "double timing" the same address, with two timers of different time bases. Not that this would be useful in any program that I can think of, but it might reveal more as to the inner workings of the PLC.

The 50-words-or-less answer to your question though is:
Changing the time base bit does not have an affect on the actual time base.
 
Last edited:
you can

hi macai,

if you are using s7 2xx siemens , then you can do it simply
like this :

reset TO
-----| |-------------------( R )
32

this will reset the timers for you,if you have ore than two timers
then add the number below the "reset" instruction this will work if you are using siemens ....

hope this help ...
regards,shark.
 
perhaps this would be a place for a bit of indirect addressing?

t4:[n7:0].acc

imagine the possibilities...
 
thanks

Thanks for all the info I got what I was looking for. Gerry you are right it was just a acedemic question but the info I got I can use in real world applications that I was unaware of. Thanks again
 

Similar Topics

Off topic I know but I wanted to rant about how stupid some people can be. Where I work we have had some trouble with a rotary valve. It is...
Replies
5
Views
2,579
Anyone knows how many times I can reset the RSI activation key from the web? Let's say if I do not renew the warranty period of 1 year after...
Replies
3
Views
3,342
Hi need help why this “failure 5 emergency stop “ appears at every startup in the morning ? Have to shut off main switch at least 10 times on...
Replies
19
Views
296
I was loading a program onto an XE1e2 PLC and it got stuck on these two windows and won't progress. It won't let me connect from the PC to reload...
Replies
0
Views
73
Hi all, i have recieved some 4RF Aprisa SR+ ethernet radios from a customer to configure. Issue is that they are used and have non-default...
Replies
0
Views
80
Back
Top Bottom