Introduction to ControlLogix Self-Running Timers
ControlLogix Self-Running Timers will generate a pulse. Basically, we can use this pulse to trigger other instructions, such as Messaging, and Bit Shift Registers. Another way to use self-running timers is to create a watchdog. In this case, the timer will generate an alternating high or low signal. Another processor can look at this signal to verify that our processor is still executing logic. In this section, we’ll discuss different configurations for these self-running timers.
Classic Self-Running Timer
First of all, we have the classic self-running timer. Typically, we will use this type of timer to trigger special instructions. For example, we could trigger the Message Instruction (MSG), Bit Shift Instructions (BSL, BSR), or File Arithmetic Logic (FAL).
At first, the DONE (DN) bit is LOW (0). Therefore, the timer will begin to run. Once the timer reaches the preset, the DN bit goes true. After that, the timer shuts off, and resets. In other words, the run goes false. Once the rung goes false, the DN bit returns to zero. This causes the timer to restart again.
In effect, the DN bit goes true for one scan. We can use this DN bit to pulse other instructions.
The watchdog timer works similar to the classic self-running timer. The exception is that we trigger a bit using the accumulated value. In this case, we reset the timer every 2 seconds. We’ll use a GRT or LES instruction to trigger our watchdog bit. The watchdog bit will be true for one second, and false for once second. Our process repeats infinitely.
We can send this bit to an output module, where it goes to the input module of a supervisor system. At this point, the supervisor processor can monitor this bit to ensure that it’s changing.
Another method is to move this bit into a word that another processor is reading over the network. To transfer data between processors, you can use the Producer/Consumer Model, or the Message instruction.
Self Resetting Timer
From time to time, you will see a timer that uses the RESet instruction. The DN bit of the timer causes the timer to reset itself. Keep in mind that once the RES instruction goes true, the DN bit will clear. In other words, the DN bit does not go true for an entire processor scan. It’s important to realize the DN bit is only true between the time it goes true, and the time it resets. Any logic that triggers an instruction from this DN bit needs to be placed before the RES instruction in the scan cycle.
Staggered Trigger Timer
Occasionally, you will have instructions that you want to execute at the same interval, but not necessarily at the same time. In this case, we can stagger the point in time at which an instruction executes. If you use this method, realize that your scan time might be longer than 1ms. This means that if you trigger an instruction from the exact value of the accumulator, it might not always execute on time. For example, during one scan, the accumulator might be 498. During the next scan, the accumulated value could be 502. If an instruction is set to execute exactly when (and only when) the accumulator is at 500, we will miss it’s execution interval.
For this reason, it’s better to use the LIM instruction to define of range of values in which the instruction will execute.
First, we’ll start with a standard self-running timer.
Next, we simply stagger the execution intervals.
Summary of ControlLogix Self-Running Timers
In short, self-running timers are simply timers that reset themselves periodically. We can use the DN bit, or Accumulated value to trigger other instructions in our logic. Additionally, you can use this instruction to flash a warning light or horn, when an alarm condition is present. There are other configurations to make this happen, but these are the methods I’ve seen most often.
For more information, visit the ControlLogix Category Page!
— Ricky Bryce