549,877 active members*
2,237 visitors online*
Register for free
Login
IndustryArena Forum > WoodWorking Machines > DIY CNC Router Table Machines > Loss of absolute position. Add encoders? Re-homing?
Results 1 to 12 of 12
  1. #1
    Registered
    Join Date
    Mar 2015
    Posts
    50

    Loss of absolute position. Add encoders? Re-homing?

    I have a DIY gantry machine and I have a stack of resolver position sensors (contactless rotary encoder 4096 steps per rev).

    After an incedent where my machine somehow lost it's position, machining a load of parts with a 1.5mm x,y error, I wondered how easy it is to add absolute encoders to it. It's running a UC100 with Mach 3, steppers and ballscrews.

    I guess another option is to add a home check, every so often in the program or at least at the start of the program.

    What do people do to combat this kind of error?

  2. #2
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5242

    Re: Loss of absolute position. Add encoders? Re-homing?

    The only problem with adding encoders (incremental or absolute) is that with your system, and especially Mach3, there is no where to connect the encoder. Mach3 is an open loop system only.

    You could replace your existing axis motors with closed loop steppers/drives or small servo motors/drives. Most modern servos will take a step & direction input and close the loop at the drive. DMM Tech servos would be my first choice.
    Jim Dawson
    Sandy, Oregon, USA

  3. #3
    Member
    Join Date
    Nov 2013
    Posts
    1540

    Re: Loss of absolute position. Add encoders? Re-homing?

    Hi,
    as Jim has said Mach3 is an open loop system, thus even if you had reslovers/encoders/linear scales Mach3 cannot use that data in realtime to correct some
    loss of precision. If you stop or pause the machine then, yes, Mach3 could compare where it thinks it is and should be, with where it actually is, but you have to pause
    the machine to have this happen.

    A genuine realtime feedback control software solution is possible, LinuxCNC. Programming LinuxCNC to accept feedback is certainly possible but for a non programmer would be
    a real challenge.

    If you use either servos or closed loop steppers then if the actual position lags the commanded position the servo drive/stepper drive will try to correct it. If the lag is
    excessive the servo drive/stepper drive will fault. This would at least prevent a loss of position wrecking your part.

    Yet another possibility is to use dual loop servos. Delta A2 servos are an example of this. They have the regular rotary encoder input from the servo but in ADDITION have a second
    encoder input say from a resolver on the axis or a linear scale. This is called 'load sensing'. The dual loop means the servo drive can autonomously follow a given Step/Direction trajectory
    and by monitoring the axis position can confirm the commanded position and correct it if required. Load sensing can detect loss of position, backlash, non-linearity and inertial losses
    making load sensing very useful and the last word in position feedback control.

    Most of the top tier servo manufacturers have this feature and are regularly used on industrial CNC machines. Delta is a Taiwanese brand made in China, is good quality and good backup,
    documentation and set-up/tuning software at fair prices. The prices compare favorably with DMM which Jim has already recommended.

    For example a 750W Delta B2 series servo kit (servo/drive/cables), which just has the one servo mounted encoder, ie not load sensing, is $435 and a 750W Delta A2 series kit (servo/drive/cables)
    which is load sensing is $634. It is not uncommon to find suppliers whom are selling the A2 series for little more the the B2 series, both are good but if you can get A2's for the same or a little
    more you'd get them.

    Craig

  4. #4
    Registered
    Join Date
    Mar 2015
    Posts
    50

    Re: Loss of absolute position. Add encoders? Re-homing?

    Ah OK, I had assumed Mach 3 could check absolute position... No plug in to do that either...

    As an option, is it possible to to add a home reposition check into a CNC program?

    It's early days with this machine so I don't know if loss of position is a common error. It's only done it once so far, after drilling 500 holes.

    I also assume that the machine will power off and then power up the next day without having to be re-zeroed? I guess it would be good practice to check zero at the start of every run.

  5. #5
    Community Moderator Jim Dawson's Avatar
    Join Date
    Dec 2013
    Posts
    5242

    Re: Loss of absolute position. Add encoders? Re-homing?

    I think you would have to call a homing routine from the G code, but this should be possible. Maybe as a subroutine in the program.

    Without a pretty sophisticated system and battery backed absolute encoders you would always need to home the machine on power up.

    If accuracy is critical for your application, then you will need to spend the money to upgrade your axis motors and controls.
    Jim Dawson
    Sandy, Oregon, USA

  6. #6
    Member
    Join Date
    Nov 2013
    Posts
    1540

    Re: Loss of absolute position. Add encoders? Re-homing?

    Hi,

    Ah OK, I had assumed Mach 3 could check absolute position... No plug in to do that either...
    If you had linear scales or encoders on all axes then yes Mach3 CAN check is position, but the machine would need to be paused for probably 50milliseconds in order for the
    feedback data to get to Mach so it can compare where it supposed to be verses where it actually is. This 50ms delay means that it cant do it in 'realtime', that is to say effectively
    immediately.

    It's early days with this machine so I don't know if loss of position is a common error. It's only done it once so far, after drilling 500 holes.
    I think this is the problem. When I first started with Mach3 I had a few problems like that. Once I'd climbed the learning curve though Mach3 never missed a step. Then I
    upgraded to mach4 (highly recommended by the way) and it never lost a step in seven years (with my mini-mill which has open loop steppers) unless I did something really
    dumb.

    I think you should focus your effort on finding out why you miss steps and correct that rather than trying to detect and correct it once its happened.

    I also assume that the machine will power off and then power up the next day without having to be re-zeroed? I guess it would be good practice to check zero at the start of every run.
    No. When you turn the machine on Mach has no idea where it is, and yes you will have to 'Reference' also called 'Home' your machine every start-up.

    Most newcomers confuse Homing and Zeroing. Homing is where the machine is driven or jogged to an exactly precise and defined location and the MACHINE COORDINATES
    are set to zero. This is called the 'Machine Zero' or 'Home'. Then you will drive, either MDI or jogging, to the start mark on the workpiece. Then you will 'Zero' each axis. This
    will zero the WORK COORDINATES. This is called the 'Work Zero'. The difference between the Machine Zero and the Work Zero is known as the 'Work Offset' and is stored as G54 data.

    Ideally you would have three Home switches, one for each axis. Note these are NOT the same as Limit switches. Limit switches are at the vey end of each axis, six of them, and if any one
    of them activates your machine is attempting to go out of bounds and crash. A Limit switch event should cause an Estop. Home switches do not have to be at the end of an axis, although
    its common to do so. Many make one Limit switch do double duty, both as a Limit ANND a Home switch. I personally don'y like that idea much.

    On my mini-mill, which I used for seven years, it had three Home switches, not at the end of each axis, but close to the end. Thus when I hit Ref All at the start of each session
    the machine would drive to each switch in turn and set the Machine Zero. It could do this repeatably within 0.02mm every time. The good thing about having good Home switches is
    that now Soft Limits make sens and work as they are meant to. They saved my bacon many many times because my mini-mill did not have Limit switches. The only thing
    that prevented my machine from crashing was me being careful AND Soft Limits refusing to allow me to drive the machine out-of-bounds.

    On my new build mill I have six Limit switches, and three Home switches each on their own breakout board input. My new mill is much faster and vey much more powerful
    so Limit switches are essential. I still use Soft Limits though, I have then set up to a few mm inside the Limit switches so that with any sort of luck the Soft Limits will prevent me
    from going out of bounds, but if they fail then the genuine Limit switches take over and Estop the machine before damage happens.

    The bottom line is that you NEED a good Homing procedure, ideally with good Home switches, and not to be confused with Limit switches.

    Craig

  7. #7
    Registered
    Join Date
    Mar 2015
    Posts
    50

    Re: Loss of absolute position. Add encoders? Re-homing?

    Quote Originally Posted by joeavaerage View Post
    Hi,



    If you had linear scales or encoders on all axes then yes Mach3 CAN check is position, but the machine would need to be paused for probably 50milliseconds in order for the
    feedback data to get to Mach so it can compare where it supposed to be verses where it actually is. This 50ms delay means that it cant do it in 'realtime', that is to say effectively
    immediately.



    I think this is the problem. When I first started with Mach3 I had a few problems like that. Once I'd climbed the learning curve though Mach3 never missed a step. Then I
    upgraded to mach4 (highly recommended by the way) and it never lost a step in seven years (with my mini-mill which has open loop steppers) unless I did something really
    dumb.

    I think you should focus your effort on finding out why you miss steps and correct that rather than trying to detect and correct it once its happened.



    No. When you turn the machine on Mach has no idea where it is, and yes you will have to 'Reference' also called 'Home' your machine every start-up.

    Most newcomers confuse Homing and Zeroing. Homing is where the machine is driven or jogged to an exactly precise and defined location and the MACHINE COORDINATES
    are set to zero. This is called the 'Machine Zero' or 'Home'. Then you will drive, either MDI or jogging, to the start mark on the workpiece. Then you will 'Zero' each axis. This
    will zero the WORK COORDINATES. This is called the 'Work Zero'. The difference between the Machine Zero and the Work Zero is known as the 'Work Offset' and is stored as G54 data.

    Ideally you would have three Home switches, one for each axis. Note these are NOT the same as Limit switches. Limit switches are at the vey end of each axis, six of them, and if any one
    of them activates your machine is attempting to go out of bounds and crash. A Limit switch event should cause an Estop. Home switches do not have to be at the end of an axis, although
    its common to do so. Many make one Limit switch do double duty, both as a Limit ANND a Home switch. I personally don'y like that idea much.

    On my mini-mill, which I used for seven years, it had three Home switches, not at the end of each axis, but close to the end. Thus when I hit Ref All at the start of each session
    the machine would drive to each switch in turn and set the Machine Zero. It could do this repeatably within 0.02mm every time. The good thing about having good Home switches is
    that now Soft Limits make sens and work as they are meant to. They saved my bacon many many times because my mini-mill did not have Limit switches. The only thing
    that prevented my machine from crashing was me being careful AND Soft Limits refusing to allow me to drive the machine out-of-bounds.

    On my new build mill I have six Limit switches, and three Home switches each on their own breakout board input. My new mill is much faster and vey much more powerful
    so Limit switches are essential. I still use Soft Limits though, I have then set up to a few mm inside the Limit switches so that with any sort of luck the Soft Limits will prevent me
    from going out of bounds, but if they fail then the genuine Limit switches take over and Estop the machine before damage happens.

    The bottom line is that you NEED a good Homing procedure, ideally with good Home switches, and not to be confused with Limit switches.

    Craig

    Thanks Craig.

    My machine has magnetic limit switches at both ends of X and Y and a single one on Z. So doing a Ref All at the start is obviously a good idea.

    On my setup, Mach 3 does seem to remember its position on power up. I just checked it and it was bang on from where it was 2 days ago.

    I did have a couple of mishaps where the machine grabbed a part up while drilling so that possibly caused the loss of a few steps.

    I still have a weird issue with Jogging in Step mode locking up the controller so it won't move, but other than that it all seems to be ok.

  8. #8
    Member
    Join Date
    Nov 2013
    Posts
    1540

    Re: Loss of absolute position. Add encoders? Re-homing?

    Hi,

    I still have a weird issue with Jogging in Step mode locking up the controller so it won't move, but other than that it all seems to be ok.
    That is a recurring Mach3 issue. All development ceased on mach3 seven years ago and so this bug will not be fixed.

    Get Mach4 and be done with it.

    Craig

  9. #9
    Registered
    Join Date
    Mar 2015
    Posts
    50

    Re: Loss of absolute position. Add encoders? Re-homing?

    Quote Originally Posted by joeavaerage View Post
    Hi,



    That is a recurring Mach3 issue. All development ceased on mach3 seven years ago and so this bug will not be fixed.

    Get Mach4 and be done with it.

    Craig
    Hmmm ok. Just watched youtube video called 'Mach 4 Sucks'!

    Maybe the UCCNC is worth looking at?

  10. #10
    Member
    Join Date
    Nov 2013
    Posts
    1540

    Re: Loss of absolute position. Add encoders? Re-homing?

    Hi,

    Just watched youtube video called 'Mach 4 Sucks'!
    I've seen it, it was produced by people whom were not prepared to learn new stuff. Did you notice the date stamp on the video? Mach4 has advanced considerably
    in the six years since....not that those guys were able to get the best of Mach4 even then. I've been using Mach4 for seven years and its light years ahead of Mach3.

    Yes, UCCNC is also a good product and competes fair and square with Mach4.

    Mach4 has a better scripting language and architecture for developing custom solutions. You can write your own device plugins with Mach4, if you sign an NDA with NFS (manufacturers of Mach4)
    you can get the inside gen....try to do that with CNCDrive (manufacturers of UCCNC)...lol

    Mach4 has multiple (6) motion control board manufacturers whereas you MUST use a CNCDrive (UC100,UC300 etc.) motion board to use UCCNC.

    Mach4Hobby has better licensing conditions. Mach4Hobby is $200 whereas UCCNC is $60, but you can have five active copies (and unlimited demo copies) of
    Mach4Hobby whereas you may have only one active UCCNC copy.

    None the less Mach4Hobby AND UCCNC are BOTH very good, and for Windows platforms are the leading CNC software solutions. For Linux platforms
    you'd not go past LinuxCNC.

    Craig

  11. #11
    Registered
    Join Date
    Mar 2015
    Posts
    50

    Re: Loss of absolute position. Add encoders? Re-homing?

    Quote Originally Posted by joeavaerage View Post
    Hi,



    I've seen it, it was produced by people whom were not prepared to learn new stuff. Did you notice the date stamp on the video? Mach4 has advanced considerably
    in the six years since....not that those guys were able to get the best of Mach4 even then. I've been using Mach4 for seven years and its light years ahead of Mach3.

    Yes, UCCNC is also a good product and competes fair and square with Mach4.

    Mach4 has a better scripting language and architecture for developing custom solutions. You can write your own device plugins with Mach4, if you sign an NDA with NFS (manufacturers of Mach4)
    you can get the inside gen....try to do that with CNCDrive (manufacturers of UCCNC)...lol

    Mach4 has multiple (6) motion control board manufacturers whereas you MUST use a CNCDrive (UC100,UC300 etc.) motion board to use UCCNC.

    Mach4Hobby has better licensing conditions. Mach4Hobby is $200 whereas UCCNC is $60, but you can have five active copies (and unlimited demo copies) of
    Mach4Hobby whereas you may have only one active UCCNC copy.

    None the less Mach4Hobby AND UCCNC are BOTH very good, and for Windows platforms are the leading CNC software solutions. For Linux platforms
    you'd not go past LinuxCNC.

    Craig
    Hi Craig,

    The vid I was looking at was last year by Physics Annonymous, he's gone on to make a new UI for Mach 3... Not that that help fix any bugs or glitches!

    Does LinuxCNC have many advantages over Windows based controllers, other than the obvious general Windows issues?

    Are there any offline controllers worth even looking at?

  12. #12
    Member
    Join Date
    Nov 2013
    Posts
    1540

    Re: Loss of absolute position. Add encoders? Re-homing?

    Hi,

    The vid I was looking at was last year by Physics Annonymous, he's gone on to make a new UI for Mach 3... Not that that help fix any bugs or glitches!
    Then those bozos have gone backwards.

    Does LinuxCNC have many advantages over Windows based controllers, other than the obvious general Windows issues?
    LinuxCNC runs on a realtime distro of Linux. Because its realtime you can do realtime feedback and things of that nature.

    All the normal and regular features required for CNC machines are all there ready to go, no programming required. If you have to start programming feedback
    loops and so on, that becomes very much more complex and probably beyond most hobbyists unless programming in C/C++ is your thing.

    LinuxCNC and the realtime Linux distro are free and open source.

    If you wish to use a parallel port with its limited (17 IOs) IO, then LinuxCNC will drive it well. If you want or need more IO then there are reasonably priced Mesa boards.

    All-in-all LinuxCNC is very good and has a wide following. I've only experimented with it myself, for about a month I ran my machine on it, and I found it good
    also. I have not delved into what it takes to program new features.

    I have used Mach4 for seven years and its fine. It's scripting language and architecture make it very suitable for customising. Many people don't like Windows, however
    on a PC running Mach4 and controlling a machine, it should never be hooked to the internet or even a network, nor should it run ANY other software. Its a machine
    controller and nothing else. Windows performs perfectly under those circumstances.

    My machine PC is a dual core Atom single board PC with on chip graphics and only 3G RAM. Its a very low power PC, yet it has been running Mach4 and controlling
    my mill faultlessly for seven years. I'm running Windows 7 Embedded, and its never had an update in seven years, and it runs as well today as when I installed it.

    You pay your money and take your pick. I chose Mach4.

    Craig

Similar Threads

  1. Absolute encoders
    By rick027 in forum LinuxCNC (formerly EMC2)
    Replies: 27
    Last Post: 01-04-2020, 03:57 AM
  2. cheap absolute encoders? Oxymoron? Decent Incremental encoders?
    By mattbesquare in forum Benchtop Machines
    Replies: 15
    Last Post: 09-09-2010, 12:56 AM
  3. Absolute encoders
    By spoiledbrat in forum DNC Problems and Solutions
    Replies: 1
    Last Post: 06-07-2010, 11:37 PM
  4. Absolute encoders?
    By REVCAM_Bob in forum General CNC Machine Related Electronics
    Replies: 1
    Last Post: 04-21-2007, 04:26 AM
  5. Absolute encoders?
    By murphy625 in forum CamSoft Products
    Replies: 10
    Last Post: 03-29-2005, 04:18 AM

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
  •