Bird
Raised Fist0
PLC Programmingscripting~15 mins

Timer preset and accumulated values in PLC Programming - Deep Dive

Choose your learning style10 modes available
Overview - Timer preset and accumulated values
What is it?
Timer preset and accumulated values are two key parts of timers used in PLC programming. The preset value is the time you want the timer to run before it finishes. The accumulated value is how much time has passed since the timer started. Together, they help control processes that need precise timing.
Why it matters
Without preset and accumulated values, machines would not know how long to wait or run actions, causing errors or unsafe operations. These values allow automation to happen smoothly and safely by measuring and controlling time accurately. Imagine a factory line without timers—it would be chaotic and inefficient.
Where it fits
Before learning timer preset and accumulated values, you should understand basic PLC programming concepts like ladder logic and simple instructions. After this, you can learn about advanced timer types, counters, and how timers integrate with other control elements.
Mental Model
Core Idea
A timer counts up from zero to a preset time, tracking elapsed time with the accumulated value until it reaches the preset to trigger an action.
Think of it like...
It's like cooking pasta with a kitchen timer: you set the timer (preset) for how long to cook, and the timer counts up (accumulated) until it rings, telling you the pasta is ready.
┌───────────────┐
│ Timer Start   │
└──────┬────────┘
       │
       ▼
┌───────────────┐       ┌───────────────┐
│ Accumulated   │──────▶│ Compare with  │
│ Value (counts)│       │ Preset Value  │
└───────────────┘       └──────┬────────┘
                                   │
                                   ▼
                          ┌─────────────────┐
                          │ Timer Done Flag  │
                          └─────────────────┘
Build-Up - 7 Steps
1
FoundationUnderstanding Timer Basics
🤔
Concept: Introduce what a timer is and its role in automation.
A timer in PLC programming is a tool that measures time intervals. It starts counting when triggered and can be used to delay actions or measure durations. Timers help machines wait or act after a set time.
Result
You know that timers measure time and can control when actions happen in a program.
Understanding timers as time-measuring tools is the foundation for controlling processes that depend on timing.
2
FoundationDefining Preset and Accumulated Values
🤔
Concept: Explain the two main values in a timer: preset and accumulated.
The preset value is the target time you set for the timer, like setting a goal. The accumulated value is the current count of time passed since the timer started. The timer runs until the accumulated value reaches the preset.
Result
You can identify the preset as the goal time and the accumulated as the current progress.
Knowing these two values helps you understand how timers track and compare time to control actions.
3
IntermediateHow Timers Count Time
🤔Before reading on: do you think the accumulated value resets automatically after reaching the preset, or does it keep counting? Commit to your answer.
Concept: Show how the accumulated value increases and interacts with the preset during timer operation.
When a timer starts, the accumulated value begins at zero and increases steadily, usually in milliseconds or seconds. It keeps counting until it equals the preset. Once equal, the timer sets a 'done' flag. The accumulated value does not reset automatically; it holds the final count until reset.
Result
You see that the timer counts up to the preset and signals completion without resetting itself automatically.
Understanding that accumulated values hold their count until reset prevents confusion about timer behavior in programs.
4
IntermediateUsing Timer Values in Ladder Logic
🤔Before reading on: do you think you can use the accumulated value directly in conditions, or only the done flag? Commit to your answer.
Concept: Explain how to use preset and accumulated values in ladder logic to control machine actions.
In ladder logic, you set the preset value to the desired time. The accumulated value can be read to monitor progress or used in comparisons for complex control. The done flag is often used to trigger actions when the timer finishes. You can also reset the timer to start over.
Result
You can write ladder logic that uses timer values to control when machines start or stop actions.
Knowing how to use both accumulated and preset values in logic expands your control options beyond simple delays.
5
IntermediateResetting and Reusing Timers
🤔Before reading on: do you think resetting a timer clears both preset and accumulated values, or only the accumulated? Commit to your answer.
Concept: Describe how resetting affects timer values and how to reuse timers in cycles.
Resetting a timer clears the accumulated value back to zero but keeps the preset value unchanged. This allows the timer to be reused with the same preset time. You can reset timers manually in the program or automatically based on conditions.
Result
You understand how to restart timers without changing their preset times for repeated use.
Knowing that only the accumulated value resets helps avoid mistakes where timers seem not to restart properly.
6
AdvancedHandling Multiple Timers and Overlaps
🤔Before reading on: do you think timers run independently or share accumulated values when used together? Commit to your answer.
Concept: Explore how multiple timers operate simultaneously and how their values remain separate.
Each timer in a PLC has its own preset and accumulated values. They run independently, so one timer's accumulated value does not affect another's. This allows multiple timed actions to happen in parallel without interference.
Result
You can design programs with several timers working at once, each tracking its own time.
Understanding timer independence prevents errors when managing complex timed sequences.
7
ExpertCommon Pitfalls with Accumulated Values
🤔Before reading on: do you think the accumulated value always increases smoothly, or can it be affected by program scan time? Commit to your answer.
Concept: Reveal how PLC scan cycles and program logic can affect timer accuracy and accumulated values.
The accumulated value increases based on the PLC's scan time and clock. If the program scan is slow or interrupted, the accumulated value may not increase smoothly, causing timing inaccuracies. Also, improper resets or overlapping timers can cause unexpected accumulated values.
Result
You recognize that timer values depend on PLC performance and program structure, not just preset settings.
Knowing these subtleties helps you design more reliable timing controls and troubleshoot timing errors effectively.
Under the Hood
Internally, a PLC timer uses a counter that increments based on the PLC's internal clock pulses during each scan cycle. The accumulated value stores this count, while the preset value is a fixed target. The timer compares these values each scan to decide if the timer is done. The timer's done flag is set when accumulated equals or exceeds preset.
Why designed this way?
This design allows timers to be simple, efficient, and synchronized with the PLC's scan cycle. Using accumulated counts tied to scan time ensures timers work consistently with the program flow. Alternatives like hardware timers exist but are less flexible for program control.
┌───────────────┐ Scan Cycle ┌───────────────┐
│ PLC Internal  │──────────▶│ Timer Counter  │
│ Clock Pulses  │          │ (Accumulated)  │
└───────────────┘          └──────┬────────┘
                                    │
                                    ▼
                          ┌─────────────────┐
                          │ Compare to       │
                          │ Preset Value     │
                          └──────┬──────────┘
                                 │
                                 ▼
                        ┌───────────────────┐
                        │ Timer Done Flag    │
                        └───────────────────┘
