ETS6 · Logic · KNX · 9 min read

ETS6 Logic Blocks: AND, OR, Timer, Threshold and Gate Functions

KNX logic blocks allow complex multi-condition automation rules that live entirely on the bus — no external server, no cloud, no single point of failure.

Logic on the KNX bus

KNX logic blocks — available either as dedicated logic controllers (MDT GLK-1216.03) or as inline function blocks embedded in supporting devices — allow you to implement complex automation rules without any external controller. Everything runs on the KNX bus itself: AND conditions, OR conditions, timers, threshold comparators, gate selectors and staircase timers all operate as first-class KNX participants, reading and writing group addresses like any other device.

This matters because KNX logic survives router reboots, internet outages, and home automation server failures. A solar EV dispatch rule or a presence-based lighting scene that runs in a GLK-1216.03 keeps working during a Home Assistant update or a network interruption.

ApproachWhere logic runsExamplesPros / Cons
ETS6 inline function blocksDedicated logic device (GLK, IP Router with logic, Gira HomeServer)MDT GLK-1216.03, MDT IP Router logic functionMost flexible; DIN-rail hardware; survives HA reboot
Actuator parameter logicInside the actuator itselfMDT blind actuator sun/wind logic, MDT thermostat heating/cooling switchoverNo extra device needed; limited to that actuator's context
External controller (HA, Node-RED)Server or Raspberry PiHome Assistant KNX integration, Node-RED KNX nodeMost powerful; depends on server uptime and network

AND gate

The AND gate outputs TRUE only when all N inputs are simultaneously TRUE. It is the most commonly used logic block in KNX because most real automation rules have multiple enabling conditions that must all be satisfied.

A typical use case: start the EV charger only if solar surplus exceeds 2500 W AND the car is physically connected AND the current time is between 09:00 and 17:00 (to avoid drawing grid power in the evening peak). All three conditions must be met — missing any one should hold the charger off.

3-input AND logic — MDT GLK-1216.03 configuration (descriptive)

Logic block 1 — Type: AND (3 inputs)

  Input 1:  GA 6/0/10  (DPT 9.001 — solar surplus W)
            → via threshold comparator: TRUE if value > 2500
  Input 2:  GA 7/0/5   (DPT 1.001 — car connected status)
            → raw binary: TRUE = car connected
  Input 3:  GA 5/0/20  (DPT 1.001 — time window active)
            → from time switch: TRUE between 09:00–17:00

  Output:   GA 7/0/1   (DPT 1.001 — EV charger enable)
            → TRUE only when ALL three inputs are TRUE

  Edge behaviour: output updates on any input change
  Initial value: FALSE (safe default on bus power-up)

OR gate

The OR gate outputs TRUE when any one of its N inputs is TRUE. This is the natural choice for presence detection across multiple zones, alarm aggregation, or any scenario where a condition can be triggered by several independent sources.

A typical use case: activate an alarm indicator light if any of three perimeter PIR sensors detects motion — motion on the garden sensor, the driveway sensor, or the side-gate sensor should all trigger the same response.

3-input OR — perimeter alarm aggregation

Logic block 2 — Type: OR (3 inputs)

  Input 1:  GA 8/0/1   (DPT 1.001 — PIR sensor: garden)
  Input 2:  GA 8/0/2   (DPT 1.001 — PIR sensor: driveway)
  Input 3:  GA 8/0/3   (DPT 1.001 — PIR sensor: side gate)

  Output:   GA 8/0/10  (DPT 1.001 — any perimeter motion)
            → TRUE if ANY sensor is TRUE

  Use: output feeds into alarm AND gate (logic block 5)
       and simultaneously to exterior lights OR gate

NOT gate (inverter)

The NOT gate inverts a binary signal: TRUE becomes FALSE, FALSE becomes TRUE. It is used when a sensor sends the opposite polarity to what an actuator expects, or when a safety signal needs to become an enable signal.

A common use: a window contact sends 1 (TRUE) when open, but the heating valve actuator expects a 1 to mean "heating enabled." A NOT gate between the window contact group address and the heating enable group address inverts the logic — window open (1) becomes heating inhibit (0), window closed (0) becomes heating enabled (1).

NOT gate — window to heating

  • • Input GA 3/0/5: window contact (1 = open)
  • • NOT gate inverts the signal
  • • Output GA 3/1/5: heating valve enable (1 = heating on)
  • • Window closed (0) → heating on (1)
  • • Window open (1) → heating off (0)

