Implementing an alternating two-pump duty cycle in a Siemens LOGO! logic module is a textbook use of the controller's on-delay, pulse-generator, and latch resources. This article builds the exact application described by the source: relay Q1 energizes pump 1 for a configurable run time, drops out, then Q2 energizes pump 2 for the same run time, and the sequence repeats indefinitely while a master enable signal is present. When that enable is removed, the active timer pauses in its current value and the running pump holds until the enable returns. The implementation below targets LOGO! 8 (firmware V8.0 and higher) and is built in LOGO!Soft Comfort V8.x using function block diagrams (FBD).
1. Application Requirements and Behavioural Specification
Before writing any ladder or FBD, lock the behavioural specification. For this duty-cycling application the contract is:
- Input
I1is a maintained master enable (selector switch, level switch contact, or system-run signal). WhenI1 = 1, the alternation runs; whenI1 = 0, the timers pause and outputs drop. - Output
Q1drives the coil of Pump 1 contactor.Q1is energised for a user-defined timeT_run, then de-energised. - Output
Q2drives the coil of Pump 2 contactor.Q2is energised forT_runimmediately afterQ1drops, then de-energised. - Interlock:
Q1andQ2must never be true simultaneously (pump-back interlock). - Pause: removing
I1freezes the active timer's accumulated value (Ta) and keeps the corresponding output in its current state. RestoringI1resumes timing from the frozen value. - First-run preference: on initial power-up with
I1 = 1,Q1shall start first (Pump 1 priority).
2. Prerequisites: Hardware, Firmware, and Software
| Item | Specification | Notes |
|---|---|---|
| LOGO! base module | LOGO! 8 generation (6ED1052-xxx08-0BAx or 6ED1052-xxx08-0BA2 for V8.3) | V8.0 or higher required; older LOGO! 6/7 lack the asynchronous pulse generator block B007 and some edge blocks |
| Power supply variant | 12/24 V RCE, 24 V CE, or 230 V RCE depending on coil voltages | Select by contactor coil voltage |
| Expansion | DM8 / DM16 / AM2 / AQ2 modules as required | Use digital output expansion only if both onboard relays are already committed |
| Programming software | LOGO!Soft Comfort V8.0 - V8.4 | Free download from Siemens support portal |
| Connection | Ethernet (LOGO! 8 base models) or USB cable | LOGO! 8 uses the integrated Ethernet port for programming |
| Firmware | FS:02 or higher on the LOGO! 8 base | Update via LOGO!Soft Comfort if any function block below shows 'invalid' in the editor |
Reference documents: LOGO! 8 system manual (6ED1052-xxx08-0BA1 / -0BA2) and LOGO! 8.4 manual (6ED1052-xxx08-0BA2).
3. LOGO! 8 Timer Function Block Reference
All blocks below are stock LOGO! timer resources, identified by their function block number in the LOGO!Soft Comfort editor (CoL: Function block list).
| Block ID | Name | Symbol | Behaviour | Typical Use Here |
|---|---|---|---|---|
| B001 | On-delay (TON) |
TRG, Ta, T, Q
|
Q goes high T seconds after the trigger input goes high and stays high as long as the trigger remains high |
Time base for Q1 run and Q2 run periods |
| B002 | Off-delay (TOF) |
TRG, R, Ta, T, Q
|
Q follows the trigger but stays high for T seconds after the trigger drops |
Minimum off-time interlock between Q1 and Q2 |
| B003 | On/off delay |
TRG, Ta, TH, TL, Q
|
Combines B001 and B002 in one block | Optional consolidated timing if off-time interlock is built into the run timer |
| B004 | Retentive on-delay |
TRG, R, Ta, T, Q
|
Accumulates Ta even when TRG drops, resets only on R
|
Not required here unless you want a cumulative run counter |
| B005 | Wiping relay (pulse) |
TRG, Ta, T, Q
|
Generates a pulse of width T on the rising edge of TRG |
One-shot trigger when Q1 drops to start Q2 timing |
| B006 | Edge-triggered wiping relay |
TRG, R, Ta, T, Q
|
Retriggerable single pulse on rising edge | Same as B005 but with reset input |
| B007 | Asynchronous pulse generator |
EN, INV, TH, TL, Q
|
Free-running clock with independent high/low widths when EN=1
|
Master clock for the alternation cycle |
| B011 | Latching relay (RS) |
S, R, Q
|
Set-dominant or reset-dominant bistable | Holds the active pump selector bit between timer transitions |
The Ta output on every block is a real-time value (h:mm:ss by default, or s if configured) that can be referenced on the LOGO! display or via Web Editor / TDE for diagnostics.
4. Control Architecture and Signal Flow
The cleanest implementation uses two on-delay timers (B001) cross-coupled through an RS latch (B011). The signal flow is:
-
I1enables the master alternation latch (RS block). - The Q output of the latch becomes the
EN/TRGfor timerT1(Pump 1 run timer). -
T1.Qdrives outputQ1and the reset input of a wipe-pulse blockB005triggered on the falling edge ofT1.Q- or, more simply, the set input of an RS blockFF2. - The output of
FF2(Pump 2 active) is the trigger forT2, whoseQdrivesQ2and resetsFF1on completion. - Both
Q1andQ2pass through an interlock AND-NOT pair so the opposite output cannot energise while the other is true.
An equivalent and slightly more compact alternative replaces the two timers and the RS latch with an asynchronous pulse generator (B007) feeding a up/down counter (B015) modulo 2 whose bit-0 output selects Pump 1 and bit-1 output selects Pump 2. This approach is recommended for firmware V8.2 and higher where the counter can be gated directly by I1.
5. Step-by-Step FBD Implementation in LOGO!Soft Comfort
The procedure below produces a verified working program in FBD view. Open LOGO!Soft Comfort, create a new project, and select the LOGO! 8 base module matching your hardware.
5.1 Declare Inputs and Outputs
On the Tools > I/O Name dialog, assign:
-
I1= Enable (digital input, contact from master run signal) -
I2= Reset (optional, forces both pumps off) -
Q1= Pump_1 -
Q2= Pump_2
5.2 Build the Master Enable Latch
- Insert B011 Latching Relay (RS). Set
S=I1,R=I2OR(I1 inverted). The invertedI1on the reset gives the pause-on-input-loss behaviour: whenI1drops, the latch resets immediately and pulls all downstream triggers low, freezing every active timer'sTaat its current value. - Label the latch
FF_Master; itsQoutput is the global run signal.
5.3 Insert the Run Timers
- Insert B001 On-Delay
T1. SetTRG=FF_Master.Q,T=00:10:00(10 minutes default; change in step 6). - Insert B001 On-Delay
T2. SetTRG=FF2.Q(Pump 2 selector, defined next),T=00:10:00.
5.4 Build the Pump Selector Latch
- Insert B011 RS latch
FF1(Pump 1 selector).S=FF_Master.Q,R=T1.Q(when T1 times out, Pump 1 drops). - Insert B011 RS latch
FF2(Pump 2 selector).S=T1.Q(rises when T1 completes; effectively a one-cycle delay),R=T2.Q(drops when T2 completes). - Wire the latch reset priority by leaving the LOGO! default (R-dominant) - this is critical for fault recovery: a simultaneous set/reset on power-up will always leave the latch reset, giving a deterministic Pump-1-starts-first sequence.
5.5 Drive the Outputs with Interlock
- Insert a B001 On-Delay
T1_offconfigured as the off-time interlock:TRG=T1.Qinverted,T=00:00:02(2 s minimum off-time). - Wire the final
Q1as:(FF1.Q) AND (NOT T2.Q). Use a B008 AND gate (or a B082-NAND with inverted input) to combine the signals. - Wire the final
Q2as:(FF2.Q) AND (NOT Q1) AND (T1_off.Q). The third term ensures pump 2 cannot start until pump 1 has been off for 2 s.
5.6 Save and Compile
Press F5 (Compile) and Ctrl+D (Simulate) to load the program into the on-screen simulation panel. The simulation should show Q1 pulsing 10 min on, 2 s off, then Q2 10 min on, 2 s off, repeating. Toggling I1 off mid-cycle must freeze Ta and the active output; toggling I1 on resumes from the frozen Ta.
6. Implementing Pause-on-Input-Loss Correctly
The naive approach of connecting I1 directly to the TRG of T1 does not pause - it resets Ta to zero every time I1 drops. To get a true pause the timer's enable must be held high but the timer's start must be inhibited. There are two patterns that work in LOGO!:
6.1 Pattern A: Master RS Latch (recommended)
Use the B011 latch shown in step 5.2. When I1 drops, the inverted signal resets the latch; FF_Master.Q drops low, which removes TRG from T1. The on-delay block B001 in LOGO! holds its current Ta value when TRG falls; it does not clear. This is the documented behaviour in the LOGO! 8 system manual, section 4.4.2 'On-delay'. When I1 returns, TRG rises again, and timing continues from the held Ta.
6.2 Pattern B: Gated Trigger
If you cannot tolerate the master latch (for example, you want a hard zero on output drop), gate the timer trigger through an AND (B008) whose second input is I1 AND whose output drives TRG. The same B001 behaviour holds Ta while the gated TRG is low. This pattern, however, leaves a race: if I1 is removed for less than one LOGO! scan (typically 10 ms), the timer may still interpret it as a continuous high. Pattern A is preferred for industrial signals.
I1 is removed and the active timer has already crossed its threshold (Ta >= T), Q is already latched by the on-delay's internal behaviour and will not drop until TRG falls. After TRG falls (I1 removed), the on-delay resets Ta to zero and Q drops on the next scan. This means a brief removal of I1 while Q is true will drop the pump for one scan before resuming. To avoid this, add a B004 Retentive On-Delay in series with the master enable.7. Parameter Table: Time Constants and Thresholds
All time values are entered in hh:mm:ss in LOGO!Soft Comfort. The base time resolution of B001/B002/B005 is 0.01 s (10 ms).
| Parameter | Default | Minimum | Maximum | Used On | Description |
|---|---|---|---|---|---|
T_run |
00:10:00 | 00:00:00.1 | 99:59:59 | T1, T2 | Run time per pump per cycle |
T_off_min |
00:00:02 | 00:00:00.0 | 00:00:30 | T1_off | Minimum off-time / interlock / anti-water-hammer delay |
T_diag |
00:30:00 | n/a | n/a | Optional watchdog | Not used in base application; useful if a 'pump-stuck' alarm is needed |
To change a time at runtime (HMI or Web Editor), expose the parameter on a LOGO! display message or to a network variable via the integrated Ethernet port. The block parameter T is the only addressable element of a timer block; Ta is read-only.
8. Wiring and Electrical Considerations
| Connection | Wire / Device | Rationale |
|---|---|---|
LOGO! Q1, Q2 to contactor coils |
Use interposing relays if contactor coil inrush exceeds LOGO! relay rating (typically 10 A resistive / 3 A inductive at 250 V AC) | LOGO! onboard relay contacts have a limited electrical life at full motor starting current; never switch motor contactor coils directly on inductive loads exceeding the published rating |
| Power supply | Dedicated 24 V DC or 230 V AC source for the LOGO! base | Do not tap control power from the same circuit that drives the contactors - back-EMF can glitch the LOGO! |
| Inputs | Use volt-free contacts or 24 V DC sourcing sensors | Match the LOGO! variant (12/24 RCE accepts both polarities; 230 RCE has dedicated 230 V input conditioning) |
| Surge protection | RC snubber (e.g. 0.1 uF + 100 ohm in series) across each contactor coil | Reduces coil-induced voltage spikes that can corrupt the LOGO! inputs |
| Motor protection | Thermal overload relay in series with each contactor output, downstream of the LOGO! | LOGO! does not replace motor protection; it sequences the contactors only |
Refer to the LOGO! 8 system manual, section 'Wiring' for the specific terminal assignments of the 6ED1052-1xxx-0BAx module you have. The relay-output variants list maximum switch ratings per pole; never exceed the published VA rating on inductive loads.
9. Commissioning and Verification Procedure
- Visual check: With power off, confirm the I1 source is wired to the correct terminal and the contactor coils are on Q1 and Q2 respectively. Verify neutral/ground are at the same reference.
-
Power-up dry run: Energise the LOGO! with
I1open.Q1andQ2must both be off. The Web Editor (192.168.0.1 by default on LOGO! 8, if DHCP fails) should showI1 = 0,Q1 = 0,Q2 = 0. -
Short-cycle test: Lower
T_runto00:00:10andT_off_minto00:00:02. CloseI1. Pump 1 must start immediately. After 10 s, pump 1 must drop, the 2 s off-time must elapse, and pump 2 must start. The sequence must repeat automatically. -
Pause test: Mid-cycle, open
I1. Pump 1 (or Pump 2) must remain running in its current state, and the correspondingTavalue must freeze at the displayed value. CloseI1again: timing must resume from the frozenTawith no reset. -
Interlock test: Force
Q1true via simulation; confirmQ2cannot be true simultaneously under any combination of inputs. -
Restore production timing: Change
T_runandT_off_minback to the application values. Save to the LOGO! via Ethernet or USB. - Hand off: Document the program name, project hash, and a screenshot of the FBD in the site logbook.
10. Troubleshooting Matrix
| Symptom | Likely Cause | Action |
|---|---|---|
Neither pump runs when I1 = 1
|
I1 wired to wrong terminal, or inverted in the program |
Use LOGO! display or Web Editor to read I1 state; check terminal per the wiring diagram for your specific 6ED1052 variant |
| Pump 1 runs forever, Pump 2 never starts | FF2 not being set - check that T1.Q is wired to FF2.S and that FF2.R is not held high by a stuck signal |
Use simulation mode to step the program and watch FF2.Q transition |
| Pumps alternate too fast (every second or less) | Time base entered in seconds, not mm:ss; T field confused with parameter setpoint |
Enter 00:10:00 for 10 minutes; verify with the LOGO! display showing Ta incrementing at 1 s per real second |
Removing I1 resets the timer instead of pausing |
Direct connection of I1 to TRG rather than via the master RS latch |
Add the B011 master latch per section 5.2 |
| Both pumps run simultaneously | Interlock AND-NOT pair mis-wired or FF1/FF2 both set due to a power-up race | Verify the interlock gates in simulation; ensure RS latch reset-dominance is preserved |
| LOGO! display shows 'BLOCK INVALID' for a timer | Firmware older than block version | Update LOGO! base firmware to FS:02 or later via LOGO!Soft Comfort |
| Web Editor cannot connect | Wrong IP or subnet | Default address is 192.168.0.1 with /24 mask; reset via menu on the LOGO! base if unknown |
11. Alternative Implementations and Optimisation Notes
11.1 Asynchronous Pulse Generator + Counter Variant
For applications where the run and off times are equal and fixed, replace the two on-delays with a single B007 Asynchronous Pulse Generator configured for TH = TL = T_run and a B015 Up/Down Counter with On = 1 and threshold 2. Counter output bit 0 (low) drives Q1 and bit 1 (high) drives Q2. The reset on the counter is tied to the master enable - when I1 drops, the counter holds its current value, pausing the alternation. This variant uses two blocks instead of four and is easier to scale to N pumps.
11.2 Scaling to Three or More Pumps
To extend to three pumps, change the counter threshold to 3 and decode the output bits. Use a B308 3-to-8 decoder (or cascade binary decoders) and gate each output with a Pump-N active enable. The same pause logic applies to the counter's R input.
11.3 Adding a Duty-Cycle Statistic
Expose Ta of T1 and T2 on a LOGO! display message (Tools > Message Text) with a bar-graph element. This gives the operator a live 'time remaining on this pump' indicator without any extra hardware.
11.4 Remote Start via Network Variable
On LOGO! 8.2 and higher, the master enable can be driven by a network input (NI) sourced from an HMI or PLC over Ethernet. This allows a SCADA system to pause and resume the pump alternation remotely, while the local I1 hardwired contact acts as a permissive in parallel (use a B008 AND between them).
12. Field-Commissioning Checklist
- [ ] FBD program compiled without 'BLOCK INVALID' warnings
- [ ] Simulation passed short-cycle test (10 s on, 2 s off)
- [ ] Pause test passed (
I1drop freezesTa) - [ ] Interlock test passed (Q1 and Q2 cannot both be true)
- [ ] Production timing
T_runandT_off_minset to site values - [ ] Motor overload protection verified in line with each contactor
- [ ] Surge suppression (RC snubbers) installed on contactor coils
- [ ] Program archived in site logbook with screenshot of FBD
- [ ] Operator briefed on LOGO! display 'time remaining' message and reset procedure
Which LOGO! firmware is required for the B001 on-delay and B011 latching relay blocks?
Both blocks are available in all LOGO! 8 firmware versions from V8.0 onward. Older LOGO! 6 and 7 generations also have them but the wiring of network variables and the B007 asynchronous pulse generator differ. Use a LOGO! 8 base (6ED1052-xxx08-0BAx) with FS:02 firmware or higher for the smoothest experience.
How do I make the timer actually pause (freeze Ta) when the enable drops, instead of resetting?
Drive the timer's TRG from the output of a B011 latching relay whose set is I1 and whose reset is NOT I1 (or I2 for a separate reset button). The on-delay block B001 holds Ta at its last value while TRG is low and resumes from that value when TRG returns high. This is documented in section 4.4.2 of the LOGO! 8 system manual.
Can the alternation cycle use different run times for pump 1 and pump 2?
Yes. Each on-delay block has its own T parameter, so T1 can be set to (for example) 00:15:00 for pump 1 and T2 to 00:30:00 for pump 2. The logic is unchanged; only the two T fields differ. The two times are independent and can be edited at runtime if exposed on a network variable or display message.
What is the minimum time resolution I can enter for a LOGO! timer?
The on-delay, off-delay, and pulse blocks accept T down to 0.01 s (10 ms). For sub-100 ms applications use the asynchronous pulse generator B007 which has 0.05 s resolution. The display always shows Ta in hh:mm:ss format, so a 50 ms pulse is shown as 00:00:00 with the low bit changing on the LOGO! display.
How do I prevent both pumps from starting simultaneously on a power-on event?
Keep the B011 RS latches at their default reset-dominant priority. On power-up both latches start in the reset state (Q=0), so Q1 and Q2 are both false. The first rising edge on the master enable sets FF1, starting pump 1. If the master enable is already closed at power-up, the first LOGO! scan sets FF1 immediately, and pump 1 starts on the first cycle - no race, no overlap.