How bdring/fluidnc works
FluidNC is configurable CNC-controller firmware, principally aimed at ESP32, with platform variants and a POSIX simulator. A machine configuration describes axes, kinematics, motors, pins, and tool hardware; the firmware parses it, accepts Grbl-compatible commands, plans motion, and drives step outputs and machine peripherals. Users interact through serial or the built-in Web UI, and jobs can also come from files. The README documents flexible machine types, multiple tools, and AI config helpers. The tree supports these major areas; sampled source chiefly confirms configuration parsing and the stepping-engine interface/implementations.
Main entry points: step_engine.h Step engine API · WebUIServer.cpp Web interface · Protocol.cpp Command protocol · Planner.cpp Motion planner
Components 28
Machine configuration
- Config parser
FluidNC/src/Configuration/Parser.cpp - Config validation
FluidNC/src/Configuration/Validator.cpp - Machine setup
FluidNC/src/Machine/MachineConfig.cpp - Config helpers
tools/validate_fluidnc_config.py
CNC control
- Command protocol
FluidNC/src/Protocol.cpp - G-code interpreter
FluidNC/src/GCode.cpp - Job execution
FluidNC/src/Job.cpp - Motion planner
FluidNC/src/Planner.cpp - Motion control
FluidNC/src/MotionControl.cpp - Step scheduling
FluidNC/src/Stepping.cpp
Machine hardware
- Kinematics
FluidNC/src/Kinematics/Kinematics.cpp - Axes and motors
FluidNC/src/Machine/Axes.cpp - Motor drivers
FluidNC/src/Motors/MotorDriver.cpp - Spindles and tools
FluidNC/src/Spindles/Spindle.cpp - Machine peripherals
FluidNC/src/CoolantControl.cpp
User interfaces
- Web interface
FluidNC/src/WebUI/WebUIServer.cpp - Command channels
FluidNC/src/Channel.cpp - File and SD jobs
FluidNC/src/FileCommands.cpp - Settings and reports
FluidNC/src/Settings.cpp
Platform drivers
- Step engine API
FluidNC/include/Driver/step_engine.h - ESP32 engines
FluidNC/esp32/esp32/i2s_engine.cpp - RP2040 PIO engine
FluidNC/rp2040/pio_engine.cpp - Simulator engine
FluidNC/posix/simulator_engine.cpp
Other components
- Operator / sender
- Machine config
- Controller hardware
- Browser / network
- On-device storage
Connections 30
- Operator / sender → Machine config: writes config
- Machine config → Config parser: loads config
- Config parser → Config validation: parses values
- Config validation → Machine setup: validates setup
- Config helpers → Machine config: checks config
- Operator / sender → Web interface: controls machine
- Browser / network → Web interface: connects
- Operator / sender → Command channels: sends commands
- Web interface → Command channels: dispatches commands
- Command channels → Command protocol: delivers input
- On-device storage → File and SD jobs: provides job files
- File and SD jobs → Job execution: starts job
- Command protocol → G-code interpreter: dispatches G-code
- G-code interpreter → Motion planner: submits moves
- Motion planner → Kinematics: transforms motion
- Motion planner → Motion control: provides planned moves
- Motion control → Step scheduling: schedules steps
- Step scheduling → Step engine API: uses engine API
- Step engine API → ESP32 engines: selects implementation
- Step engine API → RP2040 PIO engine: selects implementation
- Step engine API → Simulator engine: selects simulator
- Axes and motors → Motor drivers: configures motors
- Motor drivers → Controller hardware: drives motors
- Spindles and tools → Controller hardware: controls tools
- Machine peripherals → Controller hardware: controls outputs
- ESP32 engines → Controller hardware: outputs step pulses
- RP2040 PIO engine → Controller hardware: outputs step pulses
- Simulator engine → Web interface: queues position updates
- Command protocol → Settings and reports: handles settings
- Settings and reports → On-device storage: persists settings