code wiki / (root) / nx_robot_step.nx

nx_robot_step.nx

buildroot/runtime/nx_robot_step.nx

3470 B79 linesdepth 2pulls 2 transitivereach 4 importersview sourcekind librarytopic robot
docsdependenciesstructsconstsfunctions

about

nx_robot_step.nx -- SOVEREIGN multi-axis stepper STEP GENERATION (the actuation primitive that drives a real robot/printer/CNC/sensor-gantry). This is the rung nx_motion_plan.nx explicitly flagged as NEXT ("multi-axis ... step-pulse table for the MCU ISR"): given a synchronized move as per-axis signed step counts, emit the exact pulse train each axis must send so all axes arrive together. Pure integer Bresenham/DDA -- NO FLOAT (this is WHY steppers are driven this way: a motor takes discrete steps, the math is inherently integer). The dominant axis pulses every tick; minor axes are Bresenham-distributed so each axis i emits EXACTLY |delta[i]| pulses, evenly. This is the SAME math the printer (which the operator cited as the proof) runs, generalized to any N-axis machine -> "output to real robots we can build", in Nishi. NEVER-BRICK (#26): this emits a pulse PLAN (pure data); the real GPIO/STEP-pin write is a separate driver that must be fail-safe by construction (bounded rate, watchdog, safe-state-on-fault). license_tier: ORIGINAL expect_exit: 0

dependencies 1 imports · 3 importers

nx_syscalls.nx nx_robot_step.nx nx_robot_kinematics_gate.nx nx_robot_signal.nx nx_robot_step_gate.nx

imports: nx_syscalls.nx

imported by: nx_robot_kinematics_gate.nxnx_robot_signal.nxnx_robot_step_gate.nx

structs

none

consts

none

functions

20func robot_step_plan(delta: *i64, naxes: i64, dir: *i64, puls: *i64, max_ticks: i64) -> i64
called by 3: mainmainmain calls 1: sys_mmap
58func robot_step_max_dev(puls: *i64, naxes: i64, nt: i64, axis: i64, ad: i64) -> i64
called by 1: main
74func robot_step_count(puls: *i64, naxes: i64, nt: i64, axis: i64) -> i64
called by 2: mainmain