1. Problem Definition: Missed Pulses on a Running Line
On a packaging or bottling line, waste-product rejection counters are commonly driven by an inductive sensor or photo-eye that produces a short digital pulse every time a defective unit passes. The pulse width is typically in the 100 µs to 5 ms range, depending on the conveyor speed, sensor type, and the physical length of the reject flag.
When a Siemens S7-1517 CPU is paired with ET 200SP distributed I/O on a shared PROFINET segment that already carries frequency inverters and servo drives, two timing budgets can collide:
- Process image update time (PII): the time between a real edge on the input terminal and that bit becoming true inside the cyclic OB1.
- PROFINET refresh time: the bus cycle plus the application relationship (AR) latency through the IM 155-5 PN interface.
If the sensor pulse is shorter than the sum of these two values, the OB1 will never see a true "1" on that input. The classic symptom is a counter that is off by a small integer for every thousand units produced. On Rockwell ControlLogix this is fixed by configuring Off-Delay / Pulse Stretch in the 1734 module properties. The equivalent Siemens capabilities exist, but they are spread across the module catalog, the device configuration, and the OB architecture.
2. Root Cause: Why a "Fast Enough" DI Still Drops Pulses
The Siemens ET 200SP DI modules listed below are advertised with input filter values as short as 50 µs. That number only governs the debounce applied at the terminal itself. After the terminal, the bit still has to be transported into the controller process image:
- The IM 155-5 PN ST samples the input at its hardware filter time (e.g., 0.05 ms on an HF module).
- The bit is published in the next PROFINET cycle. With IRT and isochronous mode this can be sub-millisecond; without isochronous mode, the typical send clock is 1 ms with a watchdog multiplier of 3, producing a refresh window of up to 3 ms.
- The S7-1500 PII is updated at the start of OB1 or, for partial updates, at the configured update point.
- OB1 executes application code. On a 1517 the OB1 cycle can be 1–4 ms with a fully loaded program.
If the input pulse is true for less than the IM refresh window + OB1 cycle time, OB1 will read a stale "0" on both the rising and the falling edge. The pulse was electrically captured, but logically invisible to the application.
3. ET 200SP Digital Input Module Selection Matrix
The following modules are the relevant Siemens catalog numbers for high-speed waste counting on an ET 200SP station. Confirm the active firmware version in the device configuration before commissioning, as some interrupt and counter features require firmware ≥ V1.0 and were expanded in later releases (V2.0, V3.0).
| Article Number | Designation | Channels | Min. Input Filter | Pulse Stretch | Counter | HW Interrupt | Isochronous |
|---|---|---|---|---|---|---|---|
| 6ES7131-6BH00-0BA0 | DI 16x24VDC BA (Basic) | 16 | 3.2 ms (typ.) | No | No | No | No |
| 6ES7131-6BF00-0AA0 | DI 8x24VDC ST (Standard) | 8 | 0.1 ms – 20 ms | No | No | No | Yes |
| 6ES7131-6BF00-0DA0 | DI 8x24VDC HF (High Feature) | 8 | 0.05 ms – 20 ms | Yes | Yes (up/down, freq., period) | Yes (rising, falling, both) | Yes |
| 6ES7131-6BF00-0CA0 | DI 8x24VDC HS (High Speed) | 8 | 0.05 ms – 20 ms (sub-µs oversampling) | Yes | Yes (extended range) | Yes | Yes |
| 6ES7138-6BA00-0BA0 | TM Count 1x24V (Counter module) | 3 (encoder) | n/a | n/a | Yes (32-bit, A/B, up/down, freq.) | Yes | Yes |
| 6ES7138-6CG00-0BA0 | TM PosInput 1 (Position input) | 2 (incremental) | n/a | n/a | Yes | Yes | Yes |
Reference the live Siemens product pages and the ET 200SP System Manual on the official Siemens Industry Online Support portal to verify article numbers against the current product phase-out and successor data. Search terms "ET 200SP system manual" and "DI 8x24VDC HF" return the matching documentation set.
4. Option 1 – Configure the Input Filter on HF Modules
The first and cheapest fix is to simply match the input filter to the pulse width. The DI 8x24VDC HF (6ES7131-6BF00-0DA0) supports input filters from 0.05 ms (50 µs) through 20 ms, configurable per channel in TIA Portal under Device Configuration → DI 8x24VDC HF → Inputs → Channel [n] → Input filter.
Procedure
- Measure the actual sensor pulse width with an oscilloscope at the ET 200SP terminal block, not at the sensor head. Long cable runs and shielded/unshielded routing change the edge rate.
- Set the input filter to approximately 1/3 of the measured pulse width. For a 1 ms pulse, choose 0.3 ms (closest available: 0.4 ms on most HF firmware revisions).
- Set "Pulse stretching" to "Off" for this option (pulse stretching is described in section 5).
- Compile the hardware configuration and download to the S7-1500.
Use this method when the pulse is reliably longer than the PROFINET refresh window. The input filter alone does not stretch the bit into the next OB1 cycle, so if OB1 occasionally overruns, you still lose pulses during the overrun.
5. Option 2 – Pulse Stretching (Eingangsentprellung / Impulsverlängerung)
The HF and HS DI modules support a "Pulse stretching" parameter that holds the input true for a configurable duration after the rising edge. This is the direct functional equivalent of the Allen-Bradley Off-Delay on a 1734-IB8 module.
In TIA Portal the parameter is found at Device Configuration → DI 8xHF → Inputs → Channel [n] → Pulse stretching. The stretch length is selectable in steps from 0 ms to 1000 ms depending on firmware.
Operating principle
- The terminal hardware captures the short pulse and holds the internal bit true for the configured stretch time.
- The bit is then transported into the process image, where it remains true for the duration of the stretch.
- OB1 is guaranteed to read at least one true on that input as long as the stretch exceeds the worst-case OB1 cycle time.
Use this option when you must keep a single digital input in the PII for OB1 to read. A typical stretch value is the OB1 worst-case cycle plus 50%: for a 4 ms worst case, use 6 ms.
6. Option 3 – Direct Peripheral Access (I:P) Inside a Time-Interrupt OB
S7-1500 inputs can be read twice: once through the process image (%I0.0) and once directly through the peripheral area (%I0.0:P). The peripheral access returns the live value of the input as of the OB execution, bypassing the PII update. This lets a fast cyclic interrupt OB count pulses that the slower OB1 would miss.
Configuration
- In TIA Portal, add a Time-of-Day Interrupt OB (OB10) or a Cyclic Interrupt OB (OB30–OB38). Select OB30 for 1 ms, OB35 for 100 ms, OB37 for 250 µs, OB38 for 500 µs. S7-1500 supports cyclic interrupt times from 250 µs upward.
- Set the phase offset so the OB does not collide with OB1 startup.
- In the OB, increment a global counter using the direct peripheral read, e.g.:
// OB30 - 1 ms cyclic interrupt
IF "%I0.0:P" THEN
"dbWasteCount".pulses_this_ms := "dbWasteCount".pulses_this_ms + 1;
END_IF;
- In OB1, on every cycle, add the per-millisecond pulse total to the running reject counter, then clear the per-cycle counter:
// OB1 - main cycle
"dbWasteCount".total := "dbWasteCount".total + "dbWasteCount".pulses_this_ms;
"dbWasteCount".pulses_this_ms := 0;
The interrupt OB must execute fast enough to read every pulse. At a 250 µs cycle and a 1 ms pulse width, the OB will see the input true on at least three consecutive interrupts. The trade-off is watchdog: S7-1500 OBs fault if they exceed their configured time. Keep the OB body under 200 µs and avoid any communication calls inside it.
7. Option 4 – Dedicated Counter Module (TM Count / HF Counter Mode)
The most robust answer is to use a counter module. On the ET 200SP, two paths exist:
- DI 8x24VDC HF (6ES7131-6BF00-0DA0) in Counting mode: each channel can be configured as a 32-bit up, down, or up/down counter with hardware gate and comparator outputs.
- TM Count 1x24V (6ES7138-6BA00-0BA0): a dedicated counter and measurement module supporting encoder inputs (24 V single-ended, RS422 differential via TM), with counting rates up to 200 kHz depending on firmware.
The HF module in counting mode is the lowest-cost solution that is still immune to OB1 timing. Once configured, the count is held in the module's own register and reported to the PLC as a process data word. You read the value in OB1 and the count is never lost to a short pulse.
Configuration steps for HF counting
- Open the device properties of the DI 8xHF in TIA Portal.
- Select the channel, change operating mode from "Digital input" to "Counting".
- Set the count direction (up / down), the gate control (internal / external / HW gate), and the upper count limit (32-bit).
- Assign the comparator output (DO channel) if a hardware reject pulse is needed; otherwise poll the count via the process data.
- Compile and download.
For higher rates (above 10 kHz) or where the same module must drive the reject actuator, choose the TM Count 1x24V module. Its firmware exposes frequency measurement, period measurement, and oversampling modes not present on the HF DI module.
8. Option 5 – Hardware Interrupts on Rising Edge (OB40)
The HF and HS DI modules can be configured to raise a hardware interrupt on a rising edge. The interrupt fires regardless of the OB1 schedule and invokes OB40. Inside OB40 you read the channel that triggered the interrupt and increment a counter.
Configuration path: Device Configuration → DI 8x24VDC HF → Inputs → Channel [n] → Hardware interrupt → Rising edge = enabled. In the PLC program, create OB40 and inspect the local OB40 hardware-ID variables ("LHWOBID") to identify which channel fired.
// OB40 - hardware interrupt
IF "DI_HF_Count_Channel_0" THEN // channel 0 event flag
"dbWasteCount".total := "dbWasteCount".total + 1;
END_IF;
Hardware interrupts run independently of the PROFINET PII update and have typical latency in the 100 µs to 1 ms range depending on the IM 155-5 PN interface load. The risk is OB40 storming: if the sensor bounces or you accidentally enable both edges plus a high-count source, the OB40 watchdog will fault. Always configure the input filter to at least 100 µs on interrupt-driven channels and de-bounce in software.
9. Option 6 – Isochronous Mode on PROFINET with IM 155-5 PN ST
If the line runs deterministic servo and drive axes, the IM 155-5 PN ST interface (6ES7155-5AA00-0AB0) supports isochronous (IRT) mode. In isochronous mode, the input sample instant and the OB61–OB64 execution are aligned to the PROFINET send clock. This guarantees a fixed input transport time (Ti) regardless of the OB1 jitter.
To enable isochronous mode:
- Set the IM 155-5 PN ST to "RT class IRT" in the PROFINET interface properties.
- Enable "Isochronous mode" on the DI 8xHF module.
- Create OB61 (isochronous interrupt) in the S7-1500 program.
- Set the send clock to a value that fits the pulse width and the servo cycle. 1 ms is the most common choice for lines with 250 µs servo cycles.
Isochronous mode combined with a 1 ms send clock reliably captures any pulse wider than 1 ms. For pulses shorter than 1 ms, you still need the methods in sections 5, 7, or 8.
10. TIA Portal Configuration Checklist
- Project tree: open the S7-1500 station → Devices → ET 200SP station → DI module.
- Module parameters: verify the firmware version. Update to the latest service pack if the firmware is below the documented level for the desired feature. Use the Siemens Industry Online Support entry for the article number and check "Product support → Firmware updates".
- Channel parameters: set the input filter to the smallest value that still rejects electrical noise on the cable (typical 0.1–0.4 ms for industrial sensors).
- Counter / interrupt configuration: select the operating mode (DI, count, measure) per channel. Each channel of an HF module can be either a digital input or a counter, not both.
- PROFINET topology: ensure the ET 200SP port is configured for the correct send clock and update time. Mismatched clocks are the most common cause of "pulse vanished after network redesign" reports.
- OB1 cycle time: measure with "RT_INFO(OB1, CYCLETIME)" and store the worst case. Use that worst case to size the pulse stretch or the interrupt priority.
- Watchdog: for OB30/OB35/OB40 set the OB time error behaviour to "Do not change operating state" if the application tolerates it, or add diagnostics that auto-reset on transient overload.
11. Verification Procedure
After commissioning, verify the count against a physical reference. A reproducible test is a signal generator feeding a known number of pulses at a known width into the ET 200SP input, while the line is running. Capture the count after one minute and compare to the generator count.
// Watch table test
a := RT_INFO(OB1, CYCLETIME); // worst case OB1 cycle
b := "dbWasteCount".total; // reported total
c := "HWID_Gen_Pulses_Sent"; // known reference
Acceptance criteria:
- Reported count equals reference count within ±0.1% over 60 seconds.
- No OB30 / OB35 / OB40 watchdog faults in the diagnostic buffer.
- No "Loss of PROFINET AR" or "Station failure" entries in the S7-1500 diagnostic buffer for the ET 200SP station.
Diagnostic paths
- TIA Portal online → Devices & Networks → ET 200SP station → Online & Diagnostics: shows live IM state, port statistics, and module diagnostic buffer.
- PLC online → Diagnostics buffer: lists every PROFINET transition, OB30/40 overflow, and module-specific diagnostic event with timestamp and OB reference.
- Module front LEDs: green DI channel LED for active pulse, red MT/MT2 LED for module or station fault. A flickering red during normal operation indicates communication instability, not an input problem.
12. Decision Matrix: Which Option to Choose
| Scenario | Pulse Width | Recommended Option | Cost / Effort |
|---|---|---|---|
| Pulses reliably longer than 4 ms | ≥ 5 ms | Tune input filter (Section 4) | Configuration only |
| Pulses 1–4 ms, OB1 cycle < 2 ms | 1–4 ms | Pulse stretching (Section 5) | Configuration only |
| Pulses 0.5–2 ms, OB1 cycle 2–5 ms | 0.5–2 ms | Hardware interrupt OB40 (Section 8) | Module change (ST → HF) |
| Very fast or noise-sensitive pulses | < 0.5 ms | Direct peripheral in OB30 (Section 6) or counter module (Section 7) | Module change (ST → HF / TM Count) |
| Drives and high-speed I/O on the same PN segment | any | Isochronous mode (Section 9) + counter module (Section 7) | Topology change |
13. Practical Pitfalls and Field Notes
- Basic (BA) modules cannot stretch. The 6ES7131-6BH00-0BA0 and 6ES7131-6BF00-0AA0 (Standard) modules do not support pulse stretching or counter mode. If the cabinet is being designed around the BA line, pulse counting at sub-millisecond widths will fail.
- Watchdog multiplier on PROFINET: a default watchdog of 3 ms on a 1 ms send clock means a missed PROFINET frame is acceptable once and only once. Pairing ET 200SP with multiple drives on a non-isochronous segment pushes the worst-case refresh window above 4 ms.
- Shared PROFINET with drives: SINAMICS drives configured for IRT leave limited bandwidth for non-isochronous ET 200SP. Either keep the waste counter ET 200SP on its own PROFINET segment or commit the whole segment to IRT with isochronous mode.
- Pulse catch vs. pulse stretching: pulse catch (Impulsfang) on S7-1200/S7-1500 is a CPU function that latches a short input pulse until the next OB1 read. It is functionally similar to pulse stretching but applied inside the PII. It is enabled per channel in the device configuration and uses the same parameter field as the input filter. Confirm availability in the firmware version of the module you have.
- Channel count vs. module count: an HF module has 8 channels. You can mix modes (3 channels as counters, 5 as plain DI), but each mode change triggers a re-parameterisation of the module and a short PROFINET AR reset.
- Watchdog on OB30 / OB35: a cyclic interrupt OB that takes longer than its configured cycle will fault the CPU. Keep the OB body to the peripheral read and a single add. Move any logging, HM I updates, or array copies into OB1.
14. Related Controllers and Architectures
If the line is otherwise S7-1200 based, the same DI 8x24VDC HF and HS modules are supported by the S7-1200 CPU firmware. The PULSOP instruction and the "pulse catch" CPU function are available there natively, and the same TIA Portal configuration steps apply.
If the project will eventually move to ET 200MP rather than ET 200SP (for example, to keep an existing cabinet design), the equivalent S7-1500 module is the DI 32x24VDC HF (6ES7521-1BL00-0AB0), which offers the same input filter range, pulse stretching, and counter modes on a per-channel basis. Some users report that ET 200MP HF modules have less jitter under heavy PROFINET load than ET 200SP HF modules of the same vintage; verify on a bench before committing to a topology.
15. Summary
The Siemens ET 200SP will not drop pulses that the Allen-Bradley ET 200SP does, provided the matching capability is configured. Five levers exist, in increasing capability and cost:
- Input filter on HF modules (50 µs minimum).
- Pulse stretching on HF / HS modules.
- Direct peripheral access inside a 250 µs–1 ms cyclic interrupt OB.
- Hardware interrupts on rising edge with OB40.
- Dedicated counter mode on HF modules or the TM Count 1x24V module.
For a production line where the sensor pulse is shorter than the worst-case PROFINET refresh window, the most reliable and lowest-effort fix is the DI 8x24VDC HF (6ES7131-6BF00-0DA0) in counter mode, paired with a configured OB1 read cycle of the module's process data. For higher rates, step up to the HS variant (6ES7131-6BF00-0CA0) or the dedicated TM Count 1x24V (6ES7138-6BA00-0BA0). Always verify with a signal generator test and the diagnostic buffer before handing the line over to production.
FAQ
What is the minimum sensor pulse width an ET 200SP DI 8xHF module can capture?
The DI 8x24VDC HF module (6ES7131-6BF00-0DA0) supports an input filter as low as 0.05 ms (50 µs). However, a pulse shorter than the PROFINET refresh window plus the OB1 cycle time will not appear in the process image. For sub-millisecond pulses, enable pulse stretching, use counter mode, or read the input directly with %I:P inside a fast cyclic interrupt OB.
Can I use pulse stretching and counter mode on the same channel of an HF module?
No. Each channel of the DI 8xHF can be configured either as a digital input (with optional pulse stretching and hardware interrupt) or as a counter. They are mutually exclusive at the channel level. Split the signal across two modules or use the dedicated TM Count 1x24V module for the counting function.
Is pulse catch (Impulsfang) available on the S7-1500 with ET 200SP?
Yes. The CPU-level pulse catch function is available on S7-1200 and S7-1500 CPUs. It latches a short input pulse and holds the bit until the next OB1 update. Enable it per channel in the device configuration. Functionality overlaps with the module-level pulse stretching; choose one approach per channel to avoid double-stretching.
How do I read inputs faster than the OB1 cycle?
Use direct peripheral access (%I0.0:P) inside a cyclic interrupt OB such as OB30 (1 ms) or OB37 (250 µs). The direct read bypasses the process image and returns the live input value as of the OB execution. Increment a per-cycle counter inside the OB and merge the total into the running count inside OB1.
What causes a "missed pulse" after a network change to the PROFINET segment?
The most common cause is a non-isochronous PROFINET segment carrying both drives and ET 200SP modules, which raises the worst-case refresh window above the input pulse width. Solutions: put the ET 200SP station on its own PROFINET segment, enable IRT and isochronous mode on the IM 155-5 PN ST, or move the counting to a dedicated TM Count module that does not depend on the process image timing.