code wiki / (root) / nx_jam_detect.nx

nx_jam_detect.nx

buildroot/runtime/nx_jam_detect.nx

1844 B31 linesdepth 2pulls 2 transitivereach 3 importersview sourcekind librarytopic jam
docsdependenciesstructsconstsfunctions

about

nx_jam_detect.nx -- SOVEREIGN clog/jam detector (QIDI fix; complements nx_print_runtime_monitor's spaghetti/temp/shift detection, which does NOT cover a feed-side JAM). Researcher-grounded (nx_research over FFF): "compressive stress IS THE driving force behind extrusion" -> a JAM = that chain broken: the extruder COMMANDS filament advance but little/none actually FEEDS (heat-creep softening above the melt zone, PTFE-heatbreak gap, partial clog, or gear grinding). Stock QIDI has only a binary runout sensor; this uses a filament-MOTION signal (commanded-E vs measured-feed, e.g. a BTT Smart Filament Sensor encoder) to catch jams EARLY, before a long print is wasted -- predictive, sovereign, cheap. license_tier: ORIGINAL.

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_jam_detect.nx nx_jam_detect_test.nx nx_jam_response.nx nx_jam_response_test.nx

imports: nx_syscalls.nx

imported by: nx_jam_detect_test.nxnx_jam_response.nxnx_jam_response_test.nx

structs

none

consts

15const JAM_OK: i64 = 0
16const JAM_CLOG: i64 = 1 // commanded extrusion but ZERO feed -> hard clog / heat-creep / PTFE gap
17const JAM_GRIND: i64 = 2 // feed far below commanded -> extruder gear grinding / partial clog
18const NX_JAM_Q14: i64 = 16384

functions

25func jam_step(e_adv_q14: i64, feed_q14: i64, e_thresh_q14: i64, min_ratio_pct: i64) -> i64
called by 2: mainwindow