Analyze CNC | Beta v0.94 | Python / Kivy / SQLite
ACNC is a public source-available Python project for analyzing CNC controller communication, organizing machine data, and preparing safer parameter workflows before any real machine write is attempted.
The current repository contains the ACNC v0.94 beta/community edition. It is strongest today as a desktop UI shell, protocol and persistence framework, session safety layer, diagnostic data model, and engineering reference implementation. It is not a certified CNC controller, motion controller, production restore tool, or direct replacement for machine-vendor service procedures.
CNC diagnostics and service work often depends on scattered parameters, controller-specific communication tools, fragile backups, handwritten notes, and direct machine access. This creates practical risks:
- Parameter changes may be made without a repeatable preparation, review, and rollback path.
- Faults and symptoms are often investigated separately from machine state and session history.
- Older machines may expose serial, fieldbus, TCP, or USB interfaces without a consistent operator workflow.
- Testing against physical CNC equipment can be risky unless communication and write behavior are isolated and verified.
ACNC addresses these issues by treating CNC interaction as an auditable engineering workflow rather than a raw terminal session.
The long-term ACNC vision is a family of CNC analysis, diagnostic, reconstruction, and manufacturing-support tools developed by Dromation.
This repository is the public v0.94 beta/community foundation. It demonstrates the architecture, safety model, protocol abstraction, local data layer, fault-analysis direction, and operator UI concept. Future commercial products such as ACNC Next and ACNC MES are separate products and are not included in this repository.
ACNC is designed to help engineers and technicians:
- inspect and organize CNC machine parameters,
- connect communication workflows to a local machine/session database,
- separate read-only analysis from potentially unsafe write operations,
- prepare write plans before confirmation,
- dry-run and verify write behavior,
- keep rollback information for failed or rejected writes,
- compare and correlate collected data,
- search fault-tree and FMEA-oriented diagnostic content,
- review early reconstruction data without driving machine motion.
ACNC structures CNC work as a gated sequence:
Observe -> Log -> Analyze -> Prepare -> Dry run -> Confirm -> Verify -> Roll back if needed
The application keeps UI actions, session state, persistence, protocol drivers, and hardware communication behind separate layers. This makes the project easier to test and helps prevent accidental writes from being treated the same as read-only scans or analysis actions.
- Provide a practical beta desktop application for CNC data analysis and protocol experimentation.
- Keep dangerous operations behind explicit preparation and confirmation steps.
- Support multiple industrial communication paths through a shared driver abstraction.
- Build a local SQLite-backed engineering record of machines, parameters, sessions, checks, and analysis results.
- Provide enough public implementation detail for review, learning, and controlled experimentation.
- Keep production hardware control, certified safety, and commercial MES features outside this public beta.
For v0.94, the repository focuses on:
- a working Kivy/KivyMD desktop application shell,
- an 11-screen navigation structure,
- protocol driver modules for RS232, RS485, Modbus, CAN, TCP/IP, and USB-oriented workflows,
- safe session command handling,
- local persistence through SQLite,
- fault-tree and FMEA search/navigation data,
- parameter profile workflows,
- dry-run, verification, and rollback concepts,
- reconstruction review tooling limited to geometric/topology data.
| Area | Available Now | In Development | Planned |
|---|---|---|---|
| Desktop UI | Kivy/KivyMD shell, toolbar, drawer navigation, 11 screens | UI polish and workflow completion | Production operator manual and installer |
| Protocols | RS232, RS485, Modbus, CAN, TCP/IP, USB driver modules and selector workflows | Real controller connectivity validation | Adapter compatibility matrix |
| Session safety | Prepare/confirm writes, analytical write gate, dry-run, verification, rollback records | Broader planner UI coverage | Certified production safety workflow outside this beta |
| Persistence | SQLite schema, machine/session/parameter/check storage | Expanded comparison views | Production database and role model outside this beta |
| Diagnostics | FTA/FMEA catalog search, structured links, report/checklist direction | Deeper machine-specific diagnostic packs | Commercial diagnostic knowledge products |
| Reconstruction | Geometry/topology review and wizard concepts | Later reconstruction phases | No live motion output in this beta |
| G-code | Screen shell and file workflow pieces | Complete user-facing file workflow | Production CAM/machine workflow integration outside this beta |
graph TD
User["Operator / engineer"] --> App["acnc.py / ACNCApp"]
App --> Root["data/data1.py / RootWidget"]
Root --> Screens["screens/*"]
Screens --> Commands["data/code/session_commands.py"]
Screens --> Session["session.py / ACNCSession"]
Session --> Database["data/persistence.py + data/schema.sql / SQLite"]
Session --> DriverAPI["protocols/protocol.py / ProtocolDriver"]
DriverAPI --> Drivers["RS232 / RS485 / Modbus / CAN / TCP-IP / USB"]
Database --> FTA["ftas/* diagnostic catalog data"]
Screens --> FTA
Drivers --> Isolation["isolated hardware / firmware interface required"]
Isolation --> CNC["CNC machine / controller"]
The main application entry point is acnc.py. It creates the KivyMD app, initializes the local database, starts an ACNCSession, and loads the root widget.
The UI is organized under screens/ and assembled through data/data1.py. Screens expose workflows for machine setup, protocols, commands, diagnostics, reconstruction, reports, settings, and related beta functions.
The session layer lives primarily in session.py and data/code/session_commands.py. This layer is responsible for separating reads from writes, preparing commands, dry-running plans, confirming writes, verifying results, and recording rollback data.
Persistence is handled by data/persistence.py and data/schema.sql. The local SQLite model stores machines, sessions, parameters, scan data, checks, and analysis-oriented records.
Protocol behavior is abstracted through protocols/protocol.py and implemented in individual drivers under protocols/. The codebase includes modules for RS232, RS485, Modbus, CAN, TCP/IP, and USB-oriented communication workflows.
.
|-- acnc.py
|-- session.py
|-- requirements.txt
|-- acnc_next_logo.png
|-- acnc_logo_red.png
|-- data/
| |-- data1.py
| |-- persistence.py
| |-- schema.sql
| `-- code/
|-- screens/
|-- protocols/
|-- ftas/
|-- docs/
|-- tests/
|-- LICENSE
|-- SECURITY.md
`-- README.md
Notable documentation:
docs/FUNCTIONAL_OVERVIEW.mddescribes the implemented beta behavior and current boundaries.docs/ARCHITECTURE.mddescribes the software layers and runtime flow.docs/SAFETY_AND_HARDWARE.mdexplains hardware isolation requirements and safety limits.docs/ROADMAP.mdtracks completed, partial, and future work.docs/DEVELOPMENT_AND_TESTING.mddescribes local development and test execution.
- Python 3.10 is recommended for the current dependency set.
- Windows is the primary development environment used for this beta.
- No CNC hardware should be connected directly to a PC port.
- Any real hardware experiment requires an isolated adapter, firmware interface, and machine-specific review.
Python dependencies are listed in requirements.txt:
kivy==2.3.0kivymd==1.1.1numpy==1.26.4pymodbus==3.2.2pyserial==3.5pyusb==1.2.1python-can==4.4.2
git clone https://github.com/dromation/acnc.git
cd acnc
python -m venv .venv
.\.venv\Scripts\Activate.ps1
python -m pip install --upgrade pip
pip install -r requirements.txtRun the desktop app:
python acnc.pyCommon beta workflows:
- open the app and navigate through the drawer-based screen structure,
- configure or select a protocol workflow,
- create and save machine/connection profiles,
- inspect and organize parameters,
- prepare parameter writes before confirmation,
- dry-run command plans before applying them,
- use the command console and terminal-oriented session commands,
- search FTA/FMEA diagnostic content,
- review reconstruction geometry/topology data without machine motion.
Run the test suite from the repository root:
python -m unittest discover -s tests -vThe v0.94 repository currently has 106 passing tests covering:
- persistence and schema behavior,
- session safety behavior,
- protocol abstraction and driver-level workflows,
- write verification and rollback logic,
- FTA/FMEA search and structured links,
- comparison, correlation, and restore-planning backend logic,
- reconstruction and checklist/report data flows.
ACNC v0.94 is a beta/community release. It is suitable for code review, local experimentation, UI workflow review, protocol-layer development, and offline engineering tests.
It is not suitable for direct production CNC operation, certified machine safety, unattended writes, or motion control.
Completed in the current beta:
- UI shell and 11-screen application structure,
- local SQLite persistence layer,
- protocol driver abstraction and initial driver modules,
- machine/session/parameter data model,
- prepare/confirm write safety gate,
- dry-run, verification, and rollback concepts,
- FTA/FMEA search and diagnostic-link workflows,
- report/checklist data direction,
- reconstruction geometry/topology review foundation.
Partial or ongoing:
- complete G-code screen workflow,
- physical controller connectivity validation,
- memory restore planner UI,
- reconstruction later phases,
- hardware adapter validation,
- broader UI polish.
Not included in this public beta:
- certified safety controller functionality,
- direct live motion control,
- production MES workflows,
- production installer and deployment system,
- commercial ACNC Next functionality.
- Physical CNC controller tests are not complete.
- Hardware isolation and electrical safety are not validated by this software.
- Some UI screens include prototype or partial workflows.
- G-code file handling is not a complete production workflow.
- Reconstruction is limited to review-oriented data and must not be treated as live machine output.
- Real write behavior depends on protocol driver behavior, hardware interface design, and machine-specific review.
ACNC must not be connected directly to CNC control hardware without an isolated interface. A computer serial, USB, CAN, or network port should not be wired directly into machine electronics.
Software safety gates reduce workflow risk, but they do not certify electrical safety, machine safety, or operator safety. Emergency stop, interlocks, isolation, firmware behavior, and machine-vendor procedures remain external requirements.
The current beta separates read/scanning actions from write actions. Write behavior is designed around preparation, dry-run, explicit confirmation, verification, and rollback records. These controls are engineering aids, not a guarantee that a real machine action is safe.
Security and vulnerability reporting details are in SECURITY.md.
Contributions should respect the safety model and the current repository boundary:
- keep read-only analysis separate from writes,
- add tests for protocol, persistence, and session changes,
- do not add direct machine-control shortcuts around confirmation gates,
- keep hardware assumptions explicit,
- do not include private Dromation planning documents or closed-source product material.
Do not assume hardware access is safe. Treat every write path as a safety-sensitive operation.
This repository is distributed under the ACNC Limited Source-Available Demo License Version 1.2. The public code is available for evaluation, personal use, non-commercial use, and educational use under the terms in LICENSE.
Commercial use, redistribution as part of a commercial service, and production deployment require a separate written agreement with Dromation.
ACNC Next and ACNC MES are separate closed-source products and are not licensed as part of this repository.
This project is part of the Dromation open-source engineering portfolio.
GitHub: Dromation organization
