Ignore home-switch for coordinates close to 0

More
16 Apr 2022 09:34 - 16 Apr 2022 09:37 #240384 by Matt Hat
Hi, I am using a single light barrier on each axis. There are three flags that trigger the light barrier: Negative and positive end stops, and between at 0, the home position.
How I can make linuxcnc ignore the high-signal when passing the home, i.e. the coordinate zero, wrongly assuming one of the end stops has been triggered?
1) Is there a simple solution? I could use only home-switch setup, loosing hard stop conditions:
net both-home-x => joint.0.home-sw-in
# net both-home-x => joint.0.neg-lim-sw-in
# net both-home-x => joint.0.pos-lim-sw-in

2) The option HOME_IGNORE_LIMITS = YES, makes sure that no end stop is triggered during homing. I would similarly expect, that neither home nor end stops are triggered during any G0 or G1 within soft limits (not-homing commands).

Would this be a solution: Define a new pin 'close2home', that triggers high when close to 0, e.g. something like
close2home := (absolut(x) < 5).

Then connecting the logic
net both-home-x     <= parport.0.pin-10-in-not
joint.0.neg-lim-sw-in => AND(both-home-x NOT(close2home), and
joint.0.pos-lim-sw-in => AND(both-home-x , NOT(close2home)

How to define the range variable? Thanks for any support
Last edit: 16 Apr 2022 09:37 by Matt Hat.

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

More
17 Apr 2022 03:08 #240436 by rodw
Expected use is that the home switch  remains triggered from the home switch all the way to a limit switch.
I think the problem will be there is no knoweledge of axis position until its homed.
It is now possible to write your own homing module but its not trivial. I have been working on writing one.

see V 2.9 homecomp.comp
The following user(s) said Thank You: Matt Hat

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

More
17 Apr 2022 13:09 #240466 by Matt Hat
Ok, that helps, I understand now the schematics in the manual, showing the home switch in close proximity to the end switch. I think the rough position is actually known on startup for most machines (stored in the parameter file). Homing does however improve the absolute precision. My intend would thus be to assume the home remains in some range of +/- 5 mm.
Meanwhile I can work with soft limits, having hard limits turned off.

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

Time to create page: 0.351 seconds
Powered by Kunena Forum