nc_program_manager/.paul/PROJECT.md
dtrentin 9bb65c4748 docs(paul): unify phase 5 and close v0.1 milestone
Phase 5 (NC Validator) UNIFY complete.
v0.1 Multi-CN Release milestone closed — all 5 phases done.

- 05-01-SUMMARY.md: NcProgramValidator + 30+ tests documented
- ROADMAP.md: all phases marked complete, v0.2 scope drafted
- PROJECT.md: requirements evolved, tech stack updated to 4 manufacturers
- STATE.md: milestone 100%, loop closed, next action documented

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-17 22:19:50 +02:00

4.1 KiB
Raw Blame History

FanucProgramManager

What This Is

Console EXE (C# .NET 4.7.2) for upload/download of CNC programs to/from machine controllers. Supports Fanuc FOCAS, Heidenhain LSV2, Siemens Sinumerik FTP, and Mitsubishi FTP. Runs on Windows, distributed to licensed machine operators and integrators.

Core Value

Machinists and operators transfer CNC programs to/from any controller without manual intervention or internet access.

Current State

Attribute Value
Type Application
Version 0.1.0
Status v0.1 complete — pending hardware testing
Last Updated 2026-05-17

Requirements

Core Features

  • Upload programs to CNC controller
  • Download programs from CNC controller
  • Local file management (organize/store programs on disk)
  • Multi-CN brand support (Fanuc + others)

Validated (Shipped)

  • Fanuc FOCAS upload/download — initial
  • AES encryption for program files
  • CLI argument parsing
  • Machine-bound license check (hardcoded)
  • Multi-CN support — Fanuc, Heidenhain, Siemens, Mitsubishi — Phase 14
  • 3-file management mode (Fanuc) via IFanucMachine — Phase 4
  • NC program validation before upload (all 4 manufacturers) — Phase 5

Planned (Next)

  • Hardware fingerprint license system (CPU ID + disk serial + encrypted file)
  • ReadActiveProgramAsync / SelectMainProgram for Heidenhain and Siemens
  • Integration test against real hardware (Heidenhain, Siemens, Mitsubishi)

Out of Scope

  • Cloud sync
  • Web UI
  • Internet-dependent license validation

Constraints

Technical Constraints

  • .NET Framework 4.7.2 — max compatibility, no upgrade
  • Fanuc FOCAS via fwlib32 (32-bit DLL, Windows-only)
  • Must run offline — no internet dependency at runtime
  • License validation must work without network

Business Constraints

  • Software must be license-protected (offline, machine-bound)
  • Current approach: hardcoded machine check — needs improvement
  • Target: hardware fingerprint + encrypted license file

Key Decisions

Decision Rationale Date Status
.NET 4.7.2 Max compatibility with operator machines 2026-05-13 Active
Console EXE output Simple deployment, scriptable 2026-05-13 Active
Offline license only Operators may have no internet on shop floor 2026-05-13 Active
# = Warning in Fanuc/Mitsubishi Macro variable indicator — valid in context 2026-05-13 Active
Constructor injection for validator Internal ctor accepts mock — enables unit testing without Windows DLL 2026-05-13 Active
Heidenhain LSV2 port 19000 Standard LSV2 port; needs real hardware verification 2026-05-13 Active
Siemens FTP dir /_N_MPF_DIR/ Sinumerik standard MPF directory; FTP option must be enabled 2026-05-13 Active

Success Metrics

Metric Target Current Status
Program transfer correctness 100% (byte-verified) Unknown Pending hardware test
License validation (offline) Works without network Hardcoded At risk — v0.2 target
Multi-CN support ≥2 manufacturers 4 (Fanuc/Heidenhain/Siemens/Mitsubishi) Done
NC validation coverage All manufacturers 4 manufacturers, 30+ tests Done

Tech Stack / Tools

Layer Technology Notes
Language C# .NET Framework 4.7.2
UI Console EXE CLI args via InputArgs.cs
CN Protocol (Fanuc) FOCAS fwlib32 32-bit DLL, Windows-only
CN Protocol (Heidenhain) LSV2 over TCP Port 19000, CRC-16/CCITT
CN Protocol (Siemens) FTP (FtpWebRequest) ASCII mode, passive, /_N_MPF_DIR/
CN Protocol (Mitsubishi) FTP (FtpWebRequest) Port 21, /PRG/, no extensions
Validation NcProgramValidator Universal + per-manufacturer rules
Encryption AES (AesCrypt.cs) Program file protection
Licensing Machine fingerprint Hardcoded now, v0.2 target
Testing NUnit 3.13.3 + Moq 4.18.4 .NET 4.7.2 test project

PROJECT.md — Updated when requirements or context change Last updated: 2026-05-17 after Phase 5 (NC Validator)