← cd ..

Dual-line print inspection

Two apps that check the print on every blister foil, on two pharmaceutical lines at once, in under 100 ms per frame. I designed and built both, installed them on the factory floor and trained the technicians, in their own language.

Role
Software engineer · field application engineer
Company
Machinify, Budapest
Year
2025
Stack
C# · .NET 8 · WinForms · WPF · TCP/IP
The v2 HMI, in Hungarian, flagging a defect on a blister foil

The v2 operator HMI, in Hungarian, flags a defect on the foil. Camera feed redacted · client details removed.

Context

The problem

On a pharmaceutical packaging line, the text printed on the blister foil (batch, expiry, product) must be readable on every single pack. A smudged or faded print is a compliance failure.

The plant ran two lines at the same time and needed every frame checked live, with operators who could trust the result and act on it.

I built two apps: a Sender, the high-speed engine next to the cameras, and an HMI, the operator's command centre.

Requirements

NeedTarget
SpeedCapture, process and send each frame in under 100 ms
Two linesBoth lines on one I/O card, without interfering
Set-upThe HMI finds the Sender and connects with no configuration
No lost dataA defect image is never lost or left orphaned
LanguageScreens in Hungarian, the technicians' own language, next to English
ComplianceLogin, access by Active Directory group and an audit trail of every action

Architecture

Sender and HMI over TCP/IP

Hover or tap any box for a plain-English explanation.

frames triggers 1 port / line confirmed session re-sync after a crash Camerasline 1 · line 2 I/O cardshared by 2 lines Sender.NET 8 · 1 instance / line<100 ms per frame HMIoperator · WPF in v2 Storageconfirmed defects
tipHover or tap a box to see what it does and why it's there.

Key decisions

The trade-offs that shaped it

ADR-01One TCP port per line

Context
Two lines stream results at the same time, and two HMIs may watch them.
Decision
A dedicated port per line, so each stream is independent and two HMI clients can connect at once.
Trade-off
More ports to open on the plant network, but a slow line never delays the other.

ADR-02Confirm before storing

Context
Writing every defect image straight to network storage risked half-written files and images nobody had reviewed.
Decision
Cache locally and move an image only after the HMI confirms the defect.
Trade-off
Some local disk use; in exchange nothing is lost or orphaned.

ADR-03Recover instead of restarting

Context
On a running line, an operator cannot wait for both apps to be restarted in order.
Decision
The HMI reconnects by itself and re-syncs the session state with the Sender after any crash.
Trade-off
A small state-sync protocol to maintain; production keeps running.

ADR-04Security as part of v2, not an add-on

Context
Pharmaceutical compliance requires knowing who changed what, and when.
Decision
Rebuilt the HMI in WPF with a login. Active Directory groups decide what an operator, an engineer and an admin can control, and every action goes to an audit trail. I wrote the first drafts of the validation documents for its first validation check.
Trade-off
One more step for operators at the start of a shift; every change is now traceable.

ADR-05The technicians' language and feedback first

Context
The people running the line work in Hungarian, and they know the line better than I do.
Decision
Shipped the HMI in Hungarian next to English, trained the technicians on site, collected their feedback during production and changed the screens to match.
Trade-off
Every new screen needs two languages and another round on the floor; the technicians read every message without a translation.

Screens

What the operators use

Camera feeds are blurred and client details removed on purpose.

Outcome

Where it landed

<100 ms
capture, process and send per frame
2
lines running on one I/O card
~496k
blisters counted in two production screens alone
3
roles by Active Directory group, with an audit trail in v2
← Back to all work