All limit switches on one input with bl-mach3 bob
- Lpkkk
- Offline
- Senior Member
-
Less
More
- Posts: 52
- Thank you received: 5
25 Mar 2024 09:14 #296696
by Lpkkk
All limit switches on one input with bl-mach3 bob was created 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?
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?
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20088
- Thank you received: 6836
25 Mar 2024 09:33 #296702
by tommylight
Replied by tommylight on topic All limit switches on one input with bl-mach3 bob
Does the BOB need active high or active low input?
Please Log in or Create an account to join the conversation.
- Lpkkk
- Offline
- Senior Member
-
Less
More
- Posts: 52
- Thank you received: 5
25 Mar 2024 09:59 - 25 Mar 2024 10:53 #296707
by Lpkkk
Replied by Lpkkk on topic All limit switches on one input with bl-mach3 bob
That's a good question, I could find any info about that. How to check it?
Input pin gives constant 5v
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.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20088
- Thank you received: 6836
25 Mar 2024 11:05 #296710
by tommylight
Replied by tommylight on topic All limit switches on one input with bl-mach3 bob
OK, that would be active low, so your wiring should work.
Pictures of wiring?
Hal and ini file?
Pictures of wiring?
Hal and ini file?
Please Log in or Create an account to join the conversation.
- Lpkkk
- Offline
- Senior Member
-
Less
More
- Posts: 52
- Thank you received: 5
25 Mar 2024 11:42 - 25 Mar 2024 11:45 #296713
by Lpkkk
Replied by Lpkkk on topic All limit switches on one input with bl-mach3 bob
Please see attached. So far I was trying only on x axis in ini.
Last edit: 25 Mar 2024 11:45 by Lpkkk.
Please Log in or Create an account to join the conversation.
- tommylight
-
- Away
- Moderator
-
Less
More
- Posts: 20088
- Thank you received: 6836
25 Mar 2024 13:41 #296716
by tommylight
Replied by tommylight on topic All limit switches on one input with bl-mach3 bob
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.
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.
- Lpkkk
- Offline
- Senior Member
-
Less
More
- Posts: 52
- Thank you received: 5
25 Mar 2024 13:56 #296717
by Lpkkk
Replied by Lpkkk on topic All limit switches on one input with bl-mach3 bob
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?
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.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4987
- Thank you received: 1455
25 Mar 2024 14:32 - 25 Mar 2024 14:47 #296721
by Todd Zuercher
Replied by Todd Zuercher on topic All limit switches on one input with bl-mach3 bob
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:
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.
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.
#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.
- Lpkkk
- Offline
- Senior Member
-
Less
More
- Posts: 52
- Thank you received: 5
25 Mar 2024 15:42 - 25 Mar 2024 15:47 #296730
by Lpkkk
Replied by Lpkkk on topic All limit switches on one input with bl-mach3 bob
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
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.
- Todd Zuercher
-
- Offline
- Platinum Member
-
Less
More
- Posts: 4987
- Thank you received: 1455
25 Mar 2024 18:05 #296754
by Todd Zuercher
Replied by Todd Zuercher on topic All limit switches on one input with bl-mach3 bob
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.)
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
(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.085 seconds