Siemens LOGO! Digital Input Debounce 4 Hz Scan Rate and Filtering

David Krause12 min read
I/O ModulesSiemensTechnical Reference
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

Siemens LOGO! Digital Input Debounce: 4 Hz Scan Rate, Edge Detection, and Field Wiring

Mechanical switches, push buttons, and relay contacts do not produce clean logic-level transitions. When two metal contacts close or open, they physically bounce for a few milliseconds to a few tens of milliseconds, generating a burst of edges that a high-speed counter would see as multiple events. The most common field question about the Siemens LOGO! logic module is therefore: does LOGO! debounce its digital inputs, and what is the maximum usable input change rate? This reference covers the input scan architecture of the LOGO! 8 family (specifically the 6ED1052-1HB08-0BA1 variant), how the 4 Hz / 250 ms limit is implemented, where fast inputs (5 kHz) apply, and which function blocks to use for reliable push-button and counter applications.

1. What "Debounce" Means in a PLC Context

Debouncing is the act of removing unwanted multiple transitions from a signal that is otherwise a single, well-defined event. The MDN Glossary defines debouncing as discarding operations that occur too close together during a specific interval and consolidating them into a single operation. In a PLC, debounce can be implemented in three places:

  1. Hardware RC / filter on the input – analog low-pass filter on the input pin.
  2. Firmware input filter – a minimum-pulse-width or integrator that rejects pulses shorter than a threshold.
  3. Application logic – edge detection, on-delay, off-delay, or pulse generator blocks placed after the input.

The 4 Hz specification on LOGO! is a firmware-level rate limiter on the digital inputs, not a hardware RC filter. It is more accurately described as an input update rate than as a debounce filter, but in practical terms it performs the same function: pulses shorter than 250 ms cannot reach the program as multiple edges.

Engineering note: The 4 Hz limit is a property of the input image / input event evaluation, not a constraint of the LOGO! program cycle. The program itself can run the cycle time of each function block at roughly 0.1 ms and the entire program in single-digit milliseconds, but the inputs are sampled at the slower rate defined by the hardware variant.

2. LOGO! 8 Hardware: 6ED1052-1HB08-0BA1 Variant

The part number discussed in field discussions – 6ED1052-1HB08-0BA1 – is a LOGO! 12/24 RCE module of the LOGO! 8 generation. The MLFB decodes as follows:

MLFB segment Meaning
6ED1 LOGO! logic module family
052 LOGO! 8 series (8th generation base unit)
1 Base unit (BM)
HB 12/24 V DC supply, relay outputs, integrated Ethernet
08 Hardware index (corresponds to LOGO! 8.2/8.3 firmware baseline)
0BA1 Release suffix

Key specifications of the 6ED1052-1HB08-0BA1 (and the closely related 6ED1052-1MD08-0BA1 12/24 RCEo):

Parameter Value
Supply voltage 12/24 V DC
Digital inputs 8 (I1 … I8)
Inputs usable as analog (0 … 10 V) 4 (I1 … I4, AI1 … AI4)
Fast inputs (high-speed counter) None on this variant
Max input frequency, normal digital 4 Hz (typ.)
Relay outputs 4 (Q1 … Q4), 10 A / 250 V AC
Communication Ethernet (LOGO! 8 integrated)
Function blocks per program Up to 400
Program cycle per block ≈ 0.1 ms

Because the 6ED1052-1HB08-0BA1 does not have fast inputs, every digital input on it is subject to the 4 Hz / 250 ms rate limit. Variants that do have fast inputs – for example the LOGO! 230 RCE (6ED1052-1FB08-0BA1) on inputs I3 … I6 or the LOGO! 12/24 RCEo on I5/I6 – allow counter operation up to 5 kHz on those specific terminals only.

3. Input Scan Architecture: 4 Hz vs 5 kHz

Siemens documents the input scan behavior in the LOGO! 8 System Manual (entry ID 109751654). The relevant parameters are summarized in the table below.

Input class Maximum count frequency Minimum pulse width Typical use
Normal digital input (all variants) 4 Hz 250 ms Push buttons, selector switches, contactors, standard sensors
Fast input (variants with I3 … I6 or I5/I6 fast) 5 kHz 0.1 ms Incremental encoders, high-speed counters, frequency measurement

The 4 Hz figure means that the input image used by the LOGO! program updates at most every 250 ms for normal digital inputs. Mechanically, even a slow push button cannot produce legitimate 4 Hz press events (that is 4 full presses per second), so the rate is more than sufficient for human-operated controls. It is also a comfortable margin over the worst-case bounce envelope of industrial push buttons (typically 5 … 20 ms).

3.1 Why the 250 ms ceiling exists

The limit is a side effect of how LOGO! schedules its input handling. Each scan of the program, the firmware reads the physical input pins through an internal debounce / integrator whose time constant is set so that a pulse shorter than 250 ms cannot reliably toggle the input flag. The benefit is that the user does not need to add any debounce function block in their program for the standard digital inputs – the hardware does it.

3.2 What the program cycle is and is not

