Tool offset trouble


Results 1 to 19 of 19

Thread: Tool offset trouble

  1. #1
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Tool offset trouble

    I just fired up my Tree 325 after a while and started to cut some parts.

    I notice that after I zero the axes, sometimes the machine does not recognize the tool offset in the chart and plunges the tool right on down to the workpiece. Not too good. I have tried this over and over, and I can't find any rhyme or reason to it. Any advice would be great.

    Here's a snippet of my simple G code if that helps. It looks OK to me, and works fine sometimes, but not others...
    Right after the first tool selection, the machine runs the Z axis to 1" from the workpiece without the offset. The tool offset for #2 is 2.125"

    (Filename: Front Panel CNC.nc)
    (Post processor: Dynomotion.scpost)
    (Date:21/02/2017 Time:13:51:25)
    G20 (Units: Inches)
    G40 G90
    (Part: Front Panel CNC)
    (Operation: Insert code snippet Code: Start of Program)
    (End of program code to retract Z, move X and Y to machine 0)
    (Mount Part to Milling Vise with the leftmost edge ligned up with the left rear corner of the vise. )
    (Zero the X and Y to the left rear of the vise. )
    (Use the Z setter to set Z0 at the top of the workpiece )
    G00 X0 Y0 (Move to X0 Y0 before lowering Z)
    (Operation: Drill, 1, T2: Drill, 0.125 in diameter, 0.26 in Deep)
    S3000 (Tool Change)
    M09 (Coolant Off)
    G00 G53 Z0 (Move to Machine Coord Z0)
    M0 (Pause Job)
    (Center Drill, 0.125 in diameter)
    M06 (Tool Change)
    G43 H2 (Set tool offset +)
    G00 Z1.0000 (AT THIS POINT, THE MACHINE MOVES THE SPINDLE TO 1" FROM THE WORKPIECE, IGNORING THE OFFSET)
    M07 (Mist coolant on)
    S3000 M03
    X1.0000 Y-3.6260
    Z0.2500
    G01 Z-0.2600 F10.0
    G00 Z1.0000
    Y-0.6260
    Z0.2500
    G01 Z-0.2600
    G00 Z1.0000

    Similar Threads:


  2. #2
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Oh a whim, I closed KmotionCNC and restarted it. I did not power cycle Kflop or the PC. Re-zeroed the axes for the job and ran the same G code again. This time, it works fine with the tool offsets.
    So something is getting KmotionCNC into a mode where it ignores the offsets. Any ideas?



  3. #3
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3340
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Hi rbickle,

    I'm not sure I understand your overall process but I think the issue might be how you "zero the axis". If you zero to the Stock's top surface with Tool Length Compensation turned on then zero will be at that same machine position with Tool Length Compensation turned on. You probably want to turn off Tool Length Compensation (with a G49) when you zero the axis.

    Restarting KMotionCNC may turn off Tool Length Compensation or select a Tool with zero length which is why your process works the first time.

    Note there are options in the Tool Setup | Trajectory Planner | Tool Length/Offset Immediately that will automatically turn on Tool Length Compensation when a Tool is selected via the dropdown on the screen. You might want to disable those options in order to have Tool Length Compensation only turned on with an explicit G43Hxx command. See:
    Tool Setup Trajectory Planner

    HTH
    Regards

    Regards
    TK http://dynomotion.com


  4. #4
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    484
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Not sure how your setting your offsets, but the ToolTableSet.c file that comes with kmotion does not work properly. Does like you say, you set all your tools and then reset zero and everything is off.

    I modified it to simply store the distance to home for each tool, which is what you need. I attached the file im using. When using this all your tools need to be set off some common point. This can be anything, like the table, a toolsetter, a 123 block, anything, but you always have to use the same method everytime. Then you load any "measured" tool and set your program zero. Works perfectly every time.

    Attached Files Attached Files


  5. #5
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Ah, I didn't think of that Tom. I guess I assumed that those settings reset each time you execute the G code.
    Is this not the case? I'm not sure if my CAM software cancels the tool and fixture offsets at the end of the code.



  6. #6
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3340
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Hi rbickle,

    Once the Tool Length Compensation is turned on it remains on until turned off.

    Regards

    Regards
    TK http://dynomotion.com


  7. #7
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    484
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Rbickle/Tom you dont need to be turning compensation on and off when setting an offset. You guys are making this way to complicated.

    Simply always touch your tools off some common point, and the value thats stored in the table is the distance from home to that point with a given tool. This is the way its done in industry.

    Then you set your program zero (g54/g55 etc) by simply loading a measured tool and zeroing or entering a value for Z. If you change jobs later to a something completely different you just enter a new value for Z which updates the G54. If you break a tool halfway through this new job, simply touch new tool off whatever you touched the rest off of and your good to go. The value stored for G54 is the distance from where you touched all your tools, to your part origin.



  8. #8
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Tom,

    Thank You, I think that was the problem. I was probably trying to re-zero the job while the machine was already in a tool offset mode.

    How can I make a user button on the screen to issue a G49? Can I issue a G code command from C?

    It might be handy to display the current tool and fixture offset next to the pulldown box for each.



  9. #9
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    mmurray70,

    Thanks for replying,

    I'm not sure I understand the difference between your description of the job zero and mine, but here's how I'm setting this up.

    When I power down the machine, I always jog the machine so that the X, Y, and Z axes are centered on their hardware centers. This puts the X and Y of the table in the centers of their travel, and the Z axis at the top of it's travel. When the machine powers up, (also when KFLOP powers up) it sets the machine coordinates to 0,0,0, which is always the same position. The KmotionCNC job coordinates (without the machine coord checkbox on) are also at 0,0,0.

    When I CAM the parts, I set the top of the material as z=0, so I need the machine to reference that. I use a z setting tool with a dial indicator on the face. I also always use my shortest tool holder with no tool inserted for referencing the job 0. This tool holder is inserted. The z setter goes on the material, and I manually jog the axes over and down with the handbox until the z setter is spot on 0. This is actually 2 inches above the material, so I then set the z axis to 2.000". All of the other tool offsets are measured using the same z setter and the values stored in the tool table.

    For X and Y, I usually use a laser edge finder that shoots a pinpoint laser beam to wherever my job datum is for that job. When that's on the money I zero X and Y.

    In the CAM software, I usually insert the following code for a tool change:

    (Tool Change)
    M09 (Coolant Off)
    G00 G53 Z0 (Move to Machine Coord Z0)
    M0 (Pause Job)

    This brings the Z axis up to machine 0 so the next tool can be inserted. It also pauses the job until you press start again.

    Thus far, I have not tried to set up fixtures, but I may be doing that in the future.

    Rick



  10. #10
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3340
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Hi rbickle,

    How can I make a user button on the screen to issue a G49? Can I issue a G code command from C?
    Here is code that you might assign to a User Button to Turn Off Tool Length Compensation.

    Code:
    #include "KMotionDef.h"
    
    #define TMP 10 // which spare persist to use to transfer data
    #include "KflopToKMotionCNCFunctions.c"
    
    main()
    {
        MDI("G49");  //Turn off Tool Length Compensation
    }
    It might be handy to display the current tool and fixture offset next to the pulldown box for each.
    Something to consider. The fixture selected and tool selected are shown in the dropdown itself. If you hover over the dropdown it does show the current offset. Although the Tool and Tool Offset corresponds to the loaded Tool and the Tool Table offset for that Tool rather than what Hxxx tool is enabled or selected.

    Regards

    Regards
    TK http://dynomotion.com


  11. #11
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    484
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Quote Originally Posted by rbickle View Post
    mmurray70,

    Thanks for replying,

    I'm not sure I understand the difference between your description of the job zero and mine, but here's how I'm setting this up.

    When I power down the machine, I always jog the machine so that the X, Y, and Z axes are centered on their hardware centers. This puts the X and Y of the table in the centers of their travel, and the Z axis at the top of it's travel. When the machine powers up, (also when KFLOP powers up) it sets the machine coordinates to 0,0,0, which is always the same position. The KmotionCNC job coordinates (without the machine coord checkbox on) are also at 0,0,0.

    When I CAM the parts, I set the top of the material as z=0, so I need the machine to reference that. I use a z setting tool with a dial indicator on the face. I also always use my shortest tool holder with no tool inserted for referencing the job 0. This tool holder is inserted. The z setter goes on the material, and I manually jog the axes over and down with the handbox until the z setter is spot on 0. This is actually 2 inches above the material, so I then set the z axis to 2.000". All of the other tool offsets are measured using the same z setter and the values stored in the tool table.

    For X and Y, I usually use a laser edge finder that shoots a pinpoint laser beam to wherever my job datum is for that job. When that's on the money I zero X and Y.

    In the CAM software, I usually insert the following code for a tool change:

    (Tool Change)
    M09 (Coolant Off)
    G00 G53 Z0 (Move to Machine Coord Z0)
    M0 (Pause Job)

    This brings the Z axis up to machine 0 so the next tool can be inserted. It also pauses the job until you press start again.

    Thus far, I have not tried to set up fixtures, but I may be doing that in the future.

    Rick
    Ok you already have a tool setter, thats great! But that is a poor way of doing it. If you setup another job thats higher or lower you no longer have that same piece of stock to lay your tool setter on. Sure you could shift things, but what about you break a tool after shifting? Now its even more complicated to figure out.

    Its really much easier then this. Next time just lay your tool setter on the table, load a tool and jog down till it reads zero on the dial and then run the C program i posted to set that tool, set it up as a user button. This will store the distance from home (0,0,0 when you start machine in the middle in your case) to the tool setter for that tool. Always do this with tool setter in the same place (on table in this case). Repeat this for all your tools until they are all set.

    Now when you want to set your part zero on the top of your stock, simply load any tool that you have already measured and bring it to the top of the stock and zero the DRO. Thats it, its that easy. If you have a second operation to do simply touch the top of your stock again with any measured tool and all your tools will move with it. You may possibly need to add G54 to your program if not there already, might not even be necessary as it seems to be default in kmotioncnc.



  12. #12
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Interesting... Couple of questions though,

    So your offsets are calculated relative to machine coordinates z=0?

    The home position for my machine is not accurate. There are just some pointers on the X and Y axes. The Z just runs up to flush with the body. Not something that would be repeatable to 0.001".
    Couldn't use that position for an accurate reference point.

    I commonly have to move the knee on the milling machine, which changes the table height. In order to set up more tools later on, would I have to set the table to the same height as before?

    Currently my tool offsets are referenced to the shortest tool holder so that as long as you zero the part with the short tool holder, all other tool offsets are relative to that.

    Rick



  13. #13
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    484
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Quote Originally Posted by rbickle View Post
    Interesting... Couple of questions though,

    So your offsets are calculated relative to machine coordinates z=0?

    The home position for my machine is not accurate. There are just some pointers on the X and Y axes. The Z just runs up to flush with the body. Not something that would be repeatable to 0.001".
    Couldn't use that position for an accurate reference point.

    I commonly have to move the knee on the milling machine, which changes the table height. In order to set up more tools later on, would I have to set the table to the same height as before?

    Currently my tool offsets are referenced to the shortest tool holder so that as long as you zero the part with the short tool holder, all other tool offsets are relative to that.

    Rick
    Yes offsets are calculated relative to machine coordinates Z=0. If you turn on tool length compensation and send the machine to Z zero in g-code (without a fixture offset) all the tools will move right back to the point you measured them. So your zero point for all tools is right at your tool setter.

    Then you use a fixture offset (g54. g55 etc) to shift all the tools from the place you measured them (tool setter), to your part. This is calculated automatically by kmotioncnc whenever you enter a value or zero out the DRO. For example if your tool setter is exactly 2.000 from table and you setup a part that happens to be 4.500 from the table... You touch all your tools off the tool setter, then move to the top of your part and zero out the DRO and Kmotion will calculate that you are now 2.500" higher and it will store this value for G54. Doing it this way also allows you to run several fixture offsets in one program which is handy sometimes.

    Ideally you should have home switches to reference the machine more accurately. Still might be slightly more helpful if you run 2-3 different jobs or setups without powering machine off. Maybe after a restart some tools might be good enough if not cutting critical features, like drilling through holes might be fine. Honestly, I didnt think about the Knee. I guess thats sort of a huge difference from a typical VMC in terms of setting work offsets. I supposed you could figure out some kind of procedure to set your knee back and the same place to set another tool. But that sounds like a pain to be honest, im not sure whats the best option if your moving the knee alot. That sort of changes everything. I guess you will have to give it some thought and find a system that works best for your machine. Good luck with it.



  14. #14
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Maybe later on I can make a more accurate home sensor for each axis. A metal tab with a fixed optical sensor would be pretty accurate. Might be a pain though to have the X and Y axes move several feet to home.
    If things go well, maybe I'll buy a bigger VMC and retrofit it too. This machine was just my first foray into CNC machining. A tool changer sure would be nice.

    Thanks for the info. on the offsets...



  15. #15
    Member
    Join Date
    May 2012
    Location
    canada
    Posts
    484
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Quote Originally Posted by rbickle View Post
    Maybe later on I can make a more accurate home sensor for each axis. A metal tab with a fixed optical sensor would be pretty accurate. Might be a pain though to have the X and Y axes move several feet to home.
    If things go well, maybe I'll buy a bigger VMC and retrofit it too. This machine was just my first foray into CNC machining. A tool changer sure would be nice.

    Thanks for the info. on the offsets...
    Well you could position everything closer then that before telling it to home. Another option might be to make your metal tab an inch or more long and you could travel toward home at a decent speed until the sensor detects an edge, then slow down and travel very slow and set the home position as you come off the other edge.

    Anytime, thanks.



  16. #16
    Member
    Join Date
    Jun 2004
    Location
    Scotland
    Posts
    350
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    This is getting far too complex.

    If you don't have accurate homing, then touching of is perfectly acceptable provided you're consistent with your working method. I done it for a couple years with my old lathe.
    Power machine on, insert known tool into spindle, ensure offsets for that tool are active, touch of work piece, zero DROs.
    For any new tool, having established a reference, insert the new tool, touch it off the work piece, then update the tool offsets so it's now at zero.

    On that lathe I was still running Mach3, so it had a screen where setting tool offsets was reasonably easy. With KMCNC you have to write a suitable C program to calculate and store the offsets.
    Some methods say to have a dedicated 'master' tool that you never change, but once you have one known tool, all the tools become relative to that original tool. The only risk by not using the master tool to establish new offsets, is you can get accumulative offset errors, but with a bit common sense you soon learn what tool offsets need slight adjustments to keep everything consistent.

    Even if you had accurate homing, on a knee mill, unless you also home the knee, you still need to use the touch off method to establish height.



  17. #17
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Tom,

    I must be doing something wrong here. I inserted this code verbatim into a user button on KmotionCNC, and it just hangs.
    i tried running it on different threads, 4 and 6. The thread stays running and the button stays blue.

    Thanks,
    Rick


    Quote Originally Posted by TomKerekes View Post
    Hi rbickle,

    Here is code that you might assign to a User Button to Turn Off Tool Length Compensation.

    Code:
    #include "KMotionDef.h"
    
    #define TMP 10 // which spare persist to use to transfer data
    #include "KflopToKMotionCNCFunctions.c"
    
    main()
    {
        MDI("G49");  //Turn off Tool Length Compensation
    }
    Something to consider. The fixture selected and tool selected are shown in the dropdown itself. If you hover over the dropdown it does show the current offset. Although the Tool and Tool Offset corresponds to the loaded Tool and the Tool Table offset for that Tool rather than what Hxxx tool is enabled or selected.

    Regards




  18. #18
    Member TomKerekes's Avatar
    Join Date
    May 2006
    Location
    USA
    Posts
    3340
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    Hi rbickle,

    Set the Action Type to "Execute Prog" without any wait. There can be a deadly embrace situation where the KMotionCNC is held up waiting for the C Program to finish but the C Program is waiting for KMotionCNC to respond. The latest Test Program 4.34j should no longer have that issue.

    Regards

    Regards
    TK http://dynomotion.com


  19. #19
    Registered
    Join Date
    Feb 2011
    Location
    USA
    Posts
    43
    Downloads
    0
    Uploads
    0

    Default Re: Tool offset trouble

    That did the trick. Thanks Tom.



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Tool offset trouble

Tool offset trouble

Tool offset trouble