Reset Timer and Counter Logic in SLC 500 Resolving Run/Stop

Mark Townsend10 min read
Allen-BradleySLC 500Troubleshooting
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

1. Problem Summary

A Urea Simulation ladder program written for the Allen-Bradley SLC 500 family exhibits three intertwined symptoms when executed in RSLogix 500 Emulate:

  1. The System Run relay (B3:0/0) never energizes, so downstream outputs (Pump, Inlet Water Solenoid, Flashing Light) remain OFF.
  2. Output bits "twitch" — they cycle ON/OFF too rapidly to be useful — when the simulation is driven from real timers.
  3. The Temp-Probe counter C5:0 cannot be reset back to zero after it has counted to its preset, so the System Run latches OFF permanently and the operator has no recovery path.

Each symptom traces back to a specific ladder-logic mistake that is common when the programmer is still learning the SLC 500 instruction set. The fixes below are drawn from the SLC 500 Instruction Set Reference and the RSLogix 500 programming manual.

2. Root Cause Analysis

2.1 Sub-second Time Base Causing Output Twitching

The original program used 0.01 s (10 ms) and 0.001 s (1 ms) time bases for TON, TOF, and RTO instructions. The SLC 500 timer scans the accumulator every program sweep; with a 1 ms base, the timer completes its preset in a few scans and the output (OTE) follows the DN bit at scan speed — appearing as high-frequency chatter on a human-machine interface or on the emulator's output panel.

Field-proven rule: never use a time base shorter than the operator's reaction time or the scan period × 10. For a Urea Simulation that a human is supposed to observe, use a 1.0 s base with presets of 2, 3, 4, or 5 seconds.

2.2 Maintained Selector Switch vs. 3-Wire Control

A maintained-contact Run/Stop selector wired to I:0/1 leaves the system in RUN after a power outage. The PLC cannot de-energize an input; it can only drop an output coil. A safer topology is a 3-wire control circuit using two momentary pushbuttons and a seal-in (latch) auxiliary from the System Run relay.

2.3 Counter Reset Coupled to the Same Run Bit

Counter C5:0 was being reset on Rung 9 by an XIO of I:0/1. Because the same I:0/1 input both starts the system (Rung 0) and is the only path to reset C5:0, opening the selector is the only way to recover. That is logically correct, but the program never made it visible to the operator — the B3:0/0 XIC bit was left in Rung 3, breaking the very first rung of the seal-in path.

3. Affected Hardware and Firmware

Component Catalog / Firmware Relevance
Processor 1747-L531, L532, L533, L541, L542, L543 (SLC 5/03, 5/04, 5/05) All support RSLogix 500 v9+ and the addressing shown
Digital Input module 1746-IB16 (sinking) or 1746-IV16 (sourcing) Slot 0 — supplies I:0 word
Digital Output module 1746-OB16 (sinking) or 1746-OV16 (sourcing) Slot 1 — supplies O:0 word
RSLogix 500 Version 9.00.00 (CPR 9) or later, last release v20.01.00 Editor used to build the Urea Simulation
RSLogix Emulate 500 Version 9.00.00 or later Used to run the program offline (RSEmulate-500)
RSLinx Version 4.x or later DH+/Ethernet/IP gateway to the emulator
Status file bit S:4/8 1 s free-running clock (slower than S:4/6 at 50 ms) Required for visible flasher timing

For modern replacements, see the Micro800 family and the Studio 5000 Logix Designer toolchain — the ladder-logic patterns below translate 1:1 to MicroLogix and CompactLogix with the same I/O and timer file structure.

4. Addressing Convention Used in the Simulation

Address Type Function
I:0/0 Input Not used (spare)
I:0/1 Input Run/Stop selector (maintained) or Start pushbutton (3-wire)
I:0/2 Input Dissolver Overflow Switch (XIC)
I:0/3 Input Inlet Flow Switch (XIC, must close within 4 s)
I:0/5 Input Outside Tank High Water Level Switch (XIO)
I:0/6 Input Low Temp switch (XIC, increments C5:0)
I:0/7 Input Water Low Level Switch (XIC, "tank not empty")
I:1/0 Input Alternate Run/Stop selector (slot 1)
I:1/3 Input Manual reset pushbutton for T4:1 (added)
O:0/3 Output Water Level Empty Indicator Light (XIO in Rung 0)
O:0/5 Output Inlet Water Solenoid Valve
O:0/6 Output Flashing Light (O:0/5 substitute during fault)
B3:0/0 Binary System Run seal-in bit
T4:1 Timer (TON) 4 s "inlet-flow proof" window
T4:4 Timer (TON) 3 s pump stop delay after Interlock 5
C5:0 Counter (CTU) Low-Temp event counter, preset 5
S:4/8 Status 1.0 s free-running clock (flasher source)