The cycle time of a LOGO! program is the time the CPU takes to evaluate all active function blocks sequentially. On a LOGO! 8 the per-block evaluation is roughly 0.1 ms, so a fully populated 400-block program completes in a few tens of milliseconds. That is the rate at which the program can react to the input, not the rate at which the input changes. Because the input is filtered to a 4 Hz update, even an instant program response still sees the filtered value.

Field insight: Field tests with a cheap tumbler switch showed that at "fast toggle" the input still produced only 2 … 3 pulses per press, even when wired directly to a high-speed counter. That empirical 2 … 3 Hz upper bound matches the documented 4 Hz ceiling, and confirms that a slow toggle that produces a single clean transition is also within the spec.

4. Practical Debounce Strategies on LOGO!

For most LOGO! applications, the firmware's 250 ms filter is enough and no extra debounce logic is required. However, three situations call for explicit application-level debounce:

  1. The signal source is a fast input (5 kHz capable) and the program must respond to a single edge without counting bounces.
  2. The wiring carries induced noise (long cable runs near VFDs, solenoids) that produces brief glitches longer than the bounce time but shorter than 250 ms.
  3. The application uses fast counting and only wants to count the first edge of a press, not multiple bounces.

4.1 Using the On-Delay block (B004)

The simplest debounce is a short on-delay. Wire the input to an On-Delay (B004) block with a time of 10 … 20 ms. The output of the On-Delay becomes the debounced signal:

I1 ----[ On-Delay B004, T = 15 ms ]---- Q1
        |_ EdgeTriggered = no         |
        |_ Retentivity   = no         |

Any pulse shorter than 15 ms is dropped. A real button press (typically 50 … 200 ms in a human-pressed scenario) is preserved.

4.2 Using the Wiping Relay (Pulse Output) (B010 / B011)

The Wiping Relay (Pulse Output) and Wiping Relay (Edge-Triggered) blocks in the LOGO! Soft Comfort library already implement an edge-triggered single-pulse behaviour. Because the input itself is filtered to 250 ms, the wiping relay will produce exactly one output pulse per button press, regardless of contact bounce:

I1 ----[ Wiping Relay B010 ]---- M1 (internal flag)
        |_ TH (pulse width) = 1 s    |
        |_ Trg = I1                 |

For a manual control that needs "one press = one action", this is the recommended pattern.

4.3 Using the Up/Down Counter (B002 / B003) for hardware debounce verification

If the goal is to measure the bounce of a switch, connect the contact directly to a fast counter input. The counter will record every edge the firmware sees, including bounces. On a 5 kHz fast input, a typical button will register 5 … 50 counts per press. That same signal wired to a normal 4 Hz-limited input will register 1 … 2 counts at most, demonstrating the effect of the firmware filter.

5. Function Block Reference for Input Conditioning

The following table maps the most useful LOGO! blocks to debounce / edge-detect / pulse-train tasks. All blocks are available in LOGO! Soft Comfort V8.x and later, in the Special Functions library.

Block Number Function Use case
On-Delay B004 Output goes high T after input goes high Debounce by time, basic input delay
Off-Delay B005 Output goes low T after input goes low Hold-on for relay dropout
On-/Off-Delay B006 Combined on + off delay Suppress brief noise pulses in both directions
Retentive On-Delay B007 Elapsed-time accumulation Long-period debounce / run-time monitor
Wiping Relay (Pulse Output) B010 Edge-triggered single pulse of fixed width One-shot per button press
Wiping Relay (Edge-Triggered) B011 Edge-triggered retriggerable pulse Staircase lighting, time extension
Pulse Generator B015 Symmetric or ratio-based square wave Not for debounce, but a common follow-up
Up/Down Counter B002 / B003 Counts edges on fast inputs Hardware debounce verification
Threshold Trigger B003 (analog) Schmitt-trigger analog comparator Debounce on analog threshold (e.g. 0 … 10 V proximity)

6. Wiring Considerations for Clean Inputs

Even with the 250 ms firmware filter, the wiring layer matters. The following practices keep the firmware's debounce effective and avoid the situations where the filter is bypassed (e.g. by using a fast input unnecessarily):

  1. Use shielded cable for cable runs longer than 10 m, especially near VFD output cables. Ground the shield at one end only (LOGO! end).
  2. Keep input commons grouped: LOGO! 8 inputs share common terminals in groups; do not mix AC and DC sources on the same group.
  3. Source-type wiring for sinking sensors (NPN) requires the sensor common tied to M (0 V) of the LOGO!; the firmware expects positive logic on the input.
  4. Add a 0.1 µF ceramic across the contact if the cable is long and the source is a dry contact – this attenuates RF-induced bounce that is longer than mechanical bounce.
  5. Do not use inputs I1 … I4 as analog (0 … 10 V) and digital on the same channel; the analog path is slower and disables the digital threshold filter.
Safety note: A dry contact that is supposed to be a safety-relevant input (E-stop, guard interlock) should not be debounced in software if the debounce window could mask a fault. Wire the E-stop to a safety relay or a LOGO! CMR safety extension; do not rely on a 250 ms input filter as a safety mechanism.

7. Verification Procedure

