586,103 active members*
3,804 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > LinuxCNC (formerly EMC2) > Completely lost on the 'Homing' concept of LinuxCNC
Results 1 to 16 of 16
  1. #1
    Join Date
    Jan 2015
    Posts
    24

    Completely lost on the 'Homing' concept of LinuxCNC

    I have just replaced my old and slow 32-bit XP based system running Mach3 to a new 64-bit system... only to discover Mach3 doesn't support 64-bit Windows 10. Considering my version of Mach3 was one that came with my 'foreign' supplied steppers and 3-axis TB6560 controller... I figured I should do right and not use it any more.

    That brings me here - to LinuxCNC. As someone who has been working with computers since before DOS was a glimmer in Gates' eye and Linus Torvald had even dreamed of writing an operating system, I was running (and programming a bit) a computer. Computers don't scare me - I can pretty much beat up on it long enough to learn. And Google is my friend.

    But I am totally STUMPED on this whole 'homing' aspect of LinuxCNC. I think I just figured out how to set my origin - but I can't run anything until the system is 'homed'. I have clicked on the 'Home Axis' button for my X-axis and watched my wood router slowly move from one side to another - hit the limit switch and then quit. I have googled for a couple days on 'homing' LinuxCNC - found an explanation that starts with "If HOME_SEARCH_VEL is non-zero, then LinuxCNC assumes that there is a home switch..." but I'm missing something critical here.

    My questions:
    1) what is the overall concept of 'homing' a system?
    - is it allowing LinuxCNC to 'find' the limit switches so it knows when it's going to go too far?
    - is it done / redone regularly? or is it one-time and good for all?
    - is it somehow associated with zeroing the origin?
    2) where are these variables I referred to in the explanation I found?
    - I found a bunch of text files in home/username/linuxcnc/configs/MyWoodRouter but none of them have the variables as above

    With Mach3 - I would use the onscreen axis mover to locate my X, Y and Z axis where I wanted, click the onscreen buttons that would 'zero' the DRO and voila... I have my referenced origin. It doesn't seem to work that way in LinuxCNC - so I need to understand the foundational concept here.

    Thanks for your help! And I attempted to sign up for the LinuxCNC forum before I submitted this - but either it failed or it takes time for the confirmation email. I figured I'll give it 18 hours or so before I try and sign-up again. So meanwhile... I post my question here.

    Thanks everyone!

    Arden

  2. #2
    Join Date
    Oct 2010
    Posts
    1189

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    hi it is quite simple i guess you can set up your machine with no ends so no homing is needed i do that for testing things out on our machines. homing means i switch on the machine home it so i can use soft limits it never will hit the end then i touch of my puece and set a logical 0 in all axes so i can cut now if i do pieces and have to switch off the machine next day it knows by homing where it was and i can repeat
    does that answer your question in short ?


    Gesendet von iPad mit Tapatalk

  3. #3
    Join Date
    May 2006
    Posts
    84

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Have you read the Wiki article on homing?
    LinuxCNC Documentation Wiki: Homing And Limit Switch

    Do you have home switches installed?

  4. #4
    Join Date
    Feb 2013
    Posts
    164

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    You can either set your limit switches to shared home/limit switches in HAL or tell it not to require homing. Adding 'NO_FORCE_HOMING=1' to the [TRAJ] section of the .ini file will accomplish this. It will allow you to run programs without being homed.

    The document linked above covers shared home/limit switches.

    Sent from my SM-G920V using Tapatalk

  5. #5
    Join Date
    Jan 2015
    Posts
    24

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Thanks everyone for the quick responses... I appreciate the suggestions.

    @Tkamsker - Your explanation is what I had been thinking, so thank you for the confirmation - I appreciate it.
    @snowyskiesau - I have read that link... many times and I just reread it based on your message looking to see if I missed something. However, if you read the entire Wiki link/document - it talks about how to configure and setup the variables - but it never states exactly where these variables exist - it appears to assume we know where they are. I SUSPECT it's in a 'HAL' file - but when I looked at my HAL file, none of those variables existed in place now.
    @zamazz - without being negative - I would point out that you are assuming a lot of basic knowledge of LinuxCNC, the terms that are used in that application and how it is installed / configured in Linux.


    Bottom line - I need a very dumb'd down "LinuxCNC for Morons" (LinuxCNC for Dummies would be too high-level for me). I understand the concept that 'homing' is a means of establishing soft limits that LinuxCNC will decode and never programmatically exceed. I know that physical limit switches will prevent LinuxCNC from physically exceeding the limits should the system some how "lose it's place" on the table (lost pulses on the stepper).

    I am using a parallel port driven, 3-axis, TB6560 based driver card for my router table. I have limit switches on all 3 axes. When I configure LinuxCNC through StepConf telling it that 1 input for each axis is used for Limit and Home - then it requires that I 'Home' the system before I begin. Each axis appears to be homed individually. I have manually moved my router head to X=0, Y=0 - my origin. I select the X-axis radio button and click the 'Home' button... the head now slowly (at job speed) begins to move in the X+ direction. The onscreen DRO is counting up in the X direction. My table has approximately 18 inches of travel in both X and Y dimensions... as I leave this 'homing' function - it will traverse the entire X direction until it hits the limit switch and stops.

    The question is... why? Why does it start to traverse in the X+ direction? The same thing happens with the Y axis homing button.

    If I configure (through StepConf) the inputs and define them as simply axis limits (no 'Home' functionality) - I don't have to home my machine and I can rely on limit switches to protect my system. That may be good enough... but I am always the curious person... exactly WHAT is needed? what is happening? the journey of discovery is my joy.

    Sorry for the long post...

    Arden

  6. #6
    Join Date
    Feb 2013
    Posts
    164

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Sorry, I assumed you were a bit more familiar with Linuxcnc. It may be worth skimming the 'HAL manual' and 'integrators manual' which should be easy to find via Google.

    What homing does is moved each axis to a known position (the position where the homing sensor is) and set the machine origin (g53 kind of). This allows the machine to know it's exact position every time the power is cycled, even if the machine is manually moved when shut down. Limit switches can double as homing switches. And once your machine knows it position you can use soft limits and the machine will even predict an axis overrun before a program is started.

    So the machine is trying to find the homing switch whenever you tell it to home an axis. That's why it is moving. If you just want to set your work origin (g54, etc) you need to click 'touch off'.

    Does this help answer your question? I'm not familiar with step config, but I can tell you what to add to your .ini and .hal files, which are what step config sets up. Reading the HAL manual will make it much clearer.

    Sent from my SM-G920V using Tapatalk

  7. #7
    Join Date
    Dec 2005
    Posts
    596

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    I think you are mixing up what homing and limits are though those two processes can be combined by using a single switch. Homing does not set up soft limits. That is controlled in the software. Homing sets the machine to a known state and position, setting the machine coordinates to 0 (zero) on all it's operable axes. From there, you can use the G5x offsets based on your work positioning. Limits tell the machine just how far it can move in it's axes the limit switches are a "hard" limit and once they are tripped, of the controller is configured correctly, it will stop axis movement.

    Homing is usually done on first power up, and only occasionally afterwards, in the case of the machine losing it's position from things like missing steps. It basically resets the machine to it's known "home" position and resets the machine coordinates to zero again.

    I think I've got most of this correct, the more knowledgeable members feel free to correct my errors.

    Mark

  8. #8
    Join Date
    Feb 2013
    Posts
    164

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Homing is certainly required to use soft limits. You must home first to establish where the machine is along it's travel (where it is relative to g53 origin). Then the lengths of travel for each axis are set in the configuration files which allow the machine to stop slightly before reaching the end of the travel (soft(ware) limits). Then slightly outside of that the physical 'hard' limit switches are set. You do not need limit switches to use soft limits, only home switches. And if you use soft limits and home your machine properly you should never even trigger a limit switch, unless something like missed steps occurs on a feedbackless (basic stepper) machine, which would make your machine believe the g53 origin was in a different place. Essentially, home switches are used on start up to calibrate your machine such that 'g53 g0 x0 y0 z0' will go to the exact same position every time, or any other move in g53 coordinates.

    Sent from my SM-G920V using Tapatalk

  9. #9
    Join Date
    Dec 2005
    Posts
    596

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Yes homing is required to set up soft limits. The OP said this - " I understand the concept that 'homing' is a means of establishing soft limits that LinuxCNC will decode and never programmatically exceed." - which is not what homing actually does, as both you and I have posted. Soft limits do require homing, but homing does not automatically set the soft limits.

    Sorry if I wasn't clear on that.

  10. #10
    Join Date
    Oct 2010
    Posts
    1189

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Hi,
    maybe to be more precise you can using stepconfig and configure no endstopps but then you still have to touch the system and set zero somewhere.
    So if you have the switches i recommend because of repeatability the use of home switches (and it is safer on top ) maybe it makes sense to read the concept of coordinates.
    Coordinate Systems
    then maybe all makes more sense ,.. i do have 2 vices on one table so i can do 2 pieces in one fixing which have difference zeroes using the coordinates
    And next day i can repeat ,..

  11. #11
    Join Date
    Jan 2015
    Posts
    24

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    I haven't had opportunity to read the 'HAL manual' yet (referred to by Zamazz) - dang 'real job' is getting in the way of my hobby... I will hopefully be able to do that tonite. That said - my bottom line question is: When I select an axis and click the 'Home' button - why does that axis then begin to move in the positive direction toward the other end of the axis? it stops at the limit switch - but that's all it does... it stops.

    Somehow - I would think that the 'homing' process would cause the axis to move in the negative direction until it hits the limit / home switch. Then it knows where that is - it would then reset the internal configuration to '0' in that axis and with the configured maximum table size, it would know the axis limits.

    I also wonder if I have a configuration error / issue that I need to correct? Maybe it has to do with the 'missing' variables that are referred to in the Homing page in the documentation / Wiki? I am hoping that the 'brain trust' here in this forum can direct me the fix for the situation.

    Currently - I have reconfigured LinuxCNC (via StepConf) to 'Both Limit' for all axes. The option I had originally set (and had the 'homing' trouble with) was 'Both Limit + Home'. I like the idea of repeatability by having my system correctly 'homed'. So... any help anyone has - I'm listening!

    Thanks...
    Arden

  12. #12
    Join Date
    Dec 2005
    Posts
    596

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    What exactly do you have in the ini file for homing each axis? Just post your ini file here so we can poke around in it.

    Mark

  13. #13
    Join Date
    Feb 2013
    Posts
    164

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Yes, can you post your .hal file as well? It should be in the configs folder in the Linuxcnc folder. It sounds like all you need to do is 'hook up' (in the software) your limit switch to the software connection for the home switches. Then set it to ignore the limit switch inputs while homing in your .ini file. If you can post the files I can better help. It can probably be done in the step config wizard, but sadly I have no experience with that.

    Sent from my SM-G920V using Tapatalk

  14. #14
    Join Date
    Jan 2015
    Posts
    24

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    OK - I have uploaded both my .HAL and .ini files from the 'MyWoodrouter' folder on the LinuxCNC box. I have not looked at either of these files nor have I had a chance to review the 'HAL Manual' referenced - but I'm hoping to do both of those tasks tonite.

    Thanks everyone... I THINK I am on the edge of a knowledge breakthrough.

    Arden

  15. #15
    Join Date
    Feb 2013
    Posts
    164

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    Alright, what you need to do is 'hook up' your limit switch signal to the homing signal pin in HAL. If you look in the hal (and familiarize yourself with the format) you can see that 'both-y' is connected to 'parport.0.pin-11-in', creating a new pin (both-y) that is used for both your Y axis limit switches. If you scroll down in the HAL file to the Y axis portion, which can be found by looking for all the parameters and pins with 1s in them (0 is X, 1 is Y, 2 is Z, etc)(stepgen.1.maxaccel is the max acceleration that the step generator 1 will use, for instance). You can see that the pin 'both-y' is connected to both 'axis.1.neg-lim-sw-in' and 'axis.1.pos-lim-sw-in'. This tells LinuxCNC that when the parallel port pin 11 is active, either the negative or positive limit switch is reached. To also set the limit switches as home switches, you simply connect the same signal to the respective home switch pin in HAL. To do this add this line at the end of the Y axis block:

    net both-y => axis.1.home-sw-in

    This needs to be done for each axis, except with 'both-y' changed to 'both-x' and 'both-z' in their respective places and 'axis.0.home-sw-in' for x and 'axis.2.home-sw-in' for z. If you aren't a perfectionist you can just add these three lines to the end of the HAL file.

    Now to the .ini file. What you need to do here is tell LinuxCNC that your home and limit switches share a common switch and signal as well as set you axis limits and homing speed/direction. I'll use the X axis for example, but it needs to be done 3 times for each axis.

    To tell it that you are sharing home and limit switches, simply add 'HOME_IGNORE_LIMITS = YES' to the [AXIS_0] section. Do this for all axes.

    Now you can set 'HOME_SEARCH_VEL' and 'HOME_LATCH_VEL' and 'HOME_FINAL_VEL' to the velocities you want the machine to move in each stage of homing. See: Homing Configuration for a good explanation. Do this for all axes.

    I'd then set 'HOME' and 'HOME_OFFSET'. They are described in the above document just as well as I can describe them. Do this for all axes.

    Finally, set your 'MIN_LIMIT' and 'MAX_LIMIT' for each axis. These may change a bit depending on your 'HOME' and 'HOME_OFFSET' values. Do this for all axes.

    I found it easiest just to kind of guess and check to set the HOME, HOME_OFFSET, and LIMIT values, although I'm sure the sign conventions make sense. I just adjusted the signs and positions till the pattern and distances made sense. You can also set 'HOME_SEQUENCE' if you want the Z to home before X and Y, or any other combination.

    Hope this helps. I'd back your files up first, just in case. You can do this one step at a time, that way if something doesn't work you'll only have a couple steps to check. Once you skim the HAL manual and Integrators manual and do this once it becomes quite easy and extremely configurable.

  16. #16
    Join Date
    Jan 2015
    Posts
    24

    Re: Completely lost on the 'Homing' concept of LinuxCNC

    RATS!! Typed out a response once but must have hit the wrong button... (sad face)

    Good news - I got it working!! Thanks so much Zamazz for all your help and direction. I used a rather convoluted process involving copying my existing .HAL and .ini files followed by using StepConf to make updates and then using WinMerge to compare the two files to see the differences. It helped me understand where the changes were. My issue was the result of 2 settings... I had 'cross-mapped' the Z and X axis home/limit switches - so when I issued the 'home' command for X - it just moved until the Z-axis limit was theoretically reached and it stopped. I remapped correctly and then discovered that StepConf always enters the variable HOME_SEARCH_VEL as a positive number. As a result - when it starts 'seeking' home - it's moving to the end of the axis - not backwards to the start of the axis. I have to manually edit that variable and it worked perfectly. I suspect I could modify the stepper wiring to reverse the directgion, then set up the direction level in reverse and it might all come together to work... but that just seems like a LOT of trouble.

    I have one last remaining issue that is not 'homing'... I ran a cut program as a test (no material - just looking at the motion) and I noticed some 'stuttering' in the motion. Since I wasn't actually cutting material - I'm not sure if that stuttering would have resulted in bad cuts (I suspect it will). I know that there is a lot to be said about 'tuning' LinuxCNC on the computer and for the driver electronics - I am using a 3-axis TB6560 based 'chinese blue' based driver board. There is a lot written on the internet about the performance issues from these boards because of the low quality parts and incorrect component values used on these boards. But as it was originally hooked up to a slow computer using Mach 3 - I had NO issues with it.

    I know I can start by reading all the LinuxCNC information I can on motor tuning and determining the computer performance ability - but I thought I would ask the forumm (since you're all so dang helpful) first and see if anyone can suggest a starting point to look. Which 'tuning' variables should I look at first?

    Thanks again everyone - really appreciate the support... you guys ROCK!

    Arden

Similar Threads

  1. Completely lost and disheartened
    By liltritter in forum Laser Engraving / Cutting Machine General Topics
    Replies: 10
    Last Post: 03-14-2015, 06:37 PM
  2. Z-axis problem: missing steps - tried everything, completely lost
    By cncvirgin in forum Stepper Motors / Drives
    Replies: 57
    Last Post: 09-24-2014, 12:56 PM
  3. Completely lost...
    By patmanikin in forum Uncategorised CAD Discussion
    Replies: 2
    Last Post: 08-04-2011, 03:49 AM
  4. Completely Lost
    By hydronuclear in forum DIY CNC Router Table Machines
    Replies: 13
    Last Post: 11-13-2010, 03:57 PM
  5. I think Im completely lost:)
    By july_favre in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 2
    Last Post: 04-25-2004, 06:51 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •