You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the 2026-09 dev meeting, removal of the tool database interface ([EMCIO]DB_PROGRAM) was proposed. It has active users (#4422, #4408), so a straight removal is off the table. This issue is to hash out what unification looks like instead. The shape below is a starting point, not a settled plan, and I do not have bandwidth to drive it (multiaxis and TP work ongoing), so: comments on the shape welcome, and if you want to own any of it, please say so.
What db_program does that the tool table file cannot
Custom per-tool schema (diameter, tooth count, usage hours, grade) in an external database.
Load/unload event stream, for tool usage tracking.
Dynamic tool-number => pocket resolution at load time.
Everything else duplicates what the tool table file plus the existing Python/NML interface already provides. Note the event stream is coarse: only load/unload and offset puts. Spindle on/off and motion are not part of the protocol, so real cutting-time or cutting-distance tracking already requires the db program to watch HAL itself.
Proposal (draft shape)
Keep one canonical in-core tool table, one persistence mechanism (the file), and standard status/HAL as the observation interface, the same pattern as the rest of LinuxCNC:
Add a tool-data-changed notification usable from userspace (a HAL pin or stat field, an epoch counter bumped on any tool data change). Today an external app can observe load/unload via iocontrol pins but has no way to learn about G10 offset changes without polling. This looks like the only real capability gap, but I may be missing others.
Separately, pursue an extended tool data model (standardized diameter/tooth-count style fields visible to all GUIs). That is the actual feature most db_program users seem to be after (ref Feature Request: add fields to tool table #4408), and it shrinks the remaining reasons to run an external db program.
Once 1 and 2 land, deprecate DB_PROGRAM with a migration recipe: a short example Python script using the linuxcnc module plus HAL that reproduces the usage-tracking pattern.
Open questions
Is the capability list above complete? Anyone using db_program for something it does not cover?
Is the epoch/notification pin the right mechanism, or is there a better fit (NML status, a message channel)?
Should the extended tool data model block deprecation, or can they proceed independently?
Non-goals
No change to the tool table file format as part of this issue.
No removal before a replacement recipe exists and at least one release cycle of deprecation notice.
Future ideas
Per-tool cutting stats: a userspace HAL watcher could integrate feed motion while the spindle is on (pins exist today: motion.current-vel, spindle.0.on, iocontrol tool pins) and accumulate per-tool cut distance, average feed, and usage hours. This subsumes the "operating hours" use case the db_program docs describe, with no core changes needed.
At the 2026-09 dev meeting, removal of the tool database interface (
[EMCIO]DB_PROGRAM) was proposed. It has active users (#4422, #4408), so a straight removal is off the table. This issue is to hash out what unification looks like instead. The shape below is a starting point, not a settled plan, and I do not have bandwidth to drive it (multiaxis and TP work ongoing), so: comments on the shape welcome, and if you want to own any of it, please say so.What db_program does that the tool table file cannot
Everything else duplicates what the tool table file plus the existing Python/NML interface already provides. Note the event stream is coarse: only load/unload and offset puts. Spindle on/off and motion are not part of the protocol, so real cutting-time or cutting-distance tracking already requires the db program to watch HAL itself.
Proposal (draft shape)
Keep one canonical in-core tool table, one persistence mechanism (the file), and standard status/HAL as the observation interface, the same pattern as the rest of LinuxCNC:
DB_PROGRAMwith a migration recipe: a short example Python script using thelinuxcncmodule plus HAL that reproduces the usage-tracking pattern.Open questions
Non-goals
Future ideas
motion.current-vel,spindle.0.on, iocontrol tool pins) and accumulate per-tool cut distance, average feed, and usage hours. This subsumes the "operating hours" use case the db_program docs describe, with no core changes needed.