A Click PLC timer or counter in a subroutine may keep its accumulated value when the main program stops calling that subroutine. A reset rung inside the skipped routine cannot execute, so first check whether the routine runs when the reset condition is true; do not treat a missing call as a reset.
Check whether the main program calls the reset routine
Monitor the condition that enables the subroutine call and the reset condition during the machine state that should clear the value. Record whether each is true and whether the routine is actually reached in that scan.
| Reading | Meaning | Next check |
|---|---|---|
| Call condition is false | The subroutine is skipped. Its timer, counter, coils, and reset logic are not being evaluated there. | Determine whether the routine is intentionally disabled; then check the device’s reset behavior. |
| Call is true; reset condition is false | The reset rung has no reason to execute. | Trace the input or state logic that should make reset true. |
| Call and reset condition are both true | The reset rung should be evaluated if it is in the executed routine path. | Monitor the reset instruction and the timer/counter value in the next scan. |
Do not infer routine execution from the state of an output or from a condition being true elsewhere in the program. Verify the call path itself. A reset contact located in a routine that is not called cannot act.
Read the timer or counter value and instruction behavior
Monitor the actual timer/counter accumulator or current value, its done/status bit, and the rung conditions that control it. Check the instruction type and its device documentation: timers and counters can have different retention and reset semantics. The displayed status bit alone may not tell you whether the stored count or elapsed value has cleared.
If the value holds while the routine is skipped, the first branch points to routine execution, not a failed reset instruction. If the value changes but the machine sequence does not, follow the logic that consumes the value or status bit. If the reset rung executes but the value remains, confirm that the rung addresses the same timer/counter instance being monitored and that its reset condition persists long enough to be evaluated.
Trace the reset condition before changing the program
Follow the reset condition backward from the reset rung to its source: operator command, process input, state bit, or another routine’s logic. Watch the source and each intermediate condition online while reproducing the sequence. A reset request that pulses while the receiving subroutine is skipped can be missed; the condition may be gone by the next call.
- Identify the exact timer/counter element and reset rung used by the sequence.
- Monitor the subroutine call, reset condition, reset rung, accumulated value, and relevant done/status bit together.
- Reproduce the state transition that is supposed to clear the value and note which condition changes first.
- Compare the observed order with the program’s call order and with the instruction’s documented reset behavior.
If the reset request is momentary and the routine is not running at that moment, the program needs a design change: keep or latch the reset request until the routine can act on it, or execute the reset logic from a location that runs in the required state. Choose only after confirming the intended sequence and safe machine state.
Choose a reset path that executes in the required state
The wrong quick fix is to remove the subroutine call or assume that not calling it clears its devices. That does not execute reset logic. Another risky shortcut is to reset an entire set of devices without confirming which sequence owns them; it can erase a value another rung still needs.
For a temporary restore, use the PLC’s documented online reset method only when the machine is in a safe, known state and the correct timer/counter has been identified. Confirm the value clears and verify the sequence before resuming automatic operation. A manual reset restores the current state; it does not fix a reset condition that can be missed again.
For the permanent repair, place the reset logic where it will execute during the intended reset state, or retain the request until the target routine executes. Preserve the existing sequence interlocks and reset only the intended elements. If the routine is expected to run continuously, correct the call condition rather than masking the symptom with extra resets.
Verify the repair through a complete sequence
Test the exact transition that previously failed. Watch the call condition, reset condition, reset rung, accumulated value, and done/status bit through the full sequence, including the transition into and out of the subroutine’s skipped state.
- Confirm the reset request is present when reset logic executes.
- Confirm the intended value clears according to the instruction documentation.
- Confirm unrelated timers, counters, and sequence state remain unchanged.
- Run the sequence again to verify a short reset request is not lost while the routine is skipped.
Do not return the machine to production if the value does not clear predictably, if the routine call path is unclear, or if resetting it changes another sequence’s behavior. Preserve the project copy and record the monitored state and program change for review.
FAQ
How do I reset a Click PLC timer inside a subroutine?
Make sure the subroutine is called while the reset condition is true, then execute the timer’s documented reset instruction for the correct timer element. Verify its accumulated value and status online.
Why does my PLC counter keep its value when a subroutine is skipped?
Skipping a subroutine skips its instructions, including reset logic. Not calling the routine is not itself a reset command.
How can I tell whether the reset rung is executing?
Monitor the subroutine call condition, reset condition, and reset rung online while reproducing the machine state. Also monitor the accumulator, not only the done/status bit.
How do I handle a reset pulse while the subroutine is not called?
Retain the reset request until the routine executes, or move reset logic to a location that executes in the required state. Confirm the sequence design before changing where or when a reset occurs.
Should I avoid subroutines when learning Click PLC programming?
Use a subroutine when its call conditions and execution are clear. For a reset problem, first prove when the routine runs and whether the reset rung can execute.
Stop and consult AutomationDirect official support or the applicable Click PLC documentation if the instruction’s reset behavior is unclear, the monitored value disagrees with the documented operation, or the change could affect machine safety. Do not resume automatic operation until the reset path and full sequence test pass.