Bird
Raised Fist0
PLC Programmingscripting~10 mins

Timer preset and accumulated values in PLC Programming - Step-by-Step Execution

Choose your learning style10 modes available
Concept Flow - Timer preset and accumulated values
Start Timer
↓
Timer Running
↓
Accumulated Value Increases
↓
Check: Accumulated >= Preset?
No→Continue Timing
Yes↓
Timer Done
↓
Reset or Stop Timer
The timer starts counting up its accumulated value until it reaches the preset value, then it signals done.
Execution Sample
PLC Programming
Timer.Preset = 5
Timer.Accum = 0
while Timer.Accum < Timer.Preset:
    Timer.Accum += 1
Timer.Done = True
This code simulates a timer counting up from 0 to its preset value of 5, then sets Done to True.
Execution Table
StepTimer.PresetTimer.AccumCondition (Accum < Preset)ActionTimer.Done
1500 < 5 = TrueIncrement Accum to 1False
2511 < 5 = TrueIncrement Accum to 2False
3522 < 5 = TrueIncrement Accum to 3False
4533 < 5 = TrueIncrement Accum to 4False
5544 < 5 = TrueIncrement Accum to 5False
6555 < 5 = FalseSet Timer.Done = TrueTrue
💡 Timer accum reaches preset 5, condition 5 < 5 is False, timer done is set.
Variable Tracker
VariableStartAfter 1After 2After 3After 4After 5Final
Timer.Preset5555555
Timer.Accum0123455
Timer.DoneFalseFalseFalseFalseFalseFalseTrue
Key Moments - 2 Insights
Why does the timer stop incrementing when accumulated value equals preset?
Because the condition 'Accum < Preset' becomes false at step 6 (see execution_table row 6), so the loop stops and Timer.Done is set.
What happens if the accumulated value starts higher than the preset?
The condition 'Accum < Preset' is false immediately, so the timer sets Done to True without incrementing (not shown in table but implied).
Visual Quiz - 3 Questions
Test your understanding
Look at the execution table, what is Timer.Accum at step 4?
A4
B2
C3
D5
💡 Hint
Check the 'Timer.Accum' column in execution_table row 4.
At which step does the condition 'Accum < Preset' become false?
AStep 6
BStep 4
CStep 5
DStep 3
💡 Hint
Look at the 'Condition' column in execution_table where it changes to false.
If Timer.Preset was set to 3 instead of 5, at which step would Timer.Done become true?
AStep 3
BStep 4
CStep 5
DStep 6
💡 Hint
Compare how the condition depends on Timer.Preset in execution_table.
Concept Snapshot
Timer preset sets the target count.
Accumulated value counts up from zero.
Timer runs while Accum < Preset.
When Accum reaches Preset, Timer.Done is True.
Resetting Accum restarts timing.
Full Transcript
This visual execution shows how a timer in PLC programming counts up its accumulated value until it reaches the preset value. The timer starts with Accum at zero and Preset set to 5. Each step increments Accum by one while checking if Accum is less than Preset. When Accum equals Preset, the condition fails, and the timer sets Done to True, signaling the timer has finished. Variables Timer.Preset, Timer.Accum, and Timer.Done change step-by-step, clearly showing the timer's state. Key moments clarify why the timer stops and what happens if Accum starts above Preset. The quiz tests understanding of variable values and condition changes during execution.

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