5. Ladder-Logic Corrections

5.1 Rung 0 — System Run Seal-In

Insert an XIO of the counter done bit (C5:0/DN) so that when the counter reaches preset 5, the seal-in drops out cleanly. Remove any dependency on the same O:0/3 contact used downstream to fill the tank (a "Mexican standoff" occurs when the fill command requires the run bit and the run bit requires the fill confirmation).

|  I:0/1  I:0/7  C5:0/DN  B3:0/0      B3:0/0  |
|---] [---] [-------]/[---+---( L )---|
|                            |          |
|                       (seal-in aux)   |
+--------------------------------------------+

Use an OTL (Output Latch) for B3:0/0 if you prefer non-retentive behavior on power-down; the seal-in branch above is retentive (B3 stays set through a power cycle), which is why a 3-wire control circuit is the preferred topology for a Urea tank.

5.2 Rung 1 — Pump and Inlet Solenoid Start

Drive O:0/5 (Inlet Water Solenoid) directly from B3:0/0 XIC, paralleled with T4:1/DN XIO and I:0/3 XIC. The XIO of T4:1/DN drops the solenoid exactly 4 s after Run is asserted if the inlet-flow switch has not closed — this is the proof window.

5.3 Rung 3 — Remove the B3:0/0 XIC

If Rung 3 contains a downstream enable that is gated by B3:0/0 XIC, and Rung 3 also drives a contact that is required elsewhere in the seal-in path, the system will never latch. Remove the B3:0/0 XIC from Rung 3 so that the rung can evaluate true on its own merits and provide the first half of the seal-in current.

5.4 Rung 8 — Interlock 5 and Visible Flasher

Change the status-bit source from S:4/6 (50 ms free-running) to S:4/8 (1.0 s free-running). The DN bit of a 50 ms clock alternates every 25 ms and is invisible to the human eye; the 1 s clock gives a clean 0.5 Hz flash on O:0/6.

5.5 Rung 9 — Counter Reset Path

When the System Run relay drops out (B3:0/0 OFF), reset C5:0 unconditionally by adding an XIO of B3:0/0 driving the RES instruction:

|  B3:0/0          C5:0  |
|---]/[---( RES )------|

This guarantees that any time the operator opens the Run/Stop selector and the System Run relay drops, the counter clears and the next Start command is from a known zero state.

6. 3-Wire Control Circuit Implementation

A 3-wire circuit eliminates the maintained-selector hazard. Wire two momentary pushbuttons and a seal-in auxiliary from B3:0/0:

  1. Normally-closed Stop pushbutton (address I:0/1) — XIO in Rung 0.
  2. Normally-open Start pushbutton (address I:0/2) — XIC in Rung 0.
  3. Seal-in contact from B3:0/0 XIC, wired in parallel with the Start pushbutton.

On a power outage, B3:0/0 clears and the seal-in is broken. Restoration of power does not auto-restart the line; the operator must physically press Start. This is the NFPA 79 and ANSI/ASSE A1264.1 preferred pattern for hazardous-process equipment.

7. Timer and Counter Parameter Selection

Tag Instruction Time Base Preset Accumulator Range Why this value
T4:1 TON 1.0 s 4 0–32767 4 s inlet-flow proof window; long enough for human input simulation
T4:4 TON 1.0 s 3 0–32767 3 s pump coast-down on Interlock 5 trip
T4:5 TON 1.0 s 5 0–32767 5 s dissolver-overflow re-arm (interlock 2)
T4:6 TON 1.0 s 3 0–32767 3 s low-temp re-arm (interlock 6)
C5:0 CTU — 5 -32768 to +32767 Five consecutive low-temp events before System Run trips
Anti-twitch guideline: in RSLogix 500 the smallest time base is 0.001 s (1 ms). For a process the operator must observe, pick a preset ≥ 1 s on a 1.0 s base. The DN bit of a sub-second timer toggles at scan speed and appears as "twitching" on an OTE.

8. RSLogix 500 Emulator Verification Procedure

  1. In RSLogix 500, open the project and choose Comms > System Comms > Workstation Emulator (RSLogix Emulate 500).
  2. Click Download and confirm the Go Online dialog.
  3. Switch the emulated processor from PROG to RUN using the mode selector at the top of the emulator window.
  4. Open a Data Table view with B3, T4, C5, I:0, and O:0 visible side by side.
  5. Step through the run sequence in Single Step mode (F8) to verify each rung transitions to true before you energize the next input.
  6. Confirm the status of each troubleshooting question from the run sequence table below before declaring the program good.

9. Run-Sequence Verification Table

Step Action Expected result Verify in Data Table
1 Close I:0/7 (Water Low Level Switch) Rung 0 evaluates true, B3:0/0 OFF (no Start yet) I:0/7 = 1
2 Pulse I:1/3 to reset T4:1 T4:1.ACC = 0, T4:1.DN = 0 T4:1.ACC resets
3 Close I:0/1 Run/Stop B3:0/0 latches, O:0/5 ON, Pump 1 starts B3:0/0 = 1, O:0/5 = 1
4 Within 4 s, close I:0/3 Inlet Flow T4:1 stops accumulating, T4:1/DN = 1 latched T4:1.ACC stops
5 Close I:0/2 Dissolver Overflow O:0/5 OFF for 5 s, Pump keeps running T4:5 timing
6 Close I:0/5 Outside Tank High O:0/6 flashes at 0.5 Hz (S:4/8) O:0/6 toggles 1 s ON / 1 s OFF
7 Pulse I:0/6 Low Temp 5 times C5:0 reaches preset 5, B3:0/0 drops C5:0.ACC = 5, C5:0/DN = 1
8 Open I:0/1 Run/Stop B3:0/0 OFF, C5:0 resets via XIO of B3:0/0 C5:0.ACC = 0

10. Troubleshooting Matrix

Symptom Likely cause Fix
B3:0/0 never latches Seal-in rung broken; B3:0/0 XIC left in a downstream rung; I:0/7 not closed Remove B3:0/0 from Rung 3, close I:0/7, verify Rung 0 inputs in Data Table
Output "twitching" 0.001 s or 0.01 s time base on a TON/TOF driving an OTE Switch to 1.0 s base; raise preset to 2–5 s
Counter never resets RES instruction gated by C5:0/DN itself; no XIO of B3:0/0 Drive RES from an XIO of B3:0/0, not from C5:0/DN
System restarts after power cycle Maintained selector on I:0/1, B3 retentive Convert to 3-wire (NC Stop + NO Start + seal-in)
Flasher invisible S:4/6 (50 ms) used as flasher source Change to S:4/8 (1.0 s free-running clock)
Timer DN bit drops immediately RES instruction on the timer connected to its own DN Remove the RES branch; latch the consuming coil with OTL/OTU
Cannot get Rung 2 output ON JSR missing or SBR return address wrong Verify subroutines, ladder file order, and JMP destinations

11. Field Commissioning Notes

  • Always run the simulation with Single Step (F8) the first time to see scan-by-scan which rung is failing. The Data Table view updates per sweep, so a momentary ON will be captured.
  • Use Custom Data Monitor to put B3:0/0, T4:1.ACC, and C5:0.ACC on a single screen.
  • For long-term reliability on a real Urea process, replace the on/off selector with the 3-wire circuit and add an E-stop hardwired in series with the Stop pushbutton (per NFPA 79 Electrical Standard for Industrial Machinery).
  • When migrating the program to a MicroLogix 1400 (1766-L32BWA) or CompactLogix 5380 (5069-L320ER), the B3/T4/C5 files map directly into tag-based memory; the ladder diagrams above can be imported with RSLogix 500 to Studio 5000 Translator.

12. FAQ

Why does my SLC 500 output twitch on a 0.01 s timer base?

The DN bit toggles at scan speed, faster than the operator can see. Switch the time base to 1.0 s and raise the preset to 2–5 s so each output transition is at least one second long.

How do I reset a counter in SLC 500 after it reaches the preset?

Use a RES (Reset) instruction driven by an XIO of the System Run bit (B3:0/0), not by the counter's own DN bit. When the System Run drops, the RES fires and C5:0.ACC returns to zero.

Why does my Urea Simulation never start in RSLogix 500 Emulate?

Three checks: confirm I:0/7 (Water Low) is closed, confirm I:0/1 (Run) is closed, and confirm Rung 3 does not contain a B3:0/0 XIC that breaks the seal-in path. Open a Data Table view to see exactly which instruction is evaluating false.

What is the difference between S:4/6 and S:4/8 in an SLC 500?

S:4/6 is a 50 ms free-running clock and S:4/8 is a 1.0 s free-running clock. Use S:4/8 to drive a flasher that is visible to a human, and S:4/6 only for high-speed logic where 50 ms resolution matters.

Should I use a maintained Run/Stop switch or a 3-wire pushbutton circuit on a Urea tank?

Use a 3-wire circuit with a normally-closed Stop and normally-open Start pushbutton plus a seal-in from the System Run relay. A maintained selector can re-start the process unattended after a power outage, which is unsafe on a chemical-dissolving process.

Back to blog