Homing a gantry with two motors, one switch input, and zero clue

More
15 Jun 2020 02:25 #171672 by Bats
After nearly a year's delay (due to mostly unrelated circumstances) I'm taking a second crack at migrating my machine to linuxCNC. This time around, I've made it a little farther - thanks in no small part to rodw, andypugh, my slightly younger (but no better looking) self, and the marks we all scratched into the wall of this here forum those many months ago.

So far I've got homing more or less working for the Y & Z axes, but I'm having a little trouble with the gantry (which, as you may be surprised and/or horrified to discover, I've named "X"). My original plan was to use four limit/home switches and, hopefully, get linuxCNC to square the gantry for me - and I think I might even have the config set up for that. Unfortunately I got about as far as unspooling the wire for the fourth switch before noticing that my Gecko only has four inputs - currently occupied by X (or one side thereof), Y, Z, and a touch plate.

I have this vague suspicion that there might be some clever trick of wiring and HALing to work around the issue and achieve my initial goal, but figuring it out has proved far beyond my batty little brain, so I find myself, once again, throwing myself on the mercy of the forum.

If I'm wrong (as is oh so very frequently is the case), I'd also be satisfied with some pointers on twiddling my HAL to perform a plain ol' non-squaring sort of homing. I figure if I can get that far, I can take another (and hopefully better-informed) crack at it down the road when I'm ready to Mesa-fy the system.... but somehow the cracks I did take seem to have been the sort that turn into breaks.

Any suggestions would be welcome.


-Bats
(suggestions other than "get lost, you smell funny" will be given precedence)
Attachments:
The following user(s) said Thank You: tommylight

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

More
15 Jun 2020 02:45 #171674 by PCW
One simple way would be to connect your single X home
/limit switch to motions joint 0 _and_ joint 1 home and
min limit inputs:

net min-home-x => joint.0.home-sw-in
net min-home-x => joint.0.neg-lim-sw-in
net min-home-x => joint.1.home-sw-in
net min-home-x => joint.1.neg-lim-sw-in

Alternatively, you could free up a pin by sharing the Y and Z
home/limits allowing gantry squaring when homing.

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

More
15 Jun 2020 03:23 #171675 by Bats

One simple way would be to connect your single X home
/limit switch to motions joint 0 _and_ joint 1 home and min limit inputs:

I thought something like that would work, but my attempts just seemed to end in disaster (well, very minor & not particularly destructive disaster... but disaster. sort of).

But I went back to try again, and saw exactly the same thing that I'd apparently botched the direction of my HOME_OFFSET, causing it to home nicely, and then grind itself into the switches as hard as it could get away with. Now it seems to be behaving better. Thanks!

Alternatively, you could free up a pin by sharing the Y and Z
home/limits allowing gantry squaring when homing.

Now this was something I vaguely suspected - and that would let me cling to my dreams of self-squaring gantries - but had no idea how to go about. Now that I know it's possible, I'll try to take another pass at the docs tomorrow.

I'll almost certainly be back here begging for more details by tomorrow night anyhow... but hopefully it'll be a somewhat better informed sort of begging.

Thanks again.

-Bats
The following user(s) said Thank You: tommylight

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

More
15 Jun 2020 06:48 #171685 by bbsr_5a
how stiff is your gantry to get the 2 motors separate homing after it triggers one
linuxcnc.org/docs/html/man/man9/gantry.9.html

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

More
15 Jun 2020 09:01 #171713 by tommylight

(suggestions other than "get lost, you smell funny" will be given precedence)

LOL :)

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

More
16 Jun 2020 00:34 #171796 by Bats

how stiff is your gantry to get the 2 motors separate homing after it triggers one

It's a aluminum extrusion (C-beam) based router, so not nearly as stiff as I'd like it to be... but I'm not sure I understand the rest of the question, and I'm afraid the link (at least without more context) went a little over my head. It sounds like something that would only be applicable if I got the fourth switch wired (presumably by sharing pins as PCW suggested), rather than something to be used with the current three switches/four joints?


-Bats

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

More
18 Jun 2020 01:00 #171947 by Bats

Alternatively, you could free up a pin by sharing the Y and Z
home/limits allowing gantry squaring when homing.

Ok, I think I may have sorted out how to do this...

If I've got it right (which will come as a huge surprise), I can just hang the Z switch in parallel with the Y (they're all NO because... reasons... don't ask), and then in the HAL switch this bit:
net min-home-x     <= parport.0.pin-10-in-not
net min-home-y     <= parport.0.pin-11-in-not
net max-home-z     <= parport.0.pin-12-in-not

to something like this:
net min-home-x       <= parport.0.pin-10-in-not
net min-home-y       <= parport.0.pin-11-in-not
net max-home-z       <= parport.0.pin-11-in-not
net max-home-xx      <= parport.0.pin-12-in-not
net probe-in	     <= parport.0.pin-13-in-not

I assume (read: hope, but don't really believe) the .ini can be left largely alone, as long as Y & Z are separately sequenced.

If it sounds like I'm guessing rather than trying any of this out, it's... err.... because I'm guessing rather than trying any of this out. I had to put in an order for a few more connectors & switches, which won't show up until... well... these days who knows?

In the meantime (assuming my guesswork doesn't set off too many "what the %$^$ were you thinking???" alarms), my next project is trying to get a simple Z touchplate working - which is the last piece I need to have a roughly functional system that I can try to start working with instead of working on. Unfortunately all the howtos I've been able to find require axis (I'm running gmoccapy) and about all I've managed is getting probe-in detected. Any chance there's a simple way to go about this?

Or am I about to fall down the sort of rabbit hole that needs a new thread?


-Bats
(I still haven't recovered from the last rabbit hole... do you have any idea how hard those little buck teeth can bite?)

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

More
18 Jun 2020 01:13 #171950 by PCW
You would also need to edit the ini file and set the
"HOME_IS_SHARED" parameter for the Y and Z axis

linuxcnc.org/docs/html/config/ini-homing.html#_home_is_shared

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

More
19 Jun 2020 00:25 #172049 by Bats
Oops... you're right. Somehow I had it in my mind that HOME_IS_SHARED had something to do with combining limit/home functions rather than combining axes. Thanks for catching that.

I think I've also sorted out the touchplate using a gmoccapy macro - as well as solving a couple other problems that were so major I didn't even notice them until yesterday - so things are moving along. I was all set to say "problem solved!" and sit back & wait for the switches to show up... when I discovered my E-stop still doesn't work right.

*sigh*

But that's a problem for another thread - thanks for the help on this one. I'm looking forward to seeing how things work out once the parts are in hand.

-Bats
(wait, "looking forward to"? damn autocorrect. I meant "dreading")
The following user(s) said Thank You: tommylight

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

Time to create page: 0.089 seconds
Powered by Kunena Forum