Adding support for optional axes

More
05 Mar 2021 16:42 #201104 by chris@cnc
Otherwise it will be really difficult. So much does not have to be changed in the config. After changes I copy my config and comment out 5 lines. Axis is still in the gui but hardware is out
Maybe this helps...

ini
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
home sequence without switch

hal
#net alarm-motor-6    =>  joint.5.amp-fault-in
alarm amplifier off

Please Log in or Create an account to join the conversation.

More
05 Mar 2021 20:26 #201125 by cmorley

JetForMe wrote:

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.org/docs/2.8/html/config/ini-ho....html#_configuration
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?

Chris

Please Log in or Create an account to join the conversation.

More
07 Mar 2021 00:54 #201240 by andypugh

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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.103 seconds
Powered by Kunena Forum