- Posts: 48
- Thank you received: 0
Combined homes/limits on one input: Blocking other homes/limits during homing
"To use only one input for all homing and limits you will have to block the limit signals of the joints not homing in HAL and home one joint at a time."
My question is, how do I block the signals during homing? Is this a tristate bit thing? I can't find any reference to blocking signals in other places.
Background:
I have an XYZX gantry router.
I have one home/limit switch per axis, on three physical inputs, so one physical input functioning as home and limit for my Y and Z axes. They're normally closed and in series.
My HAL config looks like this:
My INI for the Y and Z axes looks like this:
Please Log in to join the conversation.
#SET PIN 11 NC FOR Y AND Z LIM-HOME
net limit-home-y-z <= parport.0.pin-11-in
#TRYING TO BLOCK y while Z HOMING
net homing-z xor2.0.in0 <= joint.2.homing
net limit-home-y-z xor2.0.in1
net limit-y xor2.0.out => joint.1.home-sw-in joint.1.neg-lim-sw-in
net limit-home-y-z => joint.2.home-sw-in
#TRYING TO BLOCK z while y HOMING
net homing-y xor2.1.in0 <= joint.1.homing
net limit-home-y-z xor2.1.in1
net limit-z xor2.1.out => joint.2.home-sw-in joint.2.neg-lim-sw-in
net limit-home-y-z => joint.1.home-sw-in
Obviously the last lines containing "limit-home-y-z => joint.n.home" etc conflict with one another, I'm just not sure how to fix it.
Please Log in to join the conversation.
HOME_IS_SHARED = 1
linuxcnc.org/docs/devel/html/config/ini-...html#_home_is_shared
You have it on one axis but not the other . From your description, it needs to be used for all of axes. Also make sure you move the axis off the switch during homing.
Please Log in to join the conversation.
docs say "To use only one input for all homing and limits you will have to block the limit signals of the joints not homing in HAL and home one joint at a time."
Please Log in to join the conversation.
You might be able to use a mux2 to swap between true and false outputs for the other joints is not homing. (one input would be set with setp)
Please Log in to join the conversation.
Please Log in to join the conversation.
MartyJ wrote: You're fine, thanks for the responses. Getting a Mesa board is almost certainly the "right answer", having the switches but not having an input is a wasted economy for sure. It's just a little frustrating because the xor command seems like it would work, I've just been unable to find a documented "known good" implementation of the xor so I can see how it's intended to be written. My programming knowledge isn't deep enough to make much sense of the man page on it.
XOR is an exclusive OR in bitwise logic operations. XOR means one or the other but not both eg:
10 => TRUE
01 => TRUE
00 => FALSE
11 => FALSE
with an OR, the last one would evaluate to True
So the component has 2 inputs being the two bits I showed above and the output is the TRUE/FALSE result where TRUE =1 and FALSE = 0
Please Log in to join the conversation.
net limit-home-y-z <= parport.0.pin-11-in
net limit-home-y-z => joint.2.home-sw-in
net limit-home-x-z => joint.2.pos-lim-sw-in
net limit-home-y-z => joint.1.home-sw-in
#net limit-home-y-z => joint.1.neg-lim-sw-in
My short-term solution is to roll with soft limits on joint 1 (Y axis) until I get a Mesa board. At least this gets me up and running so I can start writing my auto tool probe routines.
If anyone has a better solution down the road, I'd love to hear it.
Please Log in to join the conversation.
linuxcnc.org/docs/devel/html/man/man9/mux2.9.html
Please Log in to join the conversation.
Please Log in to join the conversation.
