How reagon0/kairosloop works
KairosLoop is a closed-loop CNC tool-wear compensation system. Its principal workflow acquires gauge readings, computes feature values and deviations, records measurements, evaluates compensation rules, and routes safe offset requests to a controller; operators monitor activity through the dashboard. Configuration, tool lifecycle tracking, and hardware simulation are additional product branches. The README documents several workflow links; sampled source confirms selected service, gateway, and WebSocket interactions, but many runtime details were not inspected.
Main entry points: services.py Gauge Acquisition · engine.py Compensation Engine · views.py Setup and Configuration · gateway.py Offset Gateway
Components 21
Measurement
- Gauge Acquisition
measurement/services.py - N1700 Driver
measurement/n1700.py - Measurement Capture
measurement/capture.py - Feature Calculation
measurement/models.py - Measurement Records
measurement/models.py
Compensation
- Compensation Rules
compensation/models.py - Compensation Engine
compensation/engine.py - Compensation Events
compensation/models.py
Machine and Tools
- Machine Configuration
controller/models.py - Offset Gateway
controller/gateway.py - Controller Drivers
controller/drivers.py - Tool Lifecycle
tooling/models.py
Operator Interface
- Live Dashboard
dashboard/consumers.py - Setup and Configuration
dashboard/views.py
Simulation
- Gauge Simulator
simulator/gauge.py - Test PLC
simulator/plc.py - Demo Data Setup
simulator/seed.py - Tool Wear Simulation
simulator/tool_wear.py
Other components
- N1700 Gauge
- CNC Controller
- Operator
Connections 24
- N1700 Gauge → Gauge Acquisition: supplies readings
- Gauge Acquisition → N1700 Driver: initializes and reads
measurement/services.py - Gauge Acquisition → Measurement Records: records readings
measurement/services.py - Measurement Capture → Feature Calculation: calculates features
measurement/capture.py - Feature Calculation → Measurement Records: produces values
measurement/models.py - Measurement Records → Compensation Engine: triggers processing
- Compensation Engine → Compensation Rules: evaluates rules
compensation/engine.py - Compensation Engine → Offset Gateway: submits offsets
compensation/engine.py - Offset Gateway → Tool Lifecycle: checks assignment limits
controller/gateway.py - Offset Gateway → Controller Drivers: executes approved writes
controller/gateway.py - Controller Drivers → CNC Controller: writes offsets
- Compensation Engine → Compensation Events: logs decisions
compensation/engine.py - Operator → Live Dashboard: monitors live data
- Live Dashboard → Gauge Acquisition: issues gauge commands
dashboard/consumers.py - Live Dashboard → Test PLC: controls simulation
dashboard/consumers.py - Operator → Setup and Configuration: configures system
- Setup and Configuration → Machine Configuration: edits settings
- Setup and Configuration → Compensation Rules: edits rules
- Setup and Configuration → Tool Lifecycle: manages tools
- Gauge Simulator → Gauge Acquisition: simulates readings
- Test PLC → Controller Drivers: implements test controller
controller/drivers.py - Test PLC → Tool Wear Simulation: tracks simulated wear
simulator/plc.py - Demo Data Setup → Machine Configuration: creates demo configuration
simulator/seed.py - Demo Data Setup → Compensation Rules: creates demo rules
simulator/seed.py