NOT gate — actuator polarity

  • • Some valve actuators: 0 = open, 1 = closed
  • • KNX heating controller: 1 = call for heat
  • • NOT gate corrects the polarity mismatch
  • • Avoids rewiring or actuator parameter changes
  • • Documented in ETS6 project as "polarity inversion"

Timer — Delay-ON and Delay-OFF

Timers are among the most important logic blocks in KNX because many sensors generate brief spurious signals. Delay-ON and Delay-OFF handle these in complementary ways.

Delay-ON timer

Input must be continuously TRUE for X seconds before output goes TRUE. Prevents false triggers from brief motion events.

Use case: motion-to-load

  • • PIR fires briefly from a passing shadow
  • • Delay-ON 4s: ignore signals shorter than 4s
  • • Sustained presence triggers the light ON
  • • Prevents lights flickering from wind-blown curtains

Delay-OFF timer

Output stays TRUE for X minutes after input goes FALSE. Extends hold-time for presence detectors.

Use case: presence hold

  • • Presence detector stops detecting (person still present)
  • • Delay-OFF 8 min: keep lights on for 8 more minutes
  • • Prevents lights going off while person is sitting still
  • • Configurable per zone: bathroom 15 min, corridor 3 min

Combined Delay-ON + Delay-OFF for presence lighting

PIR raw signal  →  [Delay-ON 3s]  →  [Delay-OFF 8min]  →  Lighting GA

  PIR fires briefly (2s):
    Delay-ON: 2s < 3s threshold → output stays FALSE → light stays OFF

  PIR sustained (person walks in):
    Delay-ON: input TRUE > 3s → output TRUE → light ON

  Person sits at desk (PIR stops firing):
    Delay-OFF: output remains TRUE for 8 min after PIR drops
    → light stays ON during 8-min hold period
    → resets if PIR fires again within hold window

  After 8 min no motion:
    Delay-OFF expires → output FALSE → light OFF

Threshold comparator

The threshold comparator takes an analog input value (DPT 9.x, DPT 5.x, or DPT 14.x) and compares it to a configured threshold, producing a binary TRUE/FALSE output. A hysteresis band prevents rapid switching when the value oscillates near the threshold.

Use caseInput signalThresholdHysteresisOutput action
Solar EV dispatchPV surplus (W)> 2500 W200 WEV charger enable
CO₂ ventilationCO₂ sensor (ppm)> 1000 ppm50 ppmVentilation ON
High wind blindWind speed (m/s)> 12 m/s2 m/sBlinds retract
Frost protectionOutside temp (°C)< 2 °C1 °CHeating boost ON
Rain detectionRain sensor (0/1)= 1 (rain)n/aBlinds close

Hysteresis is critical: without it, a solar surplus oscillating between 2490 W and 2510 W would switch the EV charger on and off every few seconds. With 200 W hysteresis, the charger turns on at 2500 W and only turns off again when surplus drops below 2300 W — smooth, controlled switching.

Gate (selector)

The gate block selects which of its inputs passes through to the output, controlled by a binary or multi-bit control signal. It acts as a signal router — directing a telegram from one of several sources to a single destination.

A common use: a summer/winter heating mode selector that determines which setpoint group address is forwarded to the valve actuators. In summer mode, the cooling setpoint GA is routed to the actuators; in winter mode, the heating setpoint GA is routed. The occupant switches modes with a single button — the gate reconfigures the routing.

Gate — heating / cooling mode selector

Gate block — 2 inputs, 1 output, 1 control

  Control:  GA 4/0/5  (DPT 1.001 — heating/cooling mode)
            0 = heating mode, 1 = cooling mode

  Input A:  GA 4/1/0  (DPT 9.001 — heating setpoint, e.g. 21.0 °C)
  Input B:  GA 4/1/1  (DPT 9.001 — cooling setpoint, e.g. 25.0 °C)

  Output:   GA 4/2/0  (DPT 9.001 — active setpoint → valve actuators)

  Control = 0 (heating): Output = Input A (21.0 °C)
  Control = 1 (cooling): Output = Input B (25.0 °C)

  Actuators on GA 4/2/0 receive the correct setpoint
  without needing separate group addresses per season

Staircase timer

The staircase timer sends an OFF telegram after a configurable hold period (1 second to 9 hours) following the last ON trigger. It is the standard mechanism for corridor lighting, toilet lighting, and any area where lighting should automatically switch off after a fixed time without requiring a presence detector.

