Homing sequence with 2 limit switches

More
07 Jul 2018 00:01 #113617 by blazini36
On my mill I use a single limit switch for every axis which is a "shared home" switch. It does the normal homing sequence and I tell it in the .ini what the maximum travel distance in the other direction is and that is the soft limit. I have another machine that is basically just a moving carriage on a belt driven axis. This machine I have 2 limits per axis and had a python program written (not by me) that would do a homing sequence in one direction, hit the limit, travel in the other and upon hitting the opposite limit it was able to determine it's own travel range.

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 or Create an account to join the conversation.

More
07 Jul 2018 12:27 #113662 by BigJohnT
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 or Create an account to join the conversation.

More
07 Jul 2018 18:37 #113702 by andypugh
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.

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

More
08 Jul 2018 15:19 #113811 by blazini36

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

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.

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

More
08 Jul 2018 15:35 #113814 by blazini36

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 or Create an account to join the conversation.

More
08 Jul 2018 21:39 #113845 by rodw
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.
The following user(s) said Thank You: rdtsc

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

More
08 Jul 2018 22:00 #113847 by blazini36

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 or Create an account to join the conversation.

More
08 Jul 2018 22:40 #113849 by andypugh

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 or Create an account to join the conversation.

More
08 Jul 2018 22:42 - 08 Jul 2018 22:42 #113850 by andypugh

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 :-)
Last edit: 08 Jul 2018 22:42 by andypugh.

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

More
09 Jul 2018 19:02 #113884 by blazini36

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 or Create an account to join the conversation.

Time to create page: 0.117 seconds
Powered by Kunena Forum