Myth Busters - 4 Common Misconceptions
Quick: Does the accumulated value reset automatically when the timer finishes? Commit to yes or no.
Common Belief:The accumulated value resets to zero automatically once the timer reaches the preset.
Tap to reveal reality
Reality:The accumulated value stays at the preset value until the timer is explicitly reset.
Why it matters:Assuming automatic reset can cause logic errors where timers never restart properly, leading to stuck or missed actions.
Quick: Can multiple timers share the same accumulated value? Commit to yes or no.
Common Belief:Multiple timers can share or overwrite each other's accumulated values if used together.
Tap to reveal reality
Reality:Each timer has its own separate accumulated value that does not interfere with others.
Why it matters:Believing timers share values can cause confusion and incorrect program designs that fail to run multiple timed actions simultaneously.
Quick: Does the timer count time perfectly regardless of PLC scan speed? Commit to yes or no.
Common Belief:Timer accumulated values always count time perfectly, independent of PLC scan speed or program load.
Tap to reveal reality
Reality:Timer accuracy depends on the PLC scan cycle; slow or interrupted scans can cause timing errors.
Why it matters:Ignoring scan time effects can lead to unexpected delays or premature timer completions in real systems.
Quick: Is the preset value changed when resetting a timer? Commit to yes or no.
Common Belief:Resetting a timer clears both the accumulated and preset values.
Tap to reveal reality
Reality:Resetting only clears the accumulated value; the preset remains unchanged until explicitly modified.
Why it matters:Misunderstanding this can cause timers to lose their intended timing settings unexpectedly.
Expert Zone
1
Timers rely on the PLC scan cycle, so understanding scan timing is crucial for precise control in fast or complex systems.
2
Some PLCs allow fractional preset values or different time bases, which can affect how accumulated values increment and should be carefully configured.
3
Stacking or cascading timers requires careful management of accumulated values and resets to avoid timing drift or overlap.
When NOT to use
Timers with preset and accumulated values are not suitable for ultra-high precision timing or hardware-level timing. In such cases, use dedicated hardware timers or real-time clocks. Also, for event counting rather than timing, counters are more appropriate.
Production Patterns
In production, timers are used for machine delays, safety interlocks, conveyor controls, and process sequencing. Programmers often combine accumulated value monitoring with conditional logic to create flexible, adaptive timing controls that respond to real-time conditions.
Connections
Event-driven programming
Builds-on
Understanding timers helps grasp how events can be scheduled or delayed, a key idea in event-driven systems.
Stopwatch in sports timing
Same pattern
Both use a start, count elapsed time, and compare to a target, showing how timing concepts apply across domains.
Human attention span management
Opposite
While timers count up to a preset to trigger action, managing attention often involves resetting focus before time runs out, highlighting different uses of timing.
Common Pitfalls
#1Assuming the accumulated value resets automatically after timer completion.
Wrong approach:IF Timer1.DN THEN Timer1.ACC = 0; // Reset accumulated manually in logic
Correct approach:Use the timer reset instruction or command: Timer1.RESET = TRUE; // Proper reset
Root cause:Misunderstanding that accumulated values persist until explicitly reset.
#2Using the preset value as a variable that changes during timer operation.
Wrong approach:Timer1.PRE = Timer1.ACC + 10; // Changing preset dynamically inside timer
Correct approach:Set preset once before timer starts and keep it constant during timing.
Root cause:Confusing preset as a fixed target rather than a changing value.
#3Expecting timers to be perfectly accurate regardless of PLC scan time.
Wrong approach:Relying on timers for millisecond precision in a slow scan PLC without adjustments.
Correct approach:Account for scan time or use hardware timers for high precision needs.
Root cause:Ignoring the impact of scan cycle timing on accumulated values.
Key Takeaways
Timer preset is the target time set before the timer starts, while the accumulated value tracks elapsed time during operation.
The accumulated value does not reset automatically; it holds its count until the timer is explicitly reset.
Timers operate based on the PLC scan cycle, so timing accuracy depends on scan speed and program load.
Each timer has independent preset and accumulated values, allowing multiple timers to run simultaneously without interference.
Understanding how to use and reset these values correctly is essential for reliable and precise automation control.

