- Posts: 972
- Thank you received: 0
Homing sequence with 2 limit switches
I've been having issues after a move to 2.8pre with that custom homing sequence and I really see no reason not to use LinuxCNC's built in sequence but I cannot find any info on homing between 2 limits. I can home to mone limit and then tell it the max travel in the INI but for this machine I would rather have it find the second limit and feedback a position. Is this type of sequence included in LinuxCNC?
Please Log in to join the conversation.
JT
Please Log in to join the conversation.
github.com/LinuxCNC/linuxcnc/blob/master...c/ini/inihal.cc#L149
What I would suggest that you do is home normally then _probe_ for the opposite switch, then put that value on the HAL pin.
Please Log in to join the conversation.
No the size doesn't change. It was an error check of sorts. Since steppers (generally) do not run in closed loop the homing sequence between limits would report back a distance and it had to be within a set range. If not there is likely some mechanical issue.BigJohnT wrote: Does the size of the machine change? This is unusual for sure. The machine limits are loaded at start up and once you home they are enforced.
JT
Please Log in to join the conversation.
andypugh wrote: I think with the latest LinuxCNC there are pins (defined in inihal.cc) for the joint max and min limit:
github.com/LinuxCNC/linuxcnc/blob/master...c/ini/inihal.cc#L149
What I would suggest that you do is home normally then _probe_ for the opposite switch, then put that value on the HAL pin.
That sounds like it would work. For some reason I thought this was an option when I started using LinuxCNC. Since I had many other things to sort out and the programmer was better with python than I was with LinuxCNC at the time we just went with a sequence in the python code. Now I'm finding the code to be too complicated and somewhat buggy I'm trying to get back to letting LinuxCNC's built in functions handle whatever possible now that I understand configuring it much better,
Ive set this up using the standard homing sequence. I do have 2 inductive proximity switch limits on each axis, I use one as a "shared home". As a set up, I configured that max travel to be larger than possible, I ran the homing sequence, then jogged the axis until it hit the opposite limit switch. The position it is at when it hits the limit gives me a measurement done by the machine itself. I just subtract the "home_offset" value from the position measurement and set that as "max travel" so the space between limits should be identical.
This should work fine. I would prefer to use a 2 limit homing sequence if it were built in, But I think at this point I'd rather get away from over complicating things.
Please Log in to join the conversation.
Just be aware in my tests homing against a dial indicator, the prox sensors are not 100% repeatable in relation to positioning the machine home position and can vary by 0.1mm or so. I would recommend you test your homing against a dial indicator to understand your machine better.
Please Log in to join the conversation.
rodw wrote: With 2.8 branch, I really can't see there is any difference between measuring the machine size with the machine or a tape measure. I have 3 inductive proximity sensors on my machine (separate Home sensor). To measure the machine each time you turn it on, does not make sense to me. All you need to do is to have soft limits inside your limit switches. If homing is done against the min limit sensor, the max limit should never be hit so its just there in case something goes wrong.
Just be aware in my tests homing against a dial indicator, the prox sensors are not 100% repeatable in relation to positioning the machine home position and can vary by 0.1mm or so. I would recommend you test your homing against a dial indicator to understand your machine better.
Measuring the machine with the machine is infinitely better. It doesn't matter how well you think the step rate is set, when using a dial indicator over 1" of travel you can get it close, but 20"+ error will stack up. To measure a milling machine or plasma cutter that only you use every time you turn probably does not make sense. This is neither of those nor is that the case, but as I said, a 2 sensor homing sequence actually has nothing to do with the measurement itself, it is an error check for an open loop stepper in a machine you are standing 20-30 feet away from.
I run a single inductive proximity switch for homing and limits on every axis on my mill. And yes, this is all this machine requires. A good proximity switch, Like the Turk 2mm sense shrouded that I use is very repeatable when the search and latch speeds are set correctly. If I have a mishap, I can re-home the axis and be back in within a thou or two.
Please Log in to join the conversation.
blazini36 wrote: I run a single inductive proximity switch for homing and limits on every axis on my mill. And yes, this is all this machine requires. A good proximity switch, Like the Turk 2mm sense shrouded that I use is very repeatable when the search and latch speeds are set correctly. If I have a mishap, I can re-home the axis and be back in within a thou or two.
You can also consider adding an extra flag to the motor haft, to get tsomething very much like inde-homing on a servo machne
Please Log in to join the conversation.
blazini36 wrote: I run a single inductive proximity switch for homing and limits on every axis on my mill. And yes, this is all this machine requires. A good proximity switch, Like the Turk 2mm sense shrouded that I use is very repeatable when the search and latch speeds are set correctly. If I have a mishap, I can re-home the axis and be back in within a thou or two.
You can also consider adding an extra flag to the motor shaft, to get tsomething very much like index-homing on a servo machine. Then you should be able to home to within one step (drilling a hole in the belt for an opto has also occurred to me).
My lathe uses resolvers and a bit of cunning with the position.txt file to know where it is to a resolution of 0.1µm without homing
Please Log in to join the conversation.
andypugh wrote:
blazini36 wrote: I run a single inductive proximity switch for homing and limits on every axis on my mill. And yes, this is all this machine requires. A good proximity switch, Like the Turk 2mm sense shrouded that I use is very repeatable when the search and latch speeds are set correctly. If I have a mishap, I can re-home the axis and be back in within a thou or two.
You can also consider adding an extra flag to the motor shaft, to get tsomething very much like index-homing on a servo machine. Then you should be able to home to within one step (drilling a hole in the belt for an opto has also occurred to me).
My lathe uses resolvers and a bit of cunning with the position.txt file to know where it is to
Please Log in to join the conversation.
