Need Help! Milling/G-Code question - G41 Radius Compensation


Results 1 to 4 of 4

Thread: Need Help! Milling/G-Code question - G41 Radius Compensation

  1. #1
    *Registered User* CodeX's Avatar
    Join Date
    Jun 2018
    Posts
    3
    Downloads
    0
    Uploads
    0

    Question Need Help! Milling/G-Code question - G41 Radius Compensation

    Hi All,
    As the title says I quite new to G-Code. I am trying to put a rebate into the back end of a panel, it needs to be 19mm wide, 7mm deep and start 31mm from the back of the panel. I have written some G-code that does this which I will post below and it does what it is supposed to on the current cutter with a radius of 5.15mm. However when I put a new cutter in with a radius of 6mm. The G-code does not compensate for the new radius. This results in the rebate being over 20mm wide which is no good. I have tried using the G41 to compensate for the new radius,but I am not sure if I have done it corerctly or if I am missing something. Is there a way to do this without havnig to manually changing the 'Y' coordinates each time I change the tool? Any help on this would be much appreciated. If you need any other info please let me know.

    G-Code:

    T105
    M13S16000
    G08P1
    G90
    G0G43X-50.Y2139.5H5Z50.
    Z10.
    G1Z-7.F2000
    G41 X1000.F20000
    Y2130.75
    X-25.
    G40 X-50
    G0Z50.

    Cheers,

    Nigel

    Similar Threads:


  2. #2
    Member
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    1230
    Downloads
    0
    Uploads
    0

    Default Re: Need Help! Milling/G-Code question - G41 Radius Compensation

    Quote Originally Posted by CodeX View Post

    G-Code:

    T105
    M13S16000
    G08P1
    G90
    G0G43X-50.Y2139.5H5Z50.
    Z10.
    G1Z-7.F2000
    G41 X1000.F20000
    Y2130.75
    X-25.
    G40 X-50
    G0Z50.

    Cheers,

    Nigel
    Hello Nigel,
    Your code as is would apply the Tool Radius Comp over the long X travel and would probably result in a taper on the Y2139.5 side.

    There are a couple of questions you need to answer to get the most accurate answer:

    1. What Control is on the machine?

    2. Does the control use separate Tool Length and Tool Radius Comp addresses? That is, does it use a H address for Tool Length and a D address for Tool Radius Comp.

    The following code example assumes that separate Tool Length and Tool Radius Comp Offset addresses are used.

    T105
    M13S16000
    G08P1
    G90
    G00 X-50.0 Y2135.5 (RAPID TO XY START COORDINATE)
    G43 Z50.0 H5.
    Z10.0
    G01 Z-7.0 F2000
    G41 Y2139.5 D5 F20000 (APPLY TOOL RAD COMP PERPENDICULAR TO NEXT AXIS MOVE)
    X1000.0
    Y2130.75
    X-50.0
    G40 Y2134.75 (CANCEL TOOL RAD COMP PERPENDICULAR TO LAST AXIS MOVE)
    G00 Z50.0

    The above program uses Partial Tool Radius Comp, as your original program compensated for the 5.15 Radius in the code. Accordingly, the radius value registered in the Tool Radius Comp Offset will be the difference between the Radius compensated for in code (5.15) and the radius of the tool actually being used (7.0mm in your example). Therefore, the value registered will be 1.85. Your Y Start location then needs to be equal to, or greater than the value registered in the Tool Radius Comp Offset, away from the first Y target value in your program. The width of the slot in code (ignoring the cutter radius) is 8.75. Accordingly, I've used a stand off from the Y2139.5 feature of 4.0mm; hence the Y2135.5 "Y" Start Coordinate.

    Regards,

    Bill



  3. #3
    *Registered User* CodeX's Avatar
    Join Date
    Jun 2018
    Posts
    3
    Downloads
    0
    Uploads
    0

    Default Re: Need Help! Milling/G-Code question - G41 Radius Compensation

    Quote Originally Posted by angelw View Post
    Hello Nigel,
    Your code as is would apply the Tool Radius Comp over the long X travel and would probably result in a taper on the Y2139.5 side.

    There are a couple of questions you need to answer to get the most accurate answer:

    1. What Control is on the machine?

    2. Does the control use separate Tool Length and Tool Radius Comp addresses? That is, does it use a H address for Tool Length and a D address for Tool Radius Comp.

    The following code example assumes that separate Tool Length and Tool Radius Comp Offset addresses are used.

    T105
    M13S16000
    G08P1
    G90
    G00 X-50.0 Y2135.5 (RAPID TO XY START COORDINATE)
    G43 Z50.0 H5.
    Z10.0
    G01 Z-7.0 F2000
    G41 Y2139.5 D5 F20000 (APPLY TOOL RAD COMP PERPENDICULAR TO NEXT AXIS MOVE)
    X1000.0
    Y2130.75
    X-50.0
    G40 Y2134.75 (CANCEL TOOL RAD COMP PERPENDICULAR TO LAST AXIS MOVE)
    G00 Z50.0

    The above program uses Partial Tool Radius Comp, as your original program compensated for the 5.15 Radius in the code. Accordingly, the radius value registered in the Tool Radius Comp Offset will be the difference between the Radius compensated for in code (5.15) and the radius of the tool actually being used (7.0mm in your example). Therefore, the value registered will be 1.85. Your Y Start location then needs to be equal to, or greater than the value registered in the Tool Radius Comp Offset, away from the first Y target value in your program. The width of the slot in code (ignoring the cutter radius) is 8.75. Accordingly, I've used a stand off from the Y2139.5 feature of 4.0mm; hence the Y2135.5 "Y" Start Coordinate.

    Regards,

    Bill
    Hi Bill,
    Thanks for your response.
    1. What Control is on the machine?
    a. Fanuc
    2. Does the control use separate Tool Length and Tool Radius Comp addresses? That is, does it use a H address for Tool Length and a D address for Tool Radius Comp.
    a. Yes I believe the H is for Height and D is for Radius.

    I have commented in another thread about this. As I think I was using the incorrect D command in the line G41 Y2139.5 D5 F20000. I think it should be G41D35 Y2139.5 D5 F20000. D35 I believe is a reference the data registry in the Fanuc software for my number 5 tool radius setting. Is this correct?

    Thanks Again
    Nigel



  4. #4
    Member
    Join Date
    Sep 2010
    Location
    Australia
    Posts
    1230
    Downloads
    0
    Uploads
    0

    Default Re: Need Help! Milling/G-Code question - G41 Radius Compensation

    Quote Originally Posted by CodeX View Post
    Hi Bill,
    Thanks for your response.
    1. What Control is on the machine?
    a. Fanuc
    2. Does the control use separate Tool Length and Tool Radius Comp addresses? That is, does it use a H address for Tool Length and a D address for Tool Radius Comp.
    a. Yes I believe the H is for Height and D is for Radius.

    I have commented in another thread about this. As I think I was using the incorrect D command in the line G41 Y2139.5 D5 F20000. I think it should be G41D35 Y2139.5 D5 F20000. D35 I believe is a reference the data registry in the Fanuc software for my number 5 tool radius setting. Is this correct?

    Thanks Again
    Nigel
    Hello Nigel,
    Your example code in this Thread doesn't call any Tool Radius Comp Offset.

    The correct D number command to use is the one under which you have registered the Radius value for the tool being used. It can be any number within the range of Offsets available with the control. However, its good form to associate the Offset Number with the Tool Number being used, For example, if T05 was being used, the H and D numbers would be H05 and D05 respectively for Tool Length and Tool Radius compensation. For controls that only have H address Offsets, its common to use the associated Offset Number of the Tool Number for Tool Length and another H Offset number outside the max tool number of the machine for Tool Radius Comp.

    In most cases, the control will be supplied with far more Offsets than the Tool Capacity of the machine. Therefore, to keep some association with the Tool Number when specifying a Tool Radius Comp Offset, a constant greater than the max number of tools is added to the Tool Number to select a Tool Radius Offset Number to use. For example, lets say that the machine has a 50 tool capacity magazine. In this case Offsets 1 to 50 would be reserved for Tool Lengths Offsets and a constant such as 100 used to determine the Tool Radius Offset number. If the tool being used is T05, then the Tool Length call would be with H05 and Tool Radius Comp with H105, the two trailing digits of the Tool Radius Comp H call being the logical association with the Tool Number.

    Your example of G41D35 Y2139.5 D5 F20000 is incorrect. If the Radius Compensation value was registered in Offset 05, accessible via a D address, then the correct syntax will be as follows:

    G41 Y2139.5 D5 F20000

    Regards,

    Bill



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

Need Help! Milling/G-Code question - G41 Radius Compensation

Need Help! Milling/G-Code question - G41 Radius Compensation