Homing direction when wrong side of switch

More
11 Aug 2023 09:14 - 11 Aug 2023 09:31 #277621 by --Matt--
My machine has one home switch per axis and no limit switches. The home switches are near the positive end of each axis, but not right at the end. The travel is quite short on this machine so I want to make use of the space beyond the limit switches (relying on software limits to prevent hitting the physical end of travel).

I have this set up and working fine with the home switch offset. The only potential problem would be if I were to start a homing cycle (moving in positive direction) when an axis is already beyond the home switch - then it will just crash into the end of the table travel.

For now I just plan to be careful and only home if well away from the end stops, but I was just wondering if there is a clever/simple solution to this that doesn't involve installing additional switches?

EDIT: By the way, the limit switches are proximity sensors. I think it is possible that their signals remain low when beyond the switching point. Therefore a solution where homing direction is dependent upon the limit switch state might work.

EDIT2: Or maybe just inhibit homing based on the homing switch status?

Any other suggestions or help to configure/code one of the above would be great.
Last edit: 11 Aug 2023 09:31 by --Matt--.

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

More
11 Aug 2023 09:41 #277623 by rodw
Home switches must stay triggered to the end of travel. That way Linuxcnc will know when its on the wrong side and move to clear the switch.
Refer to homing configuration chapter in the docs.
The following user(s) said Thank You: --Matt--

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

More
11 Aug 2023 10:11 - 11 Aug 2023 10:24 #277628 by --Matt--
Ah yes, you are right. Thanks! In theory it already does what I want...


6.1. HOME_SEARCH_VEL

This variable has units of machine-units per second.

The default value is zero. A value of zero causes LinuxCNC to assume that there is no home switch; the search stage of homing is skipped.

If HOME_SEARCH_VEL is non-zero, then LinuxCNC assumes that there is a home switch. It begins by checking whether the home switch is already tripped. If tripped it backs off the switch at HOME_SEARCH_VEL. The direction of the back-off is opposite the sign of HOME_SEARCH_VEL. Then it searches for the home switch by moving in the direction specified by the sign of HOME_SEARCH_VEL, at a speed determined by its absolute value.

I'll verify that the home switches do stay activated all the way to the hard limit and then do a few tests. If it all works as it should I'll be able to stop worrying about homing when near the edge of travel which will be great.
Last edit: 11 Aug 2023 10:24 by --Matt--.

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

Time to create page: 0.067 seconds
Powered by Kunena Forum