Configuring CLICK PLC Pump Rotation with a Sequenced Counter

Brian Holt7 min read
AutomationDirectOther TopicPLC Programming
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

The CLICK C0-01DD1-D bench program alternates two pumps, and the next design needs to support more pumps without changing which pump is currently running when the rotation counter resets. Keep the running-pump selection separate from the counter used to choose the next pump; transfer operation only after the next pump is confirmed online.

Keep the running-pump selection when resetting the counter

The risky quick fix is to reset the counter that also directly selects the running pump. A reset can change the compared value immediately, so the PLC may select another pump before that pump is ready. A counter is useful for tracking rotation position, but it should not be the sole record of the pump that owns the run command.

Use separate values for the active pump and the next pump candidate. The active selection controls the current run command. The candidate identifies the pump to start at the next rotation. Reset or wrap the rotation counter without rewriting the active selection; update the active selection only after the handoff conditions are met.

  • Temporary restore: if a counter reset currently interrupts the running pump, restore the known-good two-pump program and test it on the bench before returning it to service.
  • Permanent repair: separate the counter, candidate selection, and active selection, then test the complete handoff and reset behavior.

Check: With one pump running, reset the rotation counter under controlled test conditions. Confirm the active pump command does not change. Continue only when that selection is independent of the reset.

Separate the rotation event from the selected pump

A 12-hour alternation request is an event that advances the rotation position; it is not itself a pump command. Generate one rotation request when the interval expires, then let selection and handoff logic process that request. Do not let a continuously true timer-done condition advance a counter repeatedly on successive PLC scans.

  1. Use the project’s timer logic to identify that the 12-hour interval has elapsed.
  2. Convert the elapsed condition into a single advance request, using the PLC programming method supported by the installed CLICK software.
  3. Consume or clear that request after the candidate selection has been calculated, so it cannot trigger repeated advances.

The timer’s exact instruction, time base, and retained behavior depend on the project configuration. Check the CLICK programming environment and the running program rather than assuming a particular timer preset or power-cycle behavior. Decide separately whether a restart should retain the active pump and rotation position or initialize them; make that choice consistent with the process requirements.

Check: Monitor the timer-done condition, advance request, and counter. Confirm one interval expiration produces one candidate advance, not a scan-by-scan count-up.

Number pump positions from 1 through the installed count

For a counter-and-compare design, define which counter values correspond to physical pumps and use the same convention in every comparison. The two-pump example was changed to compare values 1 and 2 with a counter count of 2, rather than comparing 0 and 1. That 1-based convention is straightforward to extend: for N pumps, assign positions 1 through N.

Calculate the next candidate as the next position after the current rotation position. When the position reaches N, wrap the candidate to 1. Keep the counter’s configured count, the compare values, and the number of installed pumps aligned. A mismatch can leave a position with no matching compare rung or skip a pump.

Rotation position Candidate decision Expected result
N Wrap to position 1 Return to the first numbered pump

Keep zero out of the valid range if using this 1-based mapping. If the program initializes or resets the counter to zero, handle that state explicitly before comparing it with pump positions; otherwise no pump may match. Do not mix zero-based and one-based comparisons across rungs.

Check: Step through each counter position, including the wrap from N to 1, and confirm exactly one candidate pump is selected at each valid position.

Build the candidate without changing the active pump

Use the compare result to identify the next pump, but do not use that result alone to switch the live output. The candidate state is a request to start another pump; the active state continues to identify the pump that must remain available while the candidate starts.

  1. On a rotation request, calculate the next valid position and set the corresponding candidate selection.
  2. Command the candidate pump to start, subject to the project’s permissives and interlocks.
  3. Keep the active pump selected while the candidate is starting.
  4. When feedback confirms the candidate is online, transfer the active selection to that pump and release the previous pump according to the system sequence.
  5. If the candidate does not come online, keep the active selection unchanged and raise or retain a fault indication for operator action.

Use the actual run feedback and fault conditions available in the installation to define “online”; do not treat a start command alone as proof that a pump started. Decide how the controller handles a failed candidate, an unavailable pump, or a fault during the handoff. The project must not advance the active selection past a pump that never confirmed operation.

Check: Simulate a candidate that starts successfully and one that fails to confirm online. Verify that only the successful case transfers the active selection and stops the previous pump.

Keep fault bits and HMI handling project-specific

A fault-word approach can combine multiple fault conditions into one indication: set individual fault bits, detect whether the word is nonzero, and provide a reset path. In the example, the Allen-Bradley logic used a not-equal comparison against zero and a move operation for HMI display. Do not copy those addresses or instructions into a CLICK program; they are specific to a different PLC platform.

The CLICK project discussion identifies bit-to-word and word-to-bit handling as less flexible than in some other PLCs and points to Copy/pack handling as an approach under consideration. Confirm the exact instruction behavior and operand sizes in the CLICK programming environment. Keep pump-selection state separate from fault storage so clearing faults cannot accidentally reset the active pump or rotation position.

  • Assign a distinct fault bit for each condition the program needs to report.
  • Aggregate faults for a summary indication only after verifying how the selected CLICK instructions map bits and words.
  • Clear only the intended fault data on a reset command; preserve live pump state unless the sequence explicitly requires an initialization.
  • Display meaningful fault information on the HMI using the project’s verified mapping, rather than assuming an Allen-Bradley-style word move will transfer directly.

Check: Set and clear each test fault, confirm the summary indication follows the intended mapping, and verify that a fault reset leaves the active pump selection unchanged.

Test the complete rotation and recovery sequence

Bench-test the sequence before enabling unattended alternation. Test states and transitions, not only the normal counter increment; most selection errors appear at initialization, wraparound, reset, or failed-start handling.

  1. Set the active pump and rotation position to the intended initial values. Confirm that the active output matches the physical pump mapping.
  2. Trigger one rotation request and confirm the next position selects the expected candidate.
  3. Confirm the candidate online feedback and verify the active selection transfers only after that confirmation.
  4. Repeat through every pump position and verify the final position wraps to 1.
  5. Reset the counter while a pump is active. Confirm the live selection remains unchanged and that the next valid rotation is still deterministic.
  6. Test candidate failure, unavailable-pump conditions, and fault reset. Confirm these conditions do not produce an unconfirmed handoff.
  7. Verify the actual 12-hour interval behavior in the configured program, including what the sequence does after a controller restart.

Use monitored values for timer status, advance request, counter position, candidate selection, active selection, output command, feedback, and fault state. Match each value to the intended state transition. Do not accept a successful bench cycle as proof of the installed wiring or feedback mapping; verify those separately during commissioning.

Check: Release the sequence for operation only when each pump is selected once per full rotation, wraparound works, the previous pump stays selected until the next confirms online, and reset or fault handling cannot silently change the active selection.

FAQ: CLICK PLC pump rotation

How do I alternate more than two pumps with a CLICK PLC counter?

Assign pump positions from 1 through the number of installed pumps, compare the candidate position to those values, and wrap from the last position to 1. Test that every valid position selects exactly one pump.

How do I reset the pump rotation counter without stopping the running pump?

Keep the active-pump selection separate from the rotation counter and candidate selection. Reset or wrap the counter without changing the active selection; transfer the active selection only after the next pump confirms online.

When should I stop and escalate a CLICK pump alternation problem?

Stop commissioning if the counter mapping, output mapping, or online feedback cannot be verified, or if a reset can change the active pump unexpectedly. Do not bypass interlocks to force a handoff; contact AutomationDirect official support or a qualified controls engineer with the program and observed values.

Back to blog