cc · project
· Open source
started 2026-02-16
Bottling Firmware
Control firmware for a high-speed water bottling conveyor: 5000 bottles per minute across three parallel lines, Beckhoff TwinCAT 3 and EtherCAT, written in C++17.
C++
EtherCAT
TwinCAT
Industrial firmware for a water bottling plant, split into three lines of about 1,667 bottles per minute each, coordinated by a facility controller that talks to the MES over OPC UA.
Every line runs the same stack:
- PackML state machine with 17 states.
- Conveyor controller with cam synchronisation.
- 120 fill controllers with cascade PID.
- Reject controller built on a shift register that follows each bottle to the reject point.
- Safety monitor designed to SIL 2.
- CIP (clean-in-place) controller.
Everything sits on an EtherCAT fieldbus with a 50 µs cycle and ±20 ns distributed-clock sync.