Practice

(1/5)
1. What does the preset value of a timer represent in PLC programming?
easy
A. The number of times the timer has been reset
B. The current time counted by the timer
C. The total time the timer should count before activating
D. The delay before the timer starts counting

Solution

  1. Step 1: Understand timer preset meaning

    The preset value is the target time set for the timer to reach before it triggers.
  2. Step 2: Differentiate from accumulated value

    The accumulated value shows elapsed time, not the target time.
  3. Final Answer:

    The total time the timer should count before activating -> Option C
  4. Quick Check:

    Preset = target time [OK]
Hint: Preset is the goal time, accumulated is progress [OK]
Common Mistakes:
  • Confusing preset with accumulated value
  • Thinking preset changes during timing
  • Assuming preset is a delay before start
2. Which of the following is the correct way to set a timer's preset value to 5000 milliseconds in a typical PLC timer instruction?
easy
A. TIMER.PRESET = 5000
B. TIMER.ACC = 5000
C. TIMER.SET = 5000
D. TIMER.TIME = 5000

Solution

  1. Step 1: Identify correct property for preset

    In PLC timers, the preset value is usually set with the property named 'PRESET'.
  2. Step 2: Check other options

    'ACC' is for accumulated time, 'SET' and 'TIME' are not standard properties for preset.
  3. Final Answer:

    TIMER.PRESET = 5000 -> Option A
  4. Quick Check:

    Preset set with .PRESET property [OK]
Hint: Preset uses .PRESET, accumulated uses .ACC [OK]
Common Mistakes:
  • Using .ACC to set preset
  • Using non-standard property names
  • Confusing preset with timer start command
3. Given the following timer status after running:
TIMER.PRESET = 10000
TIMER.ACC = 7500
What is the timer's current state?
medium
A. Timer has finished counting and is done
B. Timer is paused at 7500 milliseconds
C. Timer is reset and not started
D. Timer is still counting and not done

Solution

  1. Step 1: Compare accumulated and preset values

    The accumulated value (7500) is less than the preset (10000), so the timer has not reached its target.
  2. Step 2: Determine timer state

    Since accumulated is less than preset, the timer is still counting and not done.
  3. Final Answer:

    Timer is still counting and not done -> Option D
  4. Quick Check:

    ACC < PRESET means timer running [OK]
Hint: If ACC < PRESET, timer is running [OK]
Common Mistakes:
  • Assuming timer is done when ACC < PRESET
  • Confusing paused with running
  • Thinking reset means ACC is non-zero
4. A timer's accumulated value never increases even though the timer is enabled. Which is the most likely cause?
medium
A. The preset value is set to zero
B. The timer is not enabled or triggered properly
C. The accumulated value is manually reset continuously
D. The timer's accumulated value is greater than preset

Solution

  1. Step 1: Understand timer behavior when enabled

    The accumulated value increases only when the timer is enabled and counting.
  2. Step 2: Analyze causes for no increase

    If the timer is not enabled or triggered, the accumulated value stays the same.
  3. Final Answer:

    The timer is not enabled or triggered properly -> Option B
  4. Quick Check:

    Timer must be enabled to accumulate time [OK]
Hint: Timer must be enabled to increase ACC [OK]
Common Mistakes:
  • Assuming preset zero stops accumulation
  • Ignoring timer enable condition
  • Thinking ACC resets automatically
5. You want a process to run exactly 15 seconds after a start signal. Which timer setup ensures the process starts only after 15 seconds have fully elapsed?
hard
A. Set TIMER.PRESET = 15000 and start process when TIMER.ACC >= TIMER.PRESET
B. Set TIMER.PRESET = 15000 and start process immediately when timer starts
C. Set TIMER.PRESET = 15000 and start process when TIMER.ACC = 0
D. Set TIMER.PRESET = 15000 and start process when TIMER.ACC < TIMER.PRESET

Solution

  1. Step 1: Understand timing requirement

    The process must start only after 15 seconds have fully passed.
  2. Step 2: Use timer values to control start

    Starting the process when accumulated time is equal or greater than preset ensures 15 seconds elapsed.
  3. Final Answer:

    Set TIMER.PRESET = 15000 and start process when TIMER.ACC >= TIMER.PRESET -> Option A
  4. Quick Check:

    Start after ACC >= PRESET for exact delay [OK]
Hint: Start process only when ACC reaches preset [OK]
Common Mistakes:
  • Starting process immediately on timer start
  • Starting before accumulated time reaches preset
  • Using ACC = 0 as start condition
Recommended

Ready to prove it?

Pass the test and this pattern moves unknown strong while earning +1 Grip toward your certificate.

10 questions~5 mineasy hard