Mis programm masinas tegelikult on? CNC programmide ajalugu Gitis
Which program is actually on the machine? CNC program history in Git
Programmid on masina arvutis, mälupulgal ja kellegi kaustas, ja keegi ei tea täpselt, milline koopia kehtib. Lahendus ei olnud uus süsteem operaatoritele, vaid vaikne koguja, mis paneb iga muudatuse ajalukku.
Programs live on the machine PC, on a USB stick and in someone’s folder, and nobody knows exactly which copy is current. The fix was not a new system for operators, but a quiet collector that records every change in history.
Probleem
The problem
- programm on masina arvutis, mälupulgal ja kellegi kaustas, ja keegi ei tea, milline koopia kehtib;
- operaator parandab programmi masina juures ja parandus kaob, kui arvuti vahetatakse;
- detail tuleb valesti ja keegi ei oska öelda, mis eelmise nädalaga võrreldes muutus;
- masinate arvutites on vanad Windowsi versioonid ja tootja tarkvara, mida IT ei saa uuendada.
- the program lives on the machine PC, on a USB stick and in someone’s folder, and nobody knows which copy is current;
- an operator fixes a program at the machine, and the fix is lost when the PC is replaced;
- a part comes out wrong and nobody can tell what changed since last week;
- machine PCs run old Windows versions and vendor software that IT cannot patch.
Lahendus: ainult lugemine ja Git iga masina kohta
The fix: read-only, one Git repo per machine
Iga masina arvuti jagab ainult programmikausta, lugemisõigusega ja ühele teenusekontole. Koguja töötab OT-võrgus, käib kaustad iga 5–15 minuti järel läbi ja kopeerib muutunud failid selle masina Git-reposse. Commit tekib ainult siis, kui midagi muutus.
Each machine PC shares only its program folder, read-only, to one service account. The collector runs inside the OT network, scans the shares every 5–15 minutes and copies changed files into that machine’s Git repo. A commit is created only when something changed.
Koguja ei kirjuta kunagi masinasse. Ainult lugemiseks mõeldud jagamine ja ühendus tagavad, et isegi koguja viga ei saa programmi muuta.
The collector never writes to a machine. Read-only shares and read-only mounts mean that even a bug in the collector cannot change a program.
Mida see annab
What you get
Paljud puidutööstuse CNC-vormingud on tekstifailid (näiteks woodWOP .mpr, Biesse .cix/.bpp, SCM Xilog .xxl), nii et Git näitab täpselt, milline rida muutus. Binaar- ja pakitud vormingud salvestatakse muutmata kujul, aga ka nende muudatuste ajalugu on olemas.
Many woodworking CNC formats are text (e.g. woodWOP .mpr, Biesse .cix/.bpp, SCM Xilog .xxl), so Git shows exactly which line changed. Binary or zipped formats are stored as-is and still get a change history.
# näide: mis muutus masinas cnc-02?
$ git -C repos/cnc-02 log --oneline -3
4f1c2a9 cnc-02: 1 files changed (scan 2026-11-12T06:15:02+00:00)
a83d0e1 cnc-02: 3 files changed (scan 2026-11-10T14:30:11+00:00)
19be7c4 cnc-02: 2 files changed (scan 2026-11-06T09:45:40+00:00)
$ git -C repos/cnc-02 diff a83d0e1 4f1c2a9 --stat
programs/panel_A12.cix | 2 +-
# example: what changed on machine cnc-02?
$ git -C repos/cnc-02 log --oneline -3
4f1c2a9 cnc-02: 1 files changed (scan 2026-11-12T06:15:02+00:00)
a83d0e1 cnc-02: 3 files changed (scan 2026-11-10T14:30:11+00:00)
19be7c4 cnc-02: 2 files changed (scan 2026-11-06T09:45:40+00:00)
$ git -C repos/cnc-02 diff a83d0e1 4f1c2a9 --stat
programs/panel_A12.cix | 2 +-
Disainiotsused
Design decisions
- Koguja töötab OT-võrgus. Masinate arvutid ei vaja kunagi ühendust kontorivõrguga.
- Vanad masinad võivad osata ainult SMB1. Ära luba SMB1 kogu ettevõttes. Luba see ainult koguja ühenduses selle ühe masina jaoks, hoia masin eraldatud võrgusegmendis ja kirjuta erand üles koos kuupäevaga, millal arvuti vahetatakse.
- Väljalülitatud masin ei ole viga. Logi „kättesaamatu“ ja proovi järgmisel korral. Häire alles mitme järjestikuse ebaõnnestumise järel ja tööajal.
- Kogu programme, tööriistatabeleid, masina parameetrite eksporte ja postprotsessorite seadeid. Ära kogu operatsioonisüsteemi faile, pidevalt kasvavaid logisid ega isikuandmeid.
- Commiti autor on koguja teenus, mitte inimene. Jagatud kaustast ei saa teada, kes programmi masina juures muutis, ja ei tasu teeselda, et saab.
- The collector runs inside the OT network. Machine PCs never need a route to the office network.
- Old machines may only speak SMB1. Do not enable SMB1 company-wide. Enable it only on the collector’s mount for that one machine, keep the machine in an isolated segment, and record the exception with a replacement date.
- A machine that is switched off is not an error. Log “unreachable” and retry next cycle. Alert only after several consecutive failures during working hours.
- Collect programs, tool tables, machine parameter exports and post-processor configs. Not operating system files, ever-growing logs or anything with personal data.
- The commit author is the collector service, not a person. The share cannot tell you who changed the program at the machine — do not pretend it can.
Õppetunnid
Lessons
- Alusta vaatlemisest. See ei ole DNC-süsteem, mis saadab programme masinatesse. Programmide tagasi saatmine on eraldi ja palju riskantsem samm.
- Üks repo masina kohta, siis järgivad ajalugu ja õigused masinat.
- Kaitse põhiharu, et ajalugu ei saaks ümber kirjutada.
- Järgmised sammud: väike veebiliides (masina viimased programmid, kuupäevade võrdlus, otsing), programmi sidumine tellimuse või detailiga ja häire, kui tootmises kasutatav programm muutub väljaspool tööaega.
- Start by observing. This is not a DNC system that sends programs to machines. Sending programs back is a separate and much riskier step.
- One repo per machine, so history and permissions follow the machine.
- Protect the main branch so history cannot be rewritten.
- Next steps: a small web UI (latest programs per machine, diff between dates, search), linking a program to the order or part that uses it, and an alert when a production program changes outside working hours.
Sarnane mure liinil?
A similar problem on your line?