Overview
This reference builds a three-output cyclic sequence controller on a Siemens LOGO! 8 (0BA8) logic module, specifically the 6ED1052-1MD08-0BA2 (LOGO! 8.2, 12/24 RCE with display). The application drives three loads (Q1, Q2, Q3) through a repeating pattern: each output energizes for a configurable on-time, all outputs stay off for a configurable pause, then the next output energizes, and the cycle repeats until the operator releases the start signal. The cycle is initiated by either of two digital inputs, I1 or I3, and stops cleanly when both inputs are LOW.
The target pattern is:
- I1 OR I3 goes HIGH (start condition).
- Q1 energizes for
On_Timeseconds (default 3.000 s). - All outputs OFF for
Off_Timeseconds (default 5.000 s). - Q2 energizes for
On_Timeseconds. - All outputs OFF for
Off_Timeseconds. - Q3 energizes for
On_Timeseconds. - All outputs OFF for
Off_Timeseconds. - Return to step 2; repeat until both I1 and I3 are LOW.
Total cycle period: T_cycle = On_Time + Off_Time. With defaults, T_cycle = 8 s, and a complete Q1→Q2→Q3 sequence takes 24 s before the pattern repeats.
Engineering is performed in LOGO! Soft Comfort V9 and downloaded to the LOGO! 8 over Ethernet. Operator-friendly runtime editing of the on-time and pause-time is achieved by binding the pulse generator's TH and TL parameters to VM addresses and surfacing them through a Message Text block on the LOGO!'s built-in display, the optional LOGO! TDE, the integrated Web server, or a connected HMI.
Typical Applications
- Sequential lighting or signage controllers
- Three-zone irrigation or pump cycling
- Conveyor indexing with three stations
- Decorative and advertising illumination
- Stack-light / beacon sequence testing
Prerequisites
Hardware
| Item | Specification | Notes |
|---|---|---|
| LOGO! 8 base module | 6ED1052-1MD08-0BA2 (LOGO! 8.2, 12/24 RCE) | Display variant; "M" = with display, "D" = 12/24 V DC power, relay outputs |
| LOGO! TDE (optional) | 6ED1055-4MH08-0BA0 | External 6-line text display, 9 function keys |
| Inputs I1, I3 | 24 V DC digital inputs | Wired to N.O. start/stop pushbuttons or selector switches |
| Outputs Q1–Q3 | Relay, 5 A @ 250 V AC / 3 A @ 30 V DC resistive | Derate 50% for inductive loads |
| Power supply | 12/24 V DC, ≥ 1.5 A | Provides LOGO! and sensor power |
| Ethernet cable | Cat5e or higher, UTP | PC to LOGO! programming port |
6ED1052-1MD08-0BA2 breaks down as 6ED1 = LOGO! family, 052 = LOGO! 8, 1 = 8th generation, MD = with display + 12/24 RCE, 08 = 0BA8 hardware, 0BA2 = firmware release corresponding to LOGO! 8.2 (FS:05). For LOGO! 8.3 (FS:06) and 8.4 (FS:07), the same program uploads unchanged, but always verify firmware on the device under Menu → Diagnostics → Version before commissioning.Software
| Item | Version | Purpose |
|---|---|---|
| LOGO! Soft Comfort | V9.0 or later | Project engineering, simulation, and PC→LOGO! download |
| Operating system | Windows 10 / Windows 11 / macOS (V9.0+) | PC host |
Download the current LOGO! Soft Comfort release from the Siemens LOGO! software portal. V9.0 supports 0BA6, 0BA7, and 0BA8 hardware and the full LOGO! 8 feature set including Message Text, Shift Register, and Analog Comparator blocks.
Hardware Configuration
Wiring Map
The 6ED1052-1MD08-0BA2 accepts 12/24 V DC on the power terminals and exposes eight digital inputs (I1–I8) plus two analog inputs (AI1, AI2). Outputs Q1, Q2, and Q3 are dry-contact relay outputs that share a common terminal. I1 and I3 are wired to start/stop controls; the loads are wired to the Q outputs.
| LOGO! terminal | Function | External connection |
|---|---|---|
| I1 | Start/Stop input 1 (N.O. contact) | Pushbutton to +24 V sensor supply |
| I3 | Start/Stop input 2 (N.O. contact) | Pushbutton to +24 V sensor supply |
| Q1 | Output 1 (relay contact) | Load 1 (lamp, valve, contactor coil) |
| Q2 | Output 2 (relay contact) | Load 2 |
| Q3 | Output 3 (relay contact) | Load 3 |
| +24 V | Sensor supply | Common rail for pushbutton returns |
Input Filtering and Debounce
Mechanical pushbuttons at I1 and I3 require a debounce. The LOGO! 8 inputs include a configurable input filter: 1 ms, 5 ms, 10 ms, 25 ms (default), 50 ms, or 100 ms. Open the project's Tools → Input Filter Settings in LOGO! Soft Comfort to set the global filter for the project. The 25 ms default is appropriate for most pushbutton applications; increase to 50 ms for noisy industrial environments.
Program Architecture
Two clean architectures work for this sequence: a counter-and-decoder approach and a shift-register approach. Both are valid; the counter approach is easier for first-time LOGO! users, while the shift register generalizes to N outputs with no change to the decoder logic.
Counter-Based Approach (Recommended)
The counter architecture uses:
- Start latch (self-holding AND/OR pair) — holds the sequence running while I1 OR I3 is HIGH and resets cleanly when both are LOW.
- Pulse generator (Block type B6) — produces the on-pulse (TH) and pause (TL) on a single output.
- Up/Down counter (Block type B7) — counts completed sub-cycles.
- Three analog comparators (Block type B11) — decode the counter value to Q1, Q2, Q3.
- Message Text (Block type B33) — surfaces the on-time and pause-time to the operator.
The pulse generator toggles its output on every cycle's rising edge. The counter increments once per cycle. The comparators identify which sub-cycle is currently active, and an AND with the pulse generator's output ensures Q1, Q2, Q3 only energize during the TH portion of the cycle.
Shift-Register Approach (Alternative)
The shift register (Block type B9 in LOGO! 0BA8) holds a configurable number of bit stages and shifts them on each rising edge of its clock input. With 3 stages and a constant logic-1 data input, a "1" propagates from stage 1 to stage 2 to stage 3 and out, while the next clock pulse brings the next "1" in. Each stage's output drives one of the Q outputs through a T-flip-flop (Block type B2) for edge behavior, or directly if level behavior is acceptable. After the third stage empties, the next clock brings the cycle's "1" back into stage 1, producing continuous operation.
This approach scales elegantly to N outputs by increasing the register's stage count and tapping additional bits. It is, however, slightly less obvious to a first-time user than the counter approach, which is why the counter version is detailed below.
Building the Program in LOGO! Soft Comfort V9
Open LOGO! Soft Comfort V9 and create a new project (File → New). Select the device as LOGO! 8 (0BA8) FS:05 from the hardware selector. The editor opens with the comment block (Block B000) and the I/O cursor.
Step 1 — Start Latch (Blocks B001, B002)
The start latch holds the sequence running while I1 OR I3 is HIGH. Build the classic self-holding arrangement:
- Insert an AND block (B001) with two inputs.
- Input 1: virtual flag M1 (self-hold).
- Input 2: output of OR block B002.
- Insert an OR block (B002) with three inputs.
- Inputs: I1, I3, output of B001.
- Wire B002's output to B001's input 1 (creates the self-hold loop).
When I1 or I3 goes HIGH, M1 latches HIGH. M1 stays HIGH until both I1 and I3 are LOW AND the AND gate's other input is also LOW (i.e., the previous M1 state). The latch releases cleanly when the operator releases both inputs.
Step 2 — Pulse Generator (Block B003)
Insert a Pulse Generator (Wiping Relay) — Block type B6, instance B003:
- Trigger input: connect to M1 (start latch output).
- Set
TH(pulse width) =On_Time, default 3.000 s. - Set
TL(pause width) =Off_Time, default 5.000 s.
Output B003-Q goes HIGH for TH seconds, then LOW for TL seconds, and repeats as long as M1 is HIGH. Output B003-Q is the cycle's master timing reference; it is the signal that drives the counter's clock input and gates the Q outputs.
Step 3 — Up/Down Counter (Block B004)
Insert an Up/Down Counter — Block type B7, instance B004:
- Input
Count_In: connect to B003-Q. - Input
Dir: leave unconnected (default = count up). - Input
Reset: connect to the inverted M1 (use a NOT gate or wire to M1 inverted through an AND/OR pair). The counter resets to 0 when the start latch releases. - Set threshold
On= 9999 (well above the number of stages).
The counter increments by 1 on every rising edge of B003-Q. After the first on-pulse, Cnt = 1; after the second, Cnt = 2; after the third, Cnt = 3; after the fourth on-pulse, Cnt = 4; and so on. The counter wraps implicitly because the comparators below compare against the values 1, 2, and 3 only.
Step 4 — Decoders and Q Outputs (Blocks B005–B010)
Insert three Analog Comparators — Block type B11, instances B005, B006, B007:
-
B005 (Q1 phase):
Ax= Cnt (B004-OUT),Ay= 1,On= 0,Off= 0. -
B006 (Q2 phase):
Ax= Cnt,Ay= 2. -
B007 (Q3 phase):
Ax= Cnt,Ay= 3.
Each comparator output is HIGH only when Cnt equals the corresponding Ay value. AND each comparator with B003-Q so the Q outputs are only energized during the on-portion of the cycle:
- AND B008: inputs = B005-Q, B003-Q. Output = Q1.
- AND B009: inputs = B006-Q, B003-Q. Output = Q2.
- AND B010: inputs = B007-Q, B003-Q. Output = Q3.
The implicit 5 s pause between outputs is enforced by the AND with B003-Q, which is LOW during TL.
Step 5 — Bind TH and TL to VM Addresses
To allow runtime editing of On_Time and Off_Time, bind them to 16-bit VM words:
- Open Block B003 in the editor.
- Right-click the
THfield; select Use Variable; chooseVW0. - Right-click the
TLfield; select Use Variable; chooseVW2.
VM0..VM3 (16-bit words VW0 and VW2) are now your operator-editable parameters. Any value written to VW0 is interpreted as the TH (on-time) in tenths of seconds (the LOGO! default time base for 16-bit VM words) and any value written to VW2 is the TL (pause). The Message Text block below will write to these addresses.
Operator-Adjustable Times via Message Text
Insert a Message Text — Block type B33, instance B011:
- Connect
ENto a constant HIGH (1) so the message is always visible. - Set
En_Time= 0 (permanently shown, not time-limited). - In the message text editor, type two lines:
On Time: %d s
Pause: %d s
- Use the Insert Parameter toolbar button to bind the first
%dtoVW0and the second toVW2. Set the format to integer (no decimals) and width 3. - Open the message text's Properties → Acknowledge / Editing dialog. Set the editing attribute to Yes for both VW0 and VW2 so the operator can change them at runtime.
Runtime Editing Procedure on the LOGO! Display
- Navigate to the message text on the LOGO! display (the message appears automatically if En_Time = 0).
- Press and hold the ESC button for at least 2 seconds. A black bar appears in the first editable field.
- Use the up/down cursor keys to move the black bar between fields (in this program, between the On Time field and the Pause field).
- Press the OK button (or the Enter key on a TDE) to enter a field. The black bar turns into a blinking box on the active digit.
- Use the left/right cursor keys to move between digit positions; use the up/down cursor keys to change the digit's value.
- Press OK again to confirm the change and return to the black bar.
- Press ESC to exit edit mode when all changes are complete.
The new values are written to VW0 and VW2 immediately and read by the pulse generator on the next cycle boundary. The cycle period updates without requiring a program stop or restart.
Download, Commissioning, and Verification
Step 1 — Connect the PC to the LOGO!
- Connect a Cat5e Ethernet cable between the PC's network port and the LOGO! 8's main Ethernet port (not the side TDE port).
- Power up the LOGO!. The default IP is
192.168.0.100with subnet mask255.255.255.0. The IP is shown on the built-in display under Menu → Network → IP Address. - Configure the PC's Ethernet adapter with a static address in the same subnet, e.g.,
192.168.0.99with mask255.255.255.0. - In LOGO! Soft Comfort, open Tools → Transfer → PC → LOGO! (or click the Download toolbar button).
- Select the network interface, type or browse to the LOGO!'s IP, and click Test Connection. A successful test returns "OK".
Step 2 — Transfer and Run
- Click OK in the Transfer dialog. The program and parameter defaults are written to the LOGO! flash memory. Progress is shown in the status bar.
- After transfer, the LOGO! enters STOP. Press the LOGO!'s OK button to enter RUN, or select Menu → Start.
- The Message Text appears on the LOGO! display showing the current On Time and Pause values.
Step 3 — Simulation in LOGO! Soft Comfort V9
Before downloading to hardware, validate the logic with the built-in simulator: Tools → Simulation. The simulator runs the program in real time on the PC, with the ability to force inputs I1 and I3 and observe Q1, Q2, Q3. The Message Text appears on the simulated LOGO! display panel. Use the time-base slider in the simulator (e.g., 10× or 100×) to speed through the cycle while verifying the 3 s on / 5 s off pattern.
Step 4 — Acceptance Test Procedure
- With both I1 and I3 LOW, confirm Q1, Q2, Q3 are all LOW (use a multimeter or check Menu → I/O Status).
- Press and hold I1. Q1 should energize and stay HIGH for On_Time, then go LOW for Off_Time.
- Continue holding I1. Q2 should energize after Q1's first cycle, then Q3 after Q2's first cycle. The pattern repeats seamlessly.
- Release I1 (both inputs LOW). The outputs should stop cycling. The counter resets so the next assertion of I1 or I3 starts again at Q1.
- Navigate to the Message Text and change On Time to 1.0 s and Pause to 2.0 s. Confirm the new values take effect on the next cycle boundary.
- Restore On Time to 3.0 s and Pause to 5.0 s. Confirm normal operation resumes.
Expected Timing Diagram
With On_Time = 3 s and Off_Time = 5 s, the expected pattern is:
| Cycle # | Time (s) | Q1 | Q2 | Q3 |
|---|---|---|---|---|
| 1 | 0–3 | 1 | 0 | 0 |
| 1 | 3–8 | 0 | 0 | 0 |
| 2 | 8–11 | 0 | 1 | 0 |
| 2 | 11–16 | 0 | 0 | 0 |
| 3 | 16–19 | 0 | 0 | 1 |
| 3 | 19–24 | 0 | 0 | 0 |
| 4 | 24–27 | 1 | 0 | 0 |
From cycle 4 onward the pattern is continuous as long as I1 or I3 is HIGH.
Alternate Access Paths for Parameter Editing
LOGO! TDE (Text Display)
The 6ED1055-4MH08-0BA0 LOGO! TDE provides a 6-line × 20-character display with 9 function keys. The TDE connects to the LOGO! 8 over the proprietary two-wire TDE bus on the side of the module. Message Text blocks configured with the TDE_EN attribute appear on the TDE automatically, including the editable parameter fields. The same ESC-and-cursor procedure applies for parameter editing on the TDE.
LOGO! Integrated Web Server
LOGO! 8 modules (0BA7 and later) include an integrated Web server that exposes the VM memory and current I/O status. Enable the Web server under Menu → Network → Web Server Access on the LOGO! display or via LOGO! Soft Comfort's Tools → Web Server Configuration. Operators browse to http://<logo-ip> from any browser on the same network, log in with the configured password, and view or change VM values. This is the most flexible option for remote or multi-user installations and is unique to LOGO! 8 — older 0BA6 hardware does not include this feature.
External HMI
For sites with an existing HMI/SCADA infrastructure, the LOGO! 8 0BA8 supports the S7 communication protocol over Ethernet. Many HMIs (Siemens SIMATIC Comfort Panels, Weintek, Pro-face) can read and write VM addresses directly. The HMI shows the current On_Time and Pause values and allows entry through a numeric input widget. The same VM addresses (VW0 and VW2) are the binding targets on the HMI side. Configure the HMI's driver for "Siemens S7-200/LOGO!" and use the PUT/GET functions to write to the VM area.
Program Variants and Scalability
Extending to N Outputs
The counter approach scales to N outputs by adding N comparators at Ay = 1, 2, ..., N. The counter's reset value should be N or higher so the count wraps naturally after the Nth sub-cycle. The LOGO! 8 0BA8 supports counters up to ±32,767 (16-bit), so 5, 10, or 20-output sequences are no problem. For N > 8, prefer the shift-register approach.
Different Times for Each Output
If Q1 should be on for 3 s, Q2 for 4 s, Q3 for 2 s, replace the single pulse generator with three pulse generators (one per output), each with its own TH and TL bound to separate VM addresses. A shift register clocked at 100 ms intervals advances the state and selects which pulse generator's output is currently routed to the physical Q. This is the cleanest way to express per-output timing.
Asymmetric Pause Between Outputs
For applications that need a longer pause after Q1 (e.g., 5 s after Q1, 10 s after Q2, 5 s after Q3), replace the global TL with three per-stage pauses, or add an off-delay timer (Block type B5) at the end of the third sub-cycle to insert a "long" pause before the cycle repeats.
Troubleshooting Matrix
| Symptom | Probable Cause | Diagnostic Step | Corrective Action |
|---|---|---|---|
| No output on Q1/Q2/Q3 even with I1 asserted | Start latch (B001/B002) is not asserting M1 | Use Tools → Online Test in LOGO! Soft Comfort or simulate to observe M1 | Verify the OR/AND wiring; confirm I1 or I3 actually reaches the LOGO! terminal (multimeter on the input terminal block) |
| Outputs cycle but never pause between them | Off_Time (TL) is set to 0 in the pulse generator | Open Block B003, verify TL value or VM address binding | Set TL to the required pause (e.g., 5.000 s) or bind to a non-zero VM value |
| Only Q1 cycles; Q2 and Q3 never fire | Counter never reaches 2 or 3, or comparators are mis-wired | Watch B004-OUT (Cnt) and the analog comparator outputs in Online Test | Verify Ay values are 1, 2, 3 in order; verify each comparator's output is ANDed with B003-Q |
| Message Text does not appear on the display | EN input is OFF, or the message text's En_Time is too short | Watch the EN input on B011; check En_Time in the message text properties | Wire EN to a constant HIGH (1) or to a status flag; set En_Time = 0 to keep the message visible permanently |
| Message Text appears but values are not editable | The "Editing" attribute is set to "No" in the message text properties | Open the message text block's Properties → Acknowledge / Editing dialog | Change the Editing attribute to Yes for both VW0 and VW2 |
| Edited On_Time/Pause values have no effect on the cycle | The pulse generator's TH/TL are not bound to VM addresses | Open Block B003, verify TH and TL are set to "Use Variable" referencing VW0 / VW2 | Right-click TH/TL and select the VM address; verify the data type is 16-bit unsigned |
| LOGO! won't accept Ethernet connection from PC | Wrong IP subnet, firewall blocking, or wrong Ethernet port | Verify LOGO! IP from the display; ping from the PC; check the firewall log | Set the PC to the same subnet (e.g., 192.168.0.99 / 255.255.255.0); allow UDP/1900 and TCP/13500 in the firewall; ensure cable is in the LOGO! 8's main Ethernet port, not the TDE port |
| Counter value drifts or overflows after extended operation | Counter reset is missing or wired wrong | Use Online Test to view the counter value over time | Verify the counter's reset input is wired to the inverted start flag (¬M1); or apply a modulo-N reset using a comparator at Cnt ≥ N |
| Outputs energize in the wrong order (Q2 first, then Q1, then Q3) | Counter is counting down (Dir = 1) or comparator Ay values are swapped | Watch the counter's direction flag; verify comparator Ay values | Leave the Dir input unconnected (default = up); re-verify Ay values are 1, 2, 3 in order |
| Message Text shows garbage characters in the parameter field | VM address is 32-bit but the format expects 16-bit, or the data type is mismatched | Verify the VM address and format in the message text parameter dialog | Use a 16-bit VM word (VW0, VW2); verify the format is integer (%d) with the expected width |
| Cycle pauses too long or too short | VM scaling misinterpreted (LOGO! uses 0.01 s units for VM-bound pulse times) | Check the TH/TL value displayed on the LOGO! and compare to the Message Text reading | Multiply or divide the VM value by 100 to compensate. A VW0 value of 300 corresponds to 3.000 s |
Safety, Compliance, and Reference
For installations in the EU, the LOGO! 8 base module complies with:
- 2014/30/EU (EMC)
- 2011/65/EU (RoHS)
- 2014/35/EU (Low Voltage, when the relay outputs switch >75 V DC or >50 V AC)
For North American installations, the LOGO! 8 carries cULus listing (UL 508 / CSA C22.2 No. 142) for industrial control equipment. Refer to the LOGO! 8 system manual for the specific file number and conditions of acceptability.
LOGO! 8 Block Summary for This Application
| Block # | Block Type | Function | Key Parameters |
|---|---|---|---|
| B001 | AND | Self-hold gating | M1, OR(I1, I3, M1) |
| B002 | OR | OR I1, I3, B001 | — |
| B003 | Pulse Generator (Wiping Relay) | Produces on/pause cycle | TH = VW0, TL = VW2 |
| B004 | Up/Down Counter | Counts sub-cycles | Cnt_in = B003-Q, Rst = ¬M1 |
| B005 | Analog Comparator | Decode "Q1 phase" | Ax = Cnt, Ay = 1 |
| B006 | Analog Comparator | Decode "Q2 phase" | Ax = Cnt, Ay = 2 |
| B007 | Analog Comparator | Decode "Q3 phase" | Ax = Cnt, Ay = 3 |
| B008 | AND | Q1 = Decode1 AND B003-Q | — |
| B009 | AND | Q2 = Decode2 AND B003-Q | — |
| B010 | AND | Q3 = Decode3 AND B003-Q | — |
| B011 | Message Text | Operator display and editing | EN = HIGH, displays and edits VW0 and VW2 |
Frequently Asked Questions
How do I allow the operator to change On_Time and Off_Time without re-programming the LOGO!?
Use a Message Text block (Block type B33) in LOGO! Soft Comfort and bind the pulse generator's TH and TL parameters to VM addresses (e.g., VW0 and VW2). Insert those VM addresses into the message text with the Insert Parameter dialog. At runtime, navigate to the message text on the LOGO! display, press and hold ESC for 2 seconds to enter edit mode, and use the cursor keys to change the values.
What is the maximum value I can set for On_Time and Off_Time in the pulse generator?
The LOGO! 8 0BA8 pulse generator (B6) supports time bases from 10 ms up to 99 h 59 m 59 s. The TH and TL values can each be set within the same range. The practical upper limit is determined by the application; for the cyclic sequence, values above 60 minutes per phase are unusual but technically supported. Remember that VM-bound values are scaled by 0.01 s, so a VW0 value of 60000 corresponds to 600.00 s (10 minutes).
My LOGO! is a 6ED1052-1MD08-0BA1 (LOGO! 8.1) - does the same program work?
Yes. The program uses only basic blocks (AND, OR, Pulse Generator, Up/Down Counter, Analog Comparator, Message Text) that have been present since LOGO! 8.0. The same program downloads to 0BA7 and 0BA8 (FS:05/06/07). The program also uploads to 0BA6 (LOGO! 7) with minor syntax differences; verify block numbering and parameter ranges in the older firmware's documentation if downgrading.
Can I run this sequence from the LOGO! TDE or Web server instead of the built-in display?
Yes. The Message Text block appears on the LOGO! TDE (6ED1055-4MH08-0BA0) automatically, with the same ESC-and-cursor edit procedure. The LOGO! 8 0BA8's integrated Web server (Tools → Web Server Configuration) exposes all VM addresses for read/write from any browser on the same network. Both methods accept the same VM addresses (VW0 and VW2) as the source for On_Time and Off_Time.
Why does the counter overflow or stick after many cycles?
Make sure the counter's reset input is wired to the inverted start flag (¬M1) so it resets when the operator releases I1 and I3. If you want the cycle to wrap automatically (continue Q1→Q2→Q3→Q1...) regardless of counter overflow, set the counter's threshold On value above the number of outputs and use comparators that wrap by comparing against the values 1, 2, 3 only. The 16-bit counter range is ±32,767, which is many hours of operation at 8 s per cycle before rollover.
What time-base does the VM address use when bound to TH/TL?
LOGO! Soft Comfort stores VM values in the pulse generator's internal units, which is 0.01 s for 16-bit VM words. A VW0 value of 300 corresponds to 3.000 s. Always verify by entering a known value (e.g., 100 = 1.000 s) and observing the cycle on the LOGO! display before relying on the absolute reading from the Message Text.