Bird
Raised Fist0
PLC Programmingscripting~20 mins

Counter preset and reset in PLC Programming - Practice Problems & Coding Challenges

Choose your learning style10 modes available
Challenge - 5 Problems
🎖️
Counter Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate
2:00remaining
Output of a preset counter after input pulses
Given a counter with a preset value of 5 and an initial count of 0, what will be the counter value after 3 input pulses without reset?
PLC Programming
Preset = 5
Count = 0
Input pulses = 3
Reset = False

For each pulse:
  Count = Count + 1
  If Count >= Preset:
    Counter Done = True
  Else:
    Counter Done = False

Output Count
A5
B3
C0
D8
Attempts:
2 left
💡 Hint
Count increases by one for each pulse until it reaches the preset.
💻 Command Output
intermediate
2:00remaining
Counter value after reset is triggered
A counter has a preset of 10 and current count of 7. If a reset signal is activated, what will be the counter value immediately after reset?
PLC Programming
Preset = 10
Count = 7
Reset = True

If Reset == True:
  Count = 0

Output Count
A7
B10
C1
D0
Attempts:
2 left
💡 Hint
Reset sets the counter back to zero.
🧠 Conceptual
advanced
2:00remaining
Effect of preset value on counter done signal
If a counter has a preset value of 8 and counts input pulses, at which count value does the 'done' signal become true?
AWhen count equals 8
BWhen count is less than 8
CWhen count is greater than 8
DWhen count equals 0
Attempts:
2 left
💡 Hint
The done signal activates exactly when the count reaches the preset.
💻 Command Output
advanced
2:00remaining
Counter behavior with preset and multiple resets
A counter has a preset of 4. It receives 2 pulses, then a reset, then 3 pulses. What is the final count?
PLC Programming
Preset = 4
Count = 0

# 2 pulses
Count += 2

# Reset
Count = 0

# 3 pulses
Count += 3

Output Count
A3
B5
C0
D4
Attempts:
2 left
💡 Hint
Reset clears the count before the last pulses.
🚀 Application
expert
3:00remaining
Determining counter output after complex pulse and reset sequence
A counter with preset 6 starts at 0. It receives pulses in this order: 3 pulses, reset, 2 pulses, reset, 6 pulses. What is the final count and is the done signal true or false?
PLC Programming
Preset = 6
Count = 0
Done = False

# 3 pulses
Count += 3

# Reset
Count = 0

# 2 pulses
Count += 2

# Reset
Count = 0

# 6 pulses
Count += 6

Done = (Count >= Preset)

Output Count and Done
ACount = 6, Done = False
BCount = 5, Done = False
CCount = 6, Done = True
DCount = 0, Done = False
Attempts:
2 left
💡 Hint
Reset clears count before next pulses; done is true if count >= preset.

Practice

(1/5)
1. What does the preset value in a PLC counter do?
easy
A. It sets the target count the counter must reach.
B. It resets the counter to zero.
C. It increments the counter by one.
D. It pauses the counter from counting.

Solution

  1. Step 1: Understand the role of preset in counters

    The preset value defines the goal number the counter counts up to before triggering an action.
  2. Step 2: Differentiate preset from reset and increment

    Reset clears the count, increment adds to count, but preset sets the target number.
  3. Final Answer:

    It sets the target count the counter must reach. -> Option A
  4. Quick Check:

    Preset = target count [OK]
Hint: Preset is the goal number, reset clears count [OK]
Common Mistakes:
  • Confusing preset with reset
  • Thinking preset increments count
  • Assuming preset pauses counting
2. Which of the following is the correct way to reset a counter named CNT1 in ladder logic?
easy
A. Use RES CNT1 instruction.
B. Use PRE CNT1 instruction.
C. Use INC CNT1 instruction.
D. Use SET CNT1 instruction.

Solution

  1. Step 1: Identify reset instruction syntax

    In PLC ladder logic, RES is the standard instruction to reset a counter.
  2. Step 2: Confirm other instructions meanings

    PRE sets preset, INC increments, SET sets bits, not reset counter.
  3. Final Answer:

    Use RES CNT1 instruction. -> Option A
  4. Quick Check:

    Reset = RES instruction [OK]
Hint: Reset uses RES instruction, not PRE or INC [OK]
Common Mistakes:
  • Using PRE instead of RES to reset
  • Confusing increment with reset
  • Using SET which is for bits, not counters
3. Given a counter with preset 5 and current count 3, what will be the count after two increments?
medium
A. 4
B. 5
C. 3
D. 6

Solution

  1. Step 1: Calculate count after increments

    Starting count is 3, two increments add 2, so 3 + 2 = 5.
  2. Step 2: Compare count to preset

    The count reaches the preset value 5 after two increments.
  3. Final Answer:

    5 -> Option B
  4. Quick Check:

    3 + 2 = 5 [OK]
Hint: Add increments to current count, compare to preset [OK]
Common Mistakes:
  • Not adding increments correctly
  • Confusing preset with current count
  • Assuming count resets automatically
4. A PLC counter is not resetting when the reset button is pressed. Which of these is the most likely cause?
medium
A. The preset value is set too high.
B. The increment instruction is used instead of reset.
C. The counter is already at zero.
D. The reset instruction is missing or not connected to the reset button.

Solution

  1. Step 1: Check reset wiring and instruction

    If the reset button does not trigger reset, likely the reset instruction is missing or not linked to the button.
  2. Step 2: Eliminate other causes

    Preset value or current count does not prevent reset; increment instruction wrong but would not cause no reset on button press.
  3. Final Answer:

    The reset instruction is missing or not connected to the reset button. -> Option D
  4. Quick Check:

    Reset fails if instruction missing or unlinked [OK]
Hint: Reset needs instruction linked to button [OK]
Common Mistakes:
  • Blaming preset for reset failure
  • Ignoring wiring or logic connection
  • Confusing increment with reset
5. You want a counter to count up to 10, then reset automatically and start counting again from zero. Which ladder logic setup achieves this?
hard
A. Set preset to 0, increment counter indefinitely.
B. Set preset to 10, reset counter manually with a button.
C. Set preset to 10, use counter done bit to trigger reset instruction.
D. Use reset instruction before counting starts only.

Solution

  1. Step 1: Understand automatic reset logic

    To reset automatically, use the counter's done bit (which is true when count reaches preset) to trigger the reset instruction.
  2. Step 2: Evaluate other options

    Manual reset requires user action, preset 0 is invalid for counting, resetting only before counting won't loop.
  3. Final Answer:

    Set preset to 10, use counter done bit to trigger reset instruction. -> Option C
  4. Quick Check:

    Done bit triggers reset for auto count loop [OK]
Hint: Use done bit to auto reset counter [OK]
Common Mistakes:
  • Relying on manual reset for auto counting
  • Setting preset to zero
  • Resetting only once before counting
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