Adding support for optional axes
Maybe this helps...
HOME_OFFSET = 0.0 HOME_SEQUENCE = 4 #HOME_SEARCH_VEL = 0.000000 #HOME_LATCH_VEL = 50.00000 #HOME_FINAL_VEL = 1.000000 #HOME_USE_INDEX = YES
#net alarm-motor-6 => joint.5.amp-fault-in
cmorley wrote: Could you explain - in detail how you want this to work?
My use case is this: I have a removable 4th-axis. If I remove it from my router table, homing never completes, because the servo and limit switch aren't connected. I want to be able to indicate to LinuxCNC that it should ignore that axis for the purposes of homing (or really, ignore its existence for anything, e.g. path planning, etc. Ideally it would complain if gcode tried to move that axis).
The way to signal the presence or absence of the axis should be flexible (e.g. a UI button, or maybe the hardware detects its presence and asserts a pin on the IO card).
Linuxcnc has a way to tell the control to home wherever it is or in a variety of searching modes.
It seems that one way to roughly do what you want is to have the A axis 'home-where-it-is' on startup but home to switch if rehomed.
Would this be a start towards your goal?
JetForMe wrote: This seems quite onerous. I tried to do this, but I don't see how not to duplicate config. If I don't include the stuff for my joint 4 in the INI, then the HAL config fails (it tries to configure stuff based on Joint 4 parameters specified in the INI file).
More or less onerous than editing and recompiling the whole of LinuxCNC?
There is no harm in having INI entries that are not used.
The trick would be to have a separate HAL file for the extra axis, and only reference it in the relevant INI.
Does your main HAL file already use
loadrt [EMCMOT]EMCMOT .... num_axes = [TRAJ]NUM_AXES
etc to pull that info from the INI?
You could even have an extra HAL that disables the extra axis (HAL files can unlink pins and delete signals) matched with an INI that sets it to home without moving.