All limit switches on one input with bl-mach3 bob

More
25 Mar 2024 09:14 #296696 by Lpkkk
Hi 
I'm adding 1 limit switches to each of 3 axis As minimum. I've connected them in series and I'm using cheap Bob bl-mach3. Please see attached pdf. 
I've connected port 15 input to common on first limit and then NC to common of next limit. On the last limit NC is connected to the gnd on the bob. Unfortunately hal meter keep saying True when I check port 15. When I try to home, my limit is activated but machine is not stopping and carry on going. Any ideas What I'm doing wrong? 
Attachments:

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

More
25 Mar 2024 09:33 #296702 by tommylight
Does the BOB need active high or active low input?

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

More
25 Mar 2024 09:59 - 25 Mar 2024 10:53 #296707 by Lpkkk
That's a good question, I could find any info about that. How to check it?
Input pin gives constant 5v
Last edit: 25 Mar 2024 10:53 by Lpkkk.

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

More
25 Mar 2024 11:05 #296710 by tommylight
OK, that would be active low, so your wiring should work.
Pictures of wiring?
Hal and ini file?

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

More
25 Mar 2024 11:42 - 25 Mar 2024 11:45 #296713 by Lpkkk
Please see attached. So far I was trying only on x axis in ini. 
Attachments:
Last edit: 25 Mar 2024 11:45 by Lpkkk.

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

More
25 Mar 2024 13:41 #296716 by tommylight
In the hal file, there is nothing about homing for joints/axis, only input and LUT5, so that will not work.
Make a new config with normal homing, then edit that to reflect the use of single pin by adding the LUT5 stuff, although i have no idea if using LUT5 is the way to go.

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

More
25 Mar 2024 13:56 #296717 by Lpkkk
I've created a new config with stepconf and that's were I took lut5 part from. In stepconf I've chosen all limits + home.

net all-limit-home <= parport.0.pin-15-in
setp lut5.0.function 0x10000
net all-limit-home => lut5.0.in-4
net all-limit <= lut5.0.out

First line assign port 15 to all-limit-home. I'm totally not sure where it is wrong. Maybe I should try create a new config with just all limits (without home), Quedgeley and take it from there?

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

More
25 Mar 2024 14:32 - 25 Mar 2024 14:47 #296721 by Todd Zuercher
I don't think you need or want to use the Lut5 component. To use one input for all home switches or for all home/limit switches, You simply connect the input pin from your parallel port signal to a hal net signal name, then connect that to each of the nessisary hal input pins. For XYZ home switches for example:
#Connect Parallel Port Input Pin
net home-all <= parport.0.pin-15-in
#Connect Home Signal to X Home
net home-all => joint.0.home-sw-in
#Connect Home Signal to Y Home
net home-all => joint.1.home-sw-in
#Connect Home Signal to Z Home
net home-all => joint.2.home-sw-in

To use the same input for all home and limits would be similar, except you would add the positive and negative limit inputs for each joint. (you can even do it all in a single line of hal code.  But doing so is a little unwieldy.
net home-limit-all <= parport.0.pin-15-in => joint.0.home-sw-in => joint.0.pos-lim-sw-in => joint.0.neg-lim-sw-in => joint.1.home-sw-in => joint.1.pos-lim-sw-in => joint.1.neg-lim-sw-in => joint.2.home-sw-in => joint.2.pos-lim-sw-in => joint.2.neg-lim-sw-in

PS Remember that you would need to wire all of your switches in series for normally closed switches, or parallel for normally open.

PPS The Hal pin naming of the Parallel port pins is a little unfortunate and slightly confusing.  The inputs into the parallel port are in fact Hal output pins.  Only one Hal output pin can be connected to any one Hal Signal name, but you can connect as many Hal input pins as you wish, and no hal pin may be used more than once, but a signal name has no limit to how many times it may be used.
Last edit: 25 Mar 2024 14:47 by Todd Zuercher.

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

More
25 Mar 2024 15:42 - 25 Mar 2024 15:47 #296730 by Lpkkk
I think I might know what was missing in my hal. 
I forgot to add :
addf lut5.0 servo-thread 

But your example code looks clearer to me. 
I will try proposed idea. So for my configuration where I've got only limit switches at minimum of x and Y axis, and on maximum of Z, all of them connected in series (like on a drawing I've attached) it should be something like :

net limit-all <= parport.0.pin-15-in
net limit-all => joint.0.neg-lim-sw-in
net limit-all => joint.1.neg-lim-sw-in
net limit-all => joint.2.pos-lim-sw-in

 
Last edit: 25 Mar 2024 15:47 by Lpkkk.

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

More
25 Mar 2024 18:05 #296754 by Todd Zuercher
That would cover the input as limits, but they will not function as home switches with out the addition of the home-in pins.
(would look like this.)
net limit-all <= parport.0.pin-15-in 
net limit-all => joint.0.neg-lim-sw-in => joint.0.home-sw-in
net limit-all => joint.1.neg-lim-sw-in => joint.1.home-sw-in 
net limit-all => joint.2.pos-lim-sw-in => joint.2.home-sw-in

Also you have to have Linuxcnc configured to ignore limits while homing. This is done by adding a line to each [JOINT_N] section of your ini file that says

HOME_IGNORE_LIMITS = YES

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

Time to create page: 0.131 seconds
Powered by Kunena Forum