The staircase timer is commonly built into KNX binary input modules (MDT BE-GT2.01, MDT BE-16T.01) and KNX relay actuators — it does not require a separate GLK logic controller. Each push of the button restarts the timer from the full hold period.

Typical hold periods

  • • Stairwell / corridor: 3–5 minutes
  • • Toilet / WC: 10–15 minutes
  • • Storage room: 5 minutes
  • • Underground car park: 2–3 minutes
  • • Office corridor (after-hours): 5 minutes

Warning flash option

  • • MDT actuators: warning flash before OFF
  • • 30s before timeout: light flashes briefly
  • • Person re-triggers button to reset timer
  • • After flash: light switches off fully
  • • Configurable in ETS6 actuator parameters

MDT GLK-1216.03 Logic Controller

The MDT GLK-1216.03 is the most capable dedicated KNX on-bus logic controller available on the DIN-rail. It brings together hardware I/O and a rich logic programming environment accessible entirely from ETS6 — no additional software or gateway required.

Hardware specifications

  • • 12 binary inputs (230V AC / 24V DC)
  • • 16 binary outputs (relay, 230V)
  • • 16 analog I/O (0–10V, 4–20mA, temperature)
  • • 128 KNX scene memory slots
  • • 16 independent logic blocks (configurable per block)
  • • Built-in real-time clock with week program
  • • DIN-rail, 4 module width

Logic block capabilities

  • • AND, OR, NOT, XOR, NAND, NOR
  • • Delay-ON, Delay-OFF, Pulse, Staircase
  • • Threshold comparator with hysteresis
  • • Gate selector (1-of-N routing)
  • • Math functions: +, −, ×, ÷, min, max, avg
  • • Setpoint calculator, ramp generator
  • • All configured in ETS6 — no extra tool

MDT GLK logic programs — example scenarios (descriptive)

Program 1: Solar EV dispatch
  Threshold: PV surplus GA > 2500 W → binary TRUE
  AND: car connected (GA 7/0/5) AND time window 09:00–17:00
  → Output: EV charger enable GA 7/0/1

Program 2: Night cooling (summer)
  Condition: outside temp < indoor temp − 3 °C
  AND: outdoor temp > 15 °C (no frost risk)
  AND: time between 23:00 and 06:00
  → Output: open ventilation flaps GA 2/0/20
  → Simultaneously: fan coil boost mode GA 2/1/5

Program 3: Alarm + lighting cascade
  IF: perimeter PIR OR gate (any zone) = TRUE
  AND: alarm armed (GA 8/0/0) = TRUE
  AND: time between 22:00 and 07:00
  → Output: KNX alarm siren group address pulse
  → Output: all exterior lights GA 1/7/0 = ON (100%)
  → Output: KNX → HA bridge: push notification trigger

Full alarm zone example

A complete multi-condition alarm zone demonstrates how several logic blocks chain together. Three OR inputs aggregate all perimeter PIR sensors; an AND block adds the armed-state and time-window conditions; the output triggers a coordinated response across KNX, audio, and notification systems simultaneously.

Full alarm zone — MDT GLK logic blocks

Block A — OR (3 inputs): perimeter aggregation
  Input 1: GA 8/0/1  PIR sensor: garden
  Input 2: GA 8/0/2  PIR sensor: driveway
  Input 3: GA 8/0/3  PIR sensor: side gate
  Output:  GA 8/0/10 any_perimeter_motion (internal GA)

Block B — AND (3 inputs): alarm condition
  Input 1: GA 8/0/10 any_perimeter_motion  (from Block A)
  Input 2: GA 8/0/0  alarm_armed           (user arms via keypad)
  Input 3: GA 5/0/30 night_window_active   (from time switch)
            → TRUE between 22:00 and 07:00

  Output (pulse, 2s): GA 8/1/0 alarm_trigger

Response chain on GA 8/1/0 = TRUE (1 pulse):
  → GA 1/7/0  exterior lights: all ON (DPT 1.001 = 1)
  → GA 8/2/0  alarm siren: ON (DPT 1.001 = 1, 2s pulse)
  → GA 9/0/0  Sonos all zones: alarm sound scene (DPT 18.001)
  → GA 0/0/5  HA bridge: push notification trigger (DPT 1.001)

Cancel condition:
  alarm_armed = FALSE → Block B output cannot fire
  → all response GAs return to idle state

KNX logic and programming in your panel

We pre-program MDT Logic Controllers and ETS6 logic blocks for complex automation rules — solar dispatch, presence logic, multi-zone scenes — delivered tested and documented.

Request a quote →
Loading...
Back to top