Using a Bit in a Timer's Accumulated Value

Are you asking why someone would want to do that? I suppose the two most common reason I see is:

  • Blink something on/off at some rate
  • Use bit 0 to determine if the value is odd/even (more common on counters)
 
Yes, I am curious why and what type of logic would use bit 1 in a 200 ms timer. I figured it was some type of odd blink rate but I am trying to wrap my head around the specific why as I update a SLC to a Logix.
 
Yes, I am curious why and what type of logic would use bit 1 in a 200 ms timer. I figured it was some type of odd blink rate but I am trying to wrap my head around the specific why as I update a SLC to a Logix.

Maybe to get a random 50% occurrence?
 
Yes, I am curious why and what type of logic would use bit 1 in a 200 ms timer. I figured it was some type of odd blink rate but I am trying to wrap my head around the specific why as I update a SLC to a Logix.

Hi, well I use .ACC all the time, especially for my routines that I wrote for air handlers when I needed to hold a temp for a few minutes before enabling additional changes (setpoint, fan speed, etc.)
Also a good test on a job interview is to make a "system flasher" Then one uses a "GRT" instruction with the Timer.ACC value to turn on and off the output bit that enables the light. Don't forget the XIO bit (.DN) to reset the timer. I've seen this all the time. Pardon the pun.
BTW, welcome to the forum!!
 
Saultgeorge. Do you use a specific bit position in the ACC value in your logic. For example T4:0.ACC/1

I'm not that familiar with 500 any more, so someone may need to correct me. What I do is use the .ACC value in a GRT instruction. So the tag (address in your case) would be "T4:0/ACC". That would show a value incrementing until the timer is either done or is reset. The other value in the GRT can be a hard coded number such as "500" So if the timer preset is 1000ms (or whatever time base is available in 500), then when the ACC value exceeds this, it will turn on a bit. If you reverse where you put the values in the GRT, then the light will start out on and then go off. For a flasher I don't think it matters. If I'm wrong about some of that 500 stuff please forgive me. See attached screenshot for a 5000 flasher.

A system flasher.png
 
Saultgeorge. Do you use a specific bit position in the ACC value in your logic. For example T4:0.ACC/1

Saultgeorge is not using individual bit(s), but rather the ACC as a whole word.

While you can use an individual bit to trigger a blink on/off, the only advantage to speak of over Saultgeorge's method is that you can more easily get multiple rates of blinking using a single timer. And as a disadvantage you cannot set your own blink rate; you are essentially limited to a list of preset frequencies.

I've seen this done using bits from the system clock instead of a timer.
 
Last edited:
I think these methods are almost always cheap, and inaccurate but good enough, flashers.

E.g. when an alarm occurs, there may be a TON delay timer started to allow the operators to respond over a buffer time span. If they do not respond before the timer expires, then the PLC responds, perhaps by stopping the process. Such a bit could be used to implement a visible flasher (bit 9 is ~1Hz), or, with .ACC/1, an audible sound (~250Hz buzz). The exact frequency of the flash or buzz may be less important than that it be noticeable.

.ACC/1 is a 4ms period, 50% duty bit, so it changes every 2ms. Depending on the scan time, that bit might or might not change - as detected during a scan - over several scans and tens of milliseconds, but that might not be an issue.

As plvlce mentioned, there is also the High-speed Clock, running at 100kHz. For example, bit 12 of the MicroLogix 10kHz free-running clock can be used to implement a roughly 2Hz, 50% duty signal (flasher).

One advantage to a programmer is that testing a bit in the .ACC or clock with an XIO, instead of a e.g. GRT instruction, uses less of a critical programming resource: vertical space in the IDE.
 
Last edited:
If there is a problem addressing the bit level value in T.Acc then I would COP the T.Acc to a INT or bit word. Then you can easily access a single bit.

Addressing a Timer's Accumulator to single bit level isn't a problem is Logix500, although COP is supported in all variants of 500, it's a bit overkill.

2021-06-24_220941.jpg
 
Saultgeorge. Do you use a specific bit position in the ACC value in your logic. For example T4:0.ACC/1

You use whatever bit position you need to achieve the on/off time you are looking for, depending on the timebase you select on the timer.
 
An even cheaper "blinker" is to pick a bit from S:4 (free running clock). By cheaper, I mean you can leave out the timer instruction.

Depending on what CPU you are using bit 4 or 5 might be good choices or bits 11 or 12 for the newer faster models.
 

Similar Topics

Hi, I'm just looking for a simple way to make a button in excel (via VBA I presume) to toggle a bit in RSLogix 5000. I just got FactoyTalkLinx...
Replies
9
Views
551
After watching The Universe is Hostile to Computers from Veritasium, I suddenly remembered a lost weekend years ago trying to reproduce the same...
Replies
12
Views
4,422
Good Morning , I appreciate your help on a previous post.Your advice helped me understand more. My next question involves the same project...
Replies
8
Views
3,562
Hello, First off, I would like to apologize for beginner question. I am looking to use a 'memory bit' to keep track of the status of an object...
Replies
2
Views
1,294
Hi folks, first post so be kind. I'm adding a vision inspection system to a toggle press and in the toggle press program they are using an OSR...
Replies
9
Views
2,248
Back
Top Bottom