To verify the 4 Hz / 250 ms filter is in effect on a 6ED1052-1HB08-0BA1:

  1. Open LOGO! Soft Comfort and connect to the module via Ethernet.
  2. Create a program with one Up Counter (B002) wired to input I1 and a display block showing the count.
  3. Toggle I1 by hand with a piece of wire at a rate of roughly 5 Hz (use a function generator or a slow-bounce free source for repeatability).
  4. Observe the counter: it should increment by 1 per 250 ms window, i.e. 2 … 4 counts per second, never more.
  5. Repeat on a fast input variant (e.g. a 6ED1052-1FB08-0BA1 on I3) – the counter should now follow the source frequency up to 5 kHz.

If the count on a normal input exceeds 4 counts per second, the source signal has a pulse width longer than 250 ms, which means the firmware filter is not the limiting factor – the wiring is delivering a fast or noisy waveform. Add a 10 … 20 ms on-delay in the program to debounce further.

8. Troubleshooting Matrix

Symptom Likely cause Action
Counter increments by 1 per press on a normal input Firmware 250 ms filter on a slow contact; working as intended None – this is the debounce effect
Counter increments by 2 … 3 per slow press on a normal input Source pulse width between 250 ms and 1 s and the input flips twice within the filter window Add On-Delay B004, T = 20 ms before the counter
Counter increments by 10+ per press Input wired to a fast input (5 kHz), firmware filter not applied Move signal to a normal input, or accept the count and divide it in software
Input flag never goes high Wiring polarity reversed on a sourcing sensor; analog mode accidentally enabled on I1 … I4 Verify input voltage > 8.5 V DC; disable analog mode in program
Input flag chatters when motor starts Induced noise on long cable, common-mode pickup Add 0.1 µF cap, use shielded cable, separate from VFD power
Counter works in simulation, not on hardware Cycle time issue – program too long; or wrong input terminal assigned in I/O mapping Check I/O mapping in LOGO! Soft Comfort; verify block count < 400

9. Related Topics and Cross-References

The same 4 Hz / 250 ms input model applies to every LOGO! 8 base unit that lacks fast inputs. The same debounce-by-time-block technique applies to LOGO! 7 (6ED1 052-x series) and to the LOGO! CMR (communication module with relay outputs) safety extension. The fast-input 5 kHz path is documented separately in the LOGO! 8 manual section on counters and frequency measurement, and is functionally equivalent to the high-speed counter (HSC) inputs on a SIMATIC S7-1200 – though without the S7-1200's configurable input filter (which can be set to 0.1 ms … 20 ms per input group via the PLC properties).

For applications where the 4 Hz limit is not fast enough and a fast input is not available on the LOGO! variant in use, the practical options are:

  • Select a different LOGO! variant that includes fast inputs.
  • Pre-scale the input with an external hardware debounce (74HC14 Schmitt trigger + RC network, or a 555-timer one-shot).
  • Migrate to a SIMATIC S7-1200 where the input filter can be tuned per channel.

10. Summary of Key Parameters

Parameter Value
LOGO! 6ED1052-1HB08-0BA1 normal input max frequency 4 Hz
Equivalent minimum pulse width 250 ms
Fast input max frequency (other variants) 5 kHz
Fast input min pulse width 0.1 ms
Per-block program cycle time ~0.1 ms
Recommended debounce for noisy environment On-Delay B004, T = 10 … 20 ms
Wiping Relay blocks for one-shot per press B010 / B011
Threshold for logic 1 on 12/24 V inputs > 8.5 V DC (typical)
Threshold for logic 0 on 12/24 V inputs < 5 V DC (typical)

Does the Siemens LOGO! debounce its digital inputs in hardware?

LOGO! applies a firmware-level rate limit on the input image: normal digital inputs update at a maximum of 4 Hz, which means any pulse shorter than 250 ms is rejected. This performs the function of a hardware debounce, but it is implemented in firmware, not as an analog RC filter on the input pin.

What is the maximum input frequency on a 6ED1052-1HB08-0BA1?

4 Hz on all eight digital inputs. This variant has no fast inputs, so even the I1 … I4 terminals that can be used as analog inputs are limited to the same 4 Hz digital rate.

Which LOGO! variants support 5 kHz fast inputs?

Variants such as the LOGO! 230 RCE (6ED1052-1FB08-0BA1) on inputs I3 … I6, and the LOGO! 12/24 RCEo on I5/I6, expose fast inputs that can be used with the high-speed counter and frequency measurement blocks up to 5 kHz. The 6ED1052-1HB08-0BA1 has no fast inputs.

How do I debounce a fast input on LOGO!?

Place an On-Delay block (B004) with a time of 10 … 20 ms between the fast input terminal and the counter or downstream logic. Pulses shorter than the on-delay time are dropped, while legitimate events are preserved.

Can I rely on the 250 ms filter for an E-stop input?

No. A 250 ms firmware filter is acceptable for normal control inputs but should not be the only debounce mechanism for a safety-relevant input. Use a safety relay or the LOGO! CMR safety extension, and follow the relevant functional-safety standard for the application.

Back to blog