585,676 active members*
5,326 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2006
    Posts
    45

    KMotionCNC M6 Tool Change Issue

    I'm having an issue with KMotionCNC running code past the second tool change. The first tool change is performed and KMotionCNC continues to run the gcode and then the second tool change is performed and a gcode error comes up. The gcode error is caused by the Y Axis disabling. Looking at the console it shows that the Y-Axis (Chan 1) was disabled due to exceeding max follow error however the tool change routine completes without an issue ("Tool Change Complete"). Z Axis (Chan 2) is also disable but the console does not show that it exceeded max follow error. X Axis (Chan 0) is still enabled.

    I tried to play around with the gcode to see if I can get a different result. Anytime a dwell or motion command is placed immediately after the tool change that seems to trigger the max follow error. If I place just G00 after the tool change it does not trigger it until a G4 or G00 X__ Y__ is encountered. I know this because the Spindle turns on when the "S4000 M3" command is placed after "G00 G54" but does not turn on when placed after "G00 X0.0 Y-0.0098". What's also strange is that the motion command will be an XY motion but the Y and Z axes are the ones that get disabled which hints at the tool change program being the problem as the tool change routine only moves the Y and Z axes.

    Running this code in single step mode does not generate any errors and works as it should.

    If I remove the second T code on line N144 then it runs without generating an error.

    I also tried to run the gcode with a dummy tool change program where it simply prints a string to the console. That did not generate any errors and the gcode ran fine. So it seems as if there is either a problem in my ToolChange.c program or there is a bug in KMotionCNC. It's just hard to tell which one because the tool change program runs fine and completes and all axes are still enabled upon completion.

    Another observation I made is on the kmotion Axis window. Both axes 1 and 2 (Y and Z) are being commanded to move but no Z move command is given in gcode.

    I have tried this in KMotionCNC version 4.32 as well as 4.33k, both with the same results.

    I have included a video of the tool change, some screen shots, tool change program as well as the gcode program. Also the M6 code is setup as "Execute/Wait" Thread: 2 Var: 9


  2. #2
    Join Date
    May 2006
    Posts
    4045

    Re: KMotionCNC M6 Tool Change Issue

    Hi Thomas,

    Have you tried configuring M6 as "Exec/wait/Sync"? If the MCode moves any of the Axes, and the Interpreter doesn't re-synchronize to the new location, then the Interpreter will create a trajectory starting from the old position rather than the current position. This will result in a position discontinuity/jump that could cause a following error. Whether the axis is told to move in the GCode or not the trajectory coordinates for the motion will always contain the commanded positions for all the axes. It would be the axis that somehow moved during the M Code that would have a following error not the axis that the GCode is moving. The same with a Dwell, all axis are being repeatedly commanded to hold the same positions.

    Nice machine.

    Regards
    TK
    http://dynomotion.com

  3. #3
    Join Date
    Oct 2006
    Posts
    45

    Re: KMotionCNC M6 Tool Change Issue

    Hi Tom -

    Thanks for the fast reply. I really appreciate it. I'm glad you brought the "Exec/wait/sync" option up because I did not try it or think to try it until I was writing this post. Also am glad for the explanation as the manual was a bit vague on what was being re synced but now it's pretty clear. This sounds like this could be the issue as the M Code moves the Y and Z axis around a bit. However it's odd that the first tool change doesn't create a discontinuity but the second one does. Anyways I will give this a shot tomorrow and report back.

    Thanks,
    Tom

  4. #4
    Join Date
    Oct 2006
    Posts
    45

    Re: KMotionCNC M6 Tool Change Issue

    Tom -

    Turns out that simply changing the M6 code to Exec/wait/Sync did the trick. Gcode runs perfectly now. Thanks again for your help!

    I did stumble across a minor bug however. I currently have 2 custom M codes setup. 1 for rigid tapping and the second for tool length measuring. I have the rigid tapping setup as M100 and I want the tool length measure to be M105. Hitting ok on the Tool Setup Screen and then entering back into the Tool Setup Screen, M105 is no longer defined. However if I use M100 and M101 then both stay defined when exiting and then re entering the tool setup screen. This behavior was not observed in 4.32.

    Thanks,
    Tom

  5. #5
    Join Date
    May 2006
    Posts
    4045

    Re: KMotionCNC M6 Tool Change Issue

    Hi Tom,

    Thanks for pointing that out. We found some array index bugs introduced when the "Special Actions for Halt, Stop, Program Start, etc..." were added. It should be fixed in the next Version.

    Regards
    TK
    http://dynomotion.com

Similar Threads

  1. Matsuura Tool Change Issue
    By wsm in forum Uncategorised MetalWorking Machines
    Replies: 2
    Last Post: 10-19-2014, 12:52 AM
  2. tool change issue
    By Diedesigner in forum Uncategorised MetalWorking Machines
    Replies: 11
    Last Post: 01-26-2013, 05:56 PM
  3. Arrow 750 tool change/tool carosuel issue
    By Insept in forum Cincinnati CNC
    Replies: 2
    Last Post: 10-22-2012, 01:31 PM
  4. Tool change issue
    By GM81 in forum Fadal
    Replies: 6
    Last Post: 02-11-2011, 06:29 PM
  5. Fanuc tool change homing issue
    By openforbiz in forum Fanuc
    Replies: 8
    Last Post: 01-31-2007, 09:35 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
  •