587,072 active members*
2,992 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > G-Code Programing > Toolchanging and offsets gcode programming
Results 1 to 13 of 13
  1. #1
    Join Date
    Apr 2005
    Posts
    28

    Toolchanging and offsets gcode programming

    Hello guys,

    I am dealing with a problem i cannot solve.
    I do have a table of offsets for multiple tools.
    The offsets are measured from the upper edge of a standard toolholder.
    For example:
    #Tool :: #offset
    1 :: 100;
    2 :: 110;
    3 :: 90;
    I first take tool 1, position it on a workpiece and change the absolut coordinates to 0 : G92 X0 Y0 Z0;
    Run a program with this tool, then change to tool no 2.
    How can i change automacally the absolute coordinates on Z axis to match to this tool offset, actually not the tooloffset but the difference between this tool and the previous one, i mean Z=Z-10??
    If i enter this: G90G43Z0H2, the machine will go to 112 in absolute coordinates.
    I want to do this, because i want a bigger partprogram to change the tools automatically and adjust for it's tooloffsets.
    How do you guys do it?

    Thank you in advance,
    ddanutz

  2. #2
    Join Date
    Mar 2003
    Posts
    4826
    The controller should take care of applying the length offsets when you call the new tool number and new H number. The displays do not need to be programmed manually at all (with G92), unless you are running a very old machine with no work offsets. What kind of control is it?

    If you must use G92, why would you call the tool home position Z0? Why not set it to be the distance of the standard toolholder above the part surface? Either that, or make your tool offsets the full distance from tool home, to the part surface (Z0). This is risky because the tool can rapid right into the part if you have not set a Z rapid clearance plane at the beginning of each process for each tool. You would be better to set the length offsets to a rapid plane 25 or 50 mm above the part (use a gage block or something) and at least then, your tool will move to this rapid clearance plane when the length offset executes.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Join Date
    Apr 2005
    Posts
    28
    Hi,

    My control is Fanuc 18MC.
    I do not use Z0 as a home, i use G92 for taking part origins.
    My problem was that the renishaw i got enters the offsets for each tool measured from the toolholder for example.
    T1=100mm
    T2=110mm
    T3=90mm;

    If i first machine with T1, and take Z=0 with the tip of the tool touching the upper face of the part, then applying H2 when changing tool no.2 causes the spindle to raise 110mm, instead of 10mm, which is the difference between length of T2 and T1. The same for T3, etc.
    One solution might be to measure all the tools, then put to the offsets the following:
    T1 > 100-100=0 (the first tool, the one which i use for touching the surface and enter Z=0);
    T2> 110-100=10mm;
    T3> 90-100=-10mm;
    then the offsets stored on the table should be: H1=0; H2=10; H3=-10.
    But this is something i would like to avoid, can the controller do this automatically, or by some Gcode programming. How do you work with these?

    Thank you,
    ddanutz

  4. #4
    Join Date
    Mar 2006
    Posts
    167
    It would be better to set your workpiece zero with G54 as I mentioned in you other thread. If you are using a tool which has an offset, eg. tool 1 = 100mm, when you touch the Z datum face you calculate the Z value with the tool 1 offset. Offset - Work offset - Select G54 - type Z100. - Measure.

    Once the work offset and all the tool offsets have been set, I usually use G0 G43 Z10. H2 ( or whatever offset number) as my first Z axis move after calling up the tool. This will bring whichever tool I am using down to 10mm above the datum surface with the offset active. This allows you to check your tool offset is correct as well, because you can see how far your tool is from the job as it comes down and how far it has to go with the distance to go display.

    regards, Oz

  5. #5
    Join Date
    Apr 2005
    Posts
    28
    Well,

    G43 adds an H value to the Z specified after the G00.
    So, if i have an offset of 100mm for T1, command G00 Z1. will move the machine to 101mm. Maybe i cannot follow you, but this is what i did, to simplify things in my head.
    measured 4 tools:
    H1 = 100;
    H2 = 110;
    H3 = 90;
    H4 = 120;
    then i subtract the H1 value from all other, and make h1=0, and use it for the first tool of the job.
    So, it would look like:
    h1=0;
    h2=10;
    h3=-10;
    h4=20;

    There must be some other way, i read your info 100 times more to understand better, now i don't!

    Thank you,
    ddanutz

  6. #6
    Join Date
    Mar 2006
    Posts
    167
    Quote Originally Posted by ddanutz View Post
    If i enter this: G90G43Z0H2, the machine will go to 112 in absolute coordinates.
    When you say the machine goes to 112 in absolute coordinates, do you mean the display shows 112mm, or it is actually 112mm from tip of tool to Z datum?

    regards, Oz

  7. #7
    Join Date
    Apr 2005
    Posts
    28
    Dear Oz,

    both, it would display 112 on absolute coordinates and go to 112mm distance from tip to my Zero surface.

    ddanutz

  8. #8
    Join Date
    Aug 2004
    Posts
    145
    I have to ask: before using T1 to zero Z, have you got it's offset applied (H1)?

  9. #9
    Join Date
    Apr 2005
    Posts
    28
    Hmm, actually not!
    I did not, should I?
    Measure offsets of the tools (T1=112.345, T2= etc).
    Then enter in MDI and input H1. Then put the tip of T1 on the surface and put Z0 ->hit measure. After that G54 in MDI. and update. I do not believe this would work.

    Regards,
    ddanutz

  10. #10
    Join Date
    Aug 2004
    Posts
    145
    If you don't use a G43 H1, it assumes a zero offset for T1. So when you set Z0, the controller thinks it's the spindle at Z0, not the tool tip.

    So when you call T2, instead of compensating for the lenght difference of the two tools, it compensates for the lenght of T2 minus zero.

    Oh, have to ask also, you use G43, right? Because I didn't see you mention it.

    Nikolas

  11. #11
    Join Date
    Mar 2006
    Posts
    167
    Quote Originally Posted by ddanutz View Post
    Hmm, actually not!
    I did not, should I?
    Measure offsets of the tools (T1=112.345, T2= etc).
    Then enter in MDI and input H1. Then put the tip of T1 on the surface and put Z0 ->hit measure. After that G54 in MDI. and update. I do not believe this would work.

    Regards,
    ddanutz
    What you have typed here is more or less what I explained in the other thread, except you don't need to call the offset by MDI first.

    Measure offsets of the tools (T1=112.345, T2= etc).
    Then put the tip of T1 on the surface > press offset key > press work softkey > highlight g54 (group 01 - also make sure group 00 is all zero) > type Z112.345 ( or whatever tool 1 offset is ) > press measure softkey.

    By using the method above, you can use any tool for which you know the offset, which is easy when you have a probe.

    regards, Oz

  12. #12
    Join Date
    Apr 2005
    Posts
    28
    hellooo,

    it is working! Thank you very much for your explanation.
    However, i do not know why, but i do feel more confortable and safe with the method of zeroing the first tool offset and subtract the original first tool offset from all others. I guess i might need to work more on it!
    With this, i found some strange things going on the controller!!
    If i enter some G54 work coordinates, and call this coordinates in MDI, by G54, the absolute coordinates do not update correctly, they update with other values. This does not happen all the time, but when it happens, i must adjust absolute coordinates by G92. That is why i feel safer with first Tool on Z=0 and offset zero. What do you think about this, what am i doing wrong?

    Thanks,
    ddanutz

  13. #13
    Join Date
    Mar 2006
    Posts
    167
    After you enter coordinates in MDI, the machine should move to and show the absolute position in X & Y, but Z could be incorrect. It will depend on whether you have also called the offset. This is why setting the offset to zero doesn't give the error.

    regards, Ray

Posting Permissions

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