Fornax

RFID tootmisliinil: miks suurem lugemisulatus tegi asja hullemaks

RFID on a production line: why more read range made it worse

11.2026 · lugemisaeg ~5 minNov 2026 · ~5 min read

Puidutoodete tehases tahtsime, et iga toode seotakse liinil automaatselt õige tööetapiga. Esimene lahendus luges liiga hästi ja sidus tooteid valede tellimustega. Siin on kirjas, mis juhtus ja mis lõpuks töötas.

In a wood products plant we wanted every product to be linked to the right process step automatically. The first solution read too well — and assigned products to the wrong orders. Here is what happened and what finally worked.

Lähteülesanne

The task

Tooted liiguvad mööda konveierit ja rippkonveierit läbi mitme tööetapi. Igal tootel on UHF RFID-silt. Eesmärk oli lihtne: kui toode jõuab etappi, peab süsteem teadma, mis toode see on, ja märkima etapi tehtuks, ilma et keegi midagi skanniks.

Products travel on conveyors and overhead lines through several process steps. Each product carries a UHF RFID tag. The goal was simple: when a product reaches a step, the system knows which product it is and marks the step done — without anyone scanning anything.

Esimene katse: üks võimas lugeja

First attempt: one powerful reader

Loogiline mõte oli panna liini kohale pika ulatusega mitme antenniga lugeja, sama klassi seade, mida kasutatakse laoväravates ja inventuuris. Selline lugeja näeb kuni umbes 10 meetri kaugusele ja üks seade katab suure ala.

The obvious idea was a long-range, multi-antenna reader above the line — the same class of device used for dock doors and inventory counts. It reads up to around 10 metres, so one device covers a large area.

Praktikas luges see kõike: kõrvalasuvaid tooteid, naaberliini tooteid ja käru peal ootavaid detaile. Silte seoti valede toodete ja etappidega. Võimsuse vähendamine ja antennide nurkade sättimine parandas olukorda, aga ei teinud seda kunagi täiesti töökindlaks.

In practice it read everything: neighbouring products, products on the next line, parts waiting on a cart. Tags were assigned to the wrong products and steps. Lowering power and adjusting antenna angles helped, but never made it fully reliable.

RFID: long-range reader vs short-range zones A · Pika ulatusega lugejaA · Long-range reader naaberliinneighbouring line konveierconveyor kärucart lugeja, ~10 mreader, ~10 m ✕ sildid seotakse valede toodetega✕ tags assigned to the wrong products B · Lühikese ulatusega tsoonidB · Short-range zones naaberliinneighbouring line A1A2A3 lugemispead, ~1 mreader heads, ~1 m ✓ tsoon = protsessisamm, naabrid jäävad välja✓ zone = process step, neighbours stay out
A: pika ulatusega lugeja näeb kogu ümbrust ja seob sildid valede toodetega. B: lühikese ulatusega pead loevad ainult oma tsooni, ja iga tsoon vastab ühele protsessisammule.
A: a long-range reader sees the whole surroundings and assigns tags to the wrong products. B: short-range heads read only their own zone, and each zone maps to one process step.

Mis töötas: tsoonid

What worked: zones

Lahendus oli vastupidine: lühikese ulatusega (umbes kuni 1 m) tööstuslikud lugemispead igasse kohta, kus midagi olulist toimub. Üks protsessor koos mitme peaga, näiteks neljaga, katab mitu tsooni soodsalt.

The fix was the opposite: short-range (up to about 1 m) industrial reader heads at each point of interest. One processor unit with several heads — say four — covers several zones cheaply.

Eesmärk ei ole „loe täpselt üks silt“, vaid „loe kõik selles tsoonis ja ainult selles tsoonis“.

The goal is not “read exactly one tag”. It is “read everything in this zone, and only this zone”.

Tsoonis võib olla üks toode või kümme. Oluline on, et tsoon oleks füüsiliselt eraldatud: pea konveierilõigu all või rippliinil kõrgusel, kus tooted on loomulikult üksteisest eraldi.

A zone may hold one product or ten. What matters is that it is physically isolated: a head under a conveyor section, or at height on an overhead line where products are naturally separated.

Tarkvara: toorlugemisest sündmuseks

Software: from raw reads to events

Lugeja annab toorlugemisi ja sama silti võidakse lugeda sekundis kümneid kordi. Tarkvara ülesanne on teha neist üks sündmus: „toode X sisenes tsooni Y“.

The reader reports raw reads — the same tag can be read dozens of times per second. The software’s job is to turn them into one event: “product X entered zone Y”.

# toorlugemine -> üks tsoonisündmus (lihtsustatud)
DWELL_S  = 1.0    # silt peab tsoonis olema vähemalt nii kaua
FORGET_S = 10.0   # pärast lahkumist võib silt uuesti siseneda

def on_read(tag, zone, ts):
    key = (tag, zone)
    first, last, sent = state.get(key, (ts, ts, False))
    if ts - last > FORGET_S:              # uus külastus
        first, sent = ts, False
    if not sent and ts - first >= DWELL_S:
        mqtt.publish(f"line/zone/{zone}",
                     {"tag": tag, "event": "entered", "ts": ts})
        sent = True
    state[key] = (first, ts, sent)
# raw read -> one zone event (simplified)
DWELL_S  = 1.0    # tag must stay in the zone at least this long
FORGET_S = 10.0   # after leaving, the tag may enter again

def on_read(tag, zone, ts):
    key = (tag, zone)
    first, last, sent = state.get(key, (ts, ts, False))
    if ts - last > FORGET_S:              # new visit
        first, sent = ts, False
    if not sent and ts - first >= DWELL_S:
        mqtt.publish(f"line/zone/{zone}",
                     {"tag": tag, "event": "entered", "ts": ts})
        sent = True
    state[key] = (first, ts, sent)

Ühendusena on MQTT osutunud töökindlamaks kui otsene TCP/IP-ühendus lugejaga: taasühendumine, puhverdamine ja mitu tarbijat tulevad kaasa. Kasutuselevõtu ajal logi toorlugemisi. Ainult nii saad aru, kust valelugemised tulevad.

For integration, MQTT has proven more reliable than raw TCP/IP socket connections to the reader: reconnects, buffering and multiple consumers come for free. Log raw reads during commissioning — it is the only way to understand cross-reads.

Õppetunnid

Lessons

Sarnane mure liinil?

A similar problem on your line?