web
You’re offline. This is a read only version of the page.
close
Support Portal

How to Read High Switching Frequencies of KTS/KTX Sensors in a PLC Using Oversampling

Explains how oversampling enables PLCs to detect fast switching pulses from high‑speed KTS/KTX sensors without losing signals.
Related Products
contrast sensors

Table of Contents

How to Read High Switching Frequencies of KTS/KTX Sensors in a PLC Using Oversampling

Problem

Sensors such as the KTS or KTX provide very high switching frequencies (up to several kHz). Standard PLC input modules typically scan digital signals only once per PLC cycle (e.g., every 1–10 ms).

As a result:

  • Fast pulses may not be detected
  • The PLC may miss signal transitions
  • Application logic may receive incomplete or incorrect switching information

Environment

  • SICK sensors with high switching frequency (e.g., KTS/KTX)
  • PLC with oversampling-capable digital input modules
  • Fast digital input hardware (e.g., Beckhoff, Siemens High-Speed I/O)
  • Applications with high-speed detection requirements (e.g., print mark detection)

Root Cause

The switching frequency of the sensor is faster than the PLC cycle time. If a signal pulse occurs between two PLC cycles, the pulse may be too short to be registered.

Example:

  • KTS switching frequency: 10 kHz → Pulse width approx. 100 µs
  • PLC cycle time: 5 ms

→ The pulse is 50 times shorter than the PLC scan interval → PULSE LOST

Solution

Use a digital input module that supports Oversampling. Oversampling allows the module to sample the input signal internally at a much higher frequency than the PLC task. The PLC receives an array of samples per cycle instead of a single Boolean value.

This ensures that every fast pulse generated by the KTS/KTX is reliably captured.

Procedure

1. Select an Oversampling-Capable Input Module

Examples (non-exhaustive):

  • Beckhoff EL1xxx‑OS series
  • Siemens ET200SP High-Speed Digital Inputs
  • Other I/O modules with ≤50 µs sample time

Ensure that the sampling rate is equal to or faster than the sensor’s switching frequency.

2. Configure the Oversampling Factor in the PLC

Typical configuration:

  • PLC task: 1 ms
  • Oversampling factor: 10

Result: Sampling interval = 1 ms / 10 = 100 µs

Rule of thumb: Sampling interval ≤ sensor pulse width

3. Read the Oversampling Array in the PLC

In the PLC, the input appears as an array (e.g., BOOL samples[10]) instead of a single bit.


FOR i := 1 TO OversamplingFactor DO
    IF SensorSamples[i] THEN
        PulseDetected := TRUE;
    END_IF;
END_FOR

4. Process the Detected Pulses

Depending on the application, the pulses may be:

  • Counted
  • Time-stamped
  • Used to trigger actions (e.g., print mark evaluation)

Example

Without Oversampling

  • KTS pulse width: 100 µs
  • PLC cycle: 1 ms

→ Pulse is too short → PULSE MISSED

With Oversampling

  • PLC cycle: 1 ms
  • Oversampling: 10×
  • Sampling interval: 100 µs

→ At least one sample detects the pulse → PULSE DETECTED

Additional Notes

  • Ensure proper shielding and grounding for high-speed signals
  • For frequencies above ~20–30 kHz, consider using hardware counters or interrupt inputs
  • KTS/KTX sensors support high-speed operation but require matching I/O hardware
Analogue Input oversampling
Keywords:
KTS, KTX, high switching frequency, fast sensor, PLC, oversampling, high-speed input, sampling rate, print mark, fast digital input, pulse detection