Can't get radius comp to work in this program.
Close
Login to Your Account
Page 1 of 2 12 LastLast
Results 1 to 20 of 22
  1. #1
    Join Date
    Feb 2006
    Location
    Republic of Texas
    Posts
    2,452
    Post Thanks / Like

    Default Can't get radius comp to work in this program.

    Fanuc 18mc. Dull threadmill, thread is a little tight . Okay let's add a little radius comp. Tried to add radius comp with no luck.

    First attempt: changed X and Y in line 390 by .1 then added line G41 D108 x-1.038 Y1.7864 f.1 after line 400. Nothing.

    Second attempt: Changed X and Y in line 390 by .1 then added the above G41 line as the first line of sub. Nothing.

    I'm lost.

    N370 T8 (1/2 X 13 THREADMILL) M6
    N380 G54
    N390 G0 G90 X-1.0308 Y1.7864 S4365 M3
    N400 G43 Z1.0 H8 T15
    N410 G72.1 P0456 L6 X0 Y0 R60.
    N550 M09
    N560 M05
    N570 G28 G40 G91 Z.0 M09
    N580 G28 Y.0
    N590 G90
    N600 M30

    :0456 (SUB FOR 04550
    N430 Z-.5442 M8
    N440 G1 Z-.6442 F17.4
    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609
    N460 G3 X-.9758 Y1.7864 Z-.5481 I-.055 J.0
    N470 G3 X-1.0308 Y1.7864 Z-.5288 I-.0275 J.0
    N490 G1 Z-.6442 F17.4
    N500 G3 X-.9523 Y1.7864 Z-.625 I.0392 J.0 F5.3882
    N510 G3 X-.9523 Y1.7864 Z-.5481 I-.0785 J.0
    N520 G3 X-1.0308 Y1.7864 Z-.5288 I-.0393 J.0
    N530 G0 Z1.0
    N540 M99

  2. #2
    Join Date
    May 2006
    Location
    Burlington, North Carolina
    Posts
    379
    Post Thanks / Like
    Likes (Given)
    418
    Likes (Received)
    143

    Default

    My first guess would be what's in 'D108'?

  3. Likes Booze Daily liked this post
  4. #3
    Join Date
    May 2019
    Country
    UNITED STATES
    State/Province
    Pennsylvania
    Posts
    15
    Post Thanks / Like
    Likes (Given)
    25
    Likes (Received)
    15

    Default

    You want to move at least 51% of the tool diameter to turn on the comp. Bad things happen otherwise.

  5. #4
    Join Date
    Feb 2008
    Location
    MI, USA
    Posts
    778
    Post Thanks / Like
    Likes (Given)
    59
    Likes (Received)
    294

    Default

    What do you mean by "nothing"?

    Does the code execute, or does it give an alarm?

    Does it work without using G72.1?

    I assume you are putting in a negative value in your D108?

    With that G72.1 in there, I would start and end your cutter comp in your sub, not before it. I would only move in X a small amount, not both X and Y.

    Plunge your tool into the hole a small amount off center to the right, closer to the threads, then activate G41 to "go to center" of the hole. Then it will arc in.


    I made that change in this code. I am assuming that your threadmill has clearance enough to be able to plunge into the hole .010 off center. I am also assuming the cutter comp value you are using in D108 is small, less than .010".



    :0456 (SUB FOR 04550)
    N421G0 G90 X-1.0208 Y1.7864(MOVED OVER .010)
    N430 Z-.5442 M8
    N440 G1 Z-.6442 F17.4
    N441 G1 G41 D108 X-1.0308 Y1.7864 (GO BACK TO CENTER)
    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609
    N460 G3 X-.9758 Y1.7864 Z-.5481 I-.055 J.0
    N470 G3 X-1.0308 Y1.7864 Z-.5288 I-.0275 J.0
    N471 G40G1X-1.0208Y1.7864
    N490 G1 Z-.6442 F17.4
    N491 G1 G41 D108 X-1.0308 Y1.7864 (GO BACK TO CENTER)
    N500 G3 X-.9523 Y1.7864 Z-.625 I.0392 J.0 F5.3882
    N510 G3 X-.9523 Y1.7864 Z-.5481 I-.0785 J.0
    N520 G3 X-1.0308 Y1.7864 Z-.5288 I-.0393 J.0
    N521G40G1X-1.0208Y1.7864
    N530 G0 Z1.0
    N540 M99

  6. #5
    Join Date
    Feb 2006
    Location
    Republic of Texas
    Posts
    2,452
    Post Thanks / Like

    Default

    By nothing, I mean that code executes but there is no change in the radius comp so that the tool does not enlarge the threads. No alarms.

    D108 = -.001

    The procedures and values shown have worked in other programs.

    Worked in G72.1 program that made rectangular pockets.

  7. #6
    Join Date
    Dec 2014
    Country
    CANADA
    State/Province
    British Columbia
    Posts
    1,276
    Post Thanks / Like
    Likes (Given)
    361
    Likes (Received)
    584

    Default

    Quote Originally Posted by bakrch2 View Post
    You want to move at least 51% of the tool diameter to turn on the comp. Bad things happen otherwise.
    That only applies if you are using tool centerline programming and offsetting the tool with the diameter column on something like a Haas. Most modern CAM systems are setup from stock to use tool edge programming already accounting for the tool diameter. I frequently go down to .005 or less CRC lines for small features and have never had "bad things" happen.

  8. #7
    Join Date
    Nov 2014
    Country
    UNITED STATES
    State/Province
    Florida
    Posts
    3,431
    Post Thanks / Like
    Likes (Given)
    1480
    Likes (Received)
    1621

    Default

    Quote Originally Posted by alphonso View Post
    By nothing, I mean that code executes but there is no change in the radius comp so that the tool does not enlarge the threads. No alarms.

    D108 = -.001

    The procedures and values shown have worked in other programs.

    Worked in G72.1 program that made rectangular pockets.
    Are you sure your machine supports wear comp? I think it would have to be pretty old not to, but some controls will not accept/read a negative value.

    edit: just noticed you said it worked before

  9. #8
    Join Date
    Nov 2014
    Country
    UNITED STATES
    State/Province
    Florida
    Posts
    3,431
    Post Thanks / Like
    Likes (Given)
    1480
    Likes (Received)
    1621

    Default

    Quote Originally Posted by bakrch2 View Post
    You want to move at least 51% of the tool diameter to turn on the comp. Bad things happen otherwise.
    Quote Originally Posted by Hazzert View Post
    That only applies if you are using tool centerline programming and offsetting the tool with the diameter column on something like a Haas. Most modern CAM systems are setup from stock to use tool edge programming already accounting for the tool diameter. I frequently go down to .005 or less CRC lines for small features and have never had "bad things" happen.
    Not only what Hazzert said, but when getting into very small tools, 51% of diameter would be squat and would not always allow you to successfully turn on comp.


    51% of .020" = .0102" so if you needed to comp +.001/.002 you would either get an alarm or a funky move that might gouge/mark the part...

  10. Likes bakrch2 liked this post
  11. #9
    Join Date
    Jan 2014
    Location
    Temecula, Ca
    Posts
    2,749
    Post Thanks / Like
    Likes (Given)
    1246
    Likes (Received)
    3568

    Default

    You're not turning your comps on and off correctly. Some controls are fussier than others, but your G40 on your G28 G91 Z0 line is unacceptable.
    Turning the comp on and then leaving it on for multiple passes is also a BAD idea. What Cam system did you use to generate this?
    I would recommend, go to a thread mill makers site, Emuge, SCT of whoever, download their code, which will have the comp properly coded, and try that.

  12. Likes toolsteel liked this post
  13. #10
    Join Date
    Feb 2006
    Location
    Republic of Texas
    Posts
    2,452
    Post Thanks / Like

    Default

    Quote Originally Posted by dandrummerman21 View Post
    What do you mean by "nothing"?

    Does the code execute, or does it give an alarm?

    Does it work without using G72.1?

    I assume you are putting in a negative value in your D108?

    With that G72.1 in there, I would start and end your cutter comp in your sub, not before it. I would only move in X a small amount, not both X and Y.

    Plunge your tool into the hole a small amount off center to the right, closer to the threads, then activate G41 to "go to center" of the hole. Then it will arc in.

    I made that change in this code. I am assuming that your threadmill has clearance enough to be able to plunge into the hole .010 off center. I am also assuming the cutter comp value you are using in D108 is small, less than .010".



    :0456 (SUB FOR 04550)
    N421G0 G90 X-1.0208 Y1.7864(MOVED OVER .010)
    N430 Z-.5442 M8
    N440 G1 Z-.6442 F17.4
    N441 G1 G41 D108 X-1.0308 Y1.7864 (GO BACK TO CENTER)
    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609
    N460 G3 X-.9758 Y1.7864 Z-.5481 I-.055 J.0
    N470 G3 X-1.0308 Y1.7864 Z-.5288 I-.0275 J.0
    N471 G40G1X-1.0208Y1.7864
    N490 G1 Z-.6442 F17.4
    N491 G1 G41 D108 X-1.0308 Y1.7864 (GO BACK TO CENTER)
    N500 G3 X-.9523 Y1.7864 Z-.625 I.0392 J.0 F5.3882
    N510 G3 X-.9523 Y1.7864 Z-.5481 I-.0785 J.0
    N520 G3 X-1.0308 Y1.7864 Z-.5288 I-.0393 J.0
    N521G40G1X-1.0208Y1.7864
    N530 G0 Z1.0
    N540 M99
    Oops! I stand corrected about alarms. One of my guys was telling me that he couldn't get rad comp to work but didn't say anything about alarms. Yes, it was giving alarm 034.

    I can follow your editing of my code. I don't particularly understand why you have G40 between the passes of threadmilling and at the end of the sub. Wouldn't G40 also cancel my H values?

  14. #11
    Join Date
    Feb 2008
    Location
    MI, USA
    Posts
    778
    Post Thanks / Like
    Likes (Given)
    59
    Likes (Received)
    294

    Default

    Quote Originally Posted by alphonso View Post
    Oops! I stand corrected about alarms. One of my guys was telling me that he couldn't get rad comp to work but didn't say anything about alarms. Yes, it was giving alarm 034.

    I can follow your editing of my code. I don't particularly understand why you have G40 between the passes of threadmilling and at the end of the sub. Wouldn't G40 also cancel my H values?

    Thinking back to your code, it would probably be okay to not cancel cutter comp between your passes because it is programmed to start and end at the center of the hole. Often, when I program them, my lead in arc is only a 1/4 turn that starts off center. I enter the hole in the center, G41 to the start of my arc, then go.

    I feel cozier with it canceled before doing several passes, basically.


    G40 shouldn't interfere with your H for G43 tool length comp, that is usually cancelled with G49. Unless there is a setting for that that I am unaware of?

  15. #12
    Join Date
    Sep 2015
    Country
    UNITED STATES
    State/Province
    Ohio
    Posts
    1,064
    Post Thanks / Like
    Likes (Given)
    638
    Likes (Received)
    1026

    Default

    Couple things I noticed.
    Depending on the direction you moved your start point to turn on comp, you may be comped to the wrong side of your end point. I would expect to see an alarm because it can’t make your arc-in move.

    Second thing, if you need your comp move to be .100 make sure you turn on and off above your part because you will gouge into the side of your hole if you do it inside the sub

  16. #13
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    3,655
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1438

    Default

    Quote Originally Posted by alphonso View Post
    Oops! I stand corrected about alarms. One of my guys was telling me that he couldn't get rad comp to work but didn't say anything about alarms. Yes, it was giving alarm 034.
    Hello alphonso,
    If alarm 034 is being raised, the program will be halted and with a program that is stopped, nothing will happen. O34 refers to TR Comp Mode being Started or Cancelled using a Circular Interpolation Block.

    Rather than state what changes you have made to which Blocks, Post a copy of the actual program code you're using, for the Forum to see, so there is no confusion as to the code you are trying to get running.

    Regards,

    Bill

  17. #14
    Join Date
    Feb 2006
    Location
    Republic of Texas
    Posts
    2,452
    Post Thanks / Like

    Default

    Quote Originally Posted by angelw View Post
    Hello alphonso,
    If alarm 034 is being raised, the program will be halted and with a program that is stopped, nothing will happen. O34 refers to TR Comp Mode being Started or Cancelled using a Circular Interpolation Block.

    Rather than state what changes you have made to which Blocks, Post a copy of the actual program code you're using, for the Forum to see, so there is no confusion as to the code you are trying to get running.

    Regards,

    Bill
    All right, Bill, This is the program that is in the machine. As I said the threadmill is dull and cutting a bit undersized.

    Red text is what we changed/added.

    N370 T8 (1/2 X 13 THREADMILL) M6
    N380 G54
    N390 G0 G90 X-1.0308 Y1.7864 S4365 M3
    N400 G43 Z1.0 H8 T15
    N410 G72.1 P0456 L6 X0 Y0 R60.
    N550 M09
    N560 M05
    N570 G28 G40 G91 Z.0 M09
    N580 G28 Y.0
    N590 G90
    N600 M30

    :0456 (SUB FOR 04550
    N430 Z-.5442 M8
    N440 G1 Z-.6442 F17.4
    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609
    N460 G3 X-.9758 Y1.7864 Z-.5481 I-.055 J.0
    N470 G3 X-1.0308 Y1.7864 Z-.5288 I-.0275 J.0
    N490 G1 Z-.6442 F17.4
    N500 G3 X-.9523 Y1.7864 Z-.625 I.0392 J.0 F5.3882
    N510 G3 X-.9523 Y1.7864 Z-.5481 I-.0785 J.0
    N520 G3 X-1.0308 Y1.7864 Z-.5288 I-.0393 J.0
    N530 G0 Z1.0
    N540 M99

    First attempt: Got 034 error and program stopped.

    N370 T8 (1/2 X 13 THREADMILL) M6
    N380 G54
    N390 G0 G90 X-1.1083 Y1.8864 S4365 M3
    N400 G43 Z1.0 H8 T15
    G01 G41 D108 X-1.308 Y1.7864 F.01
    N410 G72.1 P0456 L6 X0 Y0 R60.
    N550 M09
    N560 M05
    N570 G28 G40 G91 Z.0 M09
    N580 G28 Y.0
    N590 G90
    N600 M30

    :0456 (SUB FOR 04550
    N430 Z-.5442 M8
    N440 G1 Z-.6442 F17.4
    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609
    N460 G3 X-.9758 Y1.7864 Z-.5481 I-.055 J.0
    N470 G3 X-1.0308 Y1.7864 Z-.5288 I-.0275 J.0
    N490 G1 Z-.6442 F17.4
    N500 G3 X-.9523 Y1.7864 Z-.625 I.0392 J.0 F5.3882
    N510 G3 X-.9523 Y1.7864 Z-.5481 I-.0785 J.0
    N520 G3 X-1.0308 Y1.7864 Z-.5288 I-.0393 J.0
    N530 G0 Z1.0
    N540 M99

    Second attempt: Got 034 error and program stopped.

    N370 T8 (1/2 X 13 THREADMILL) M6
    N380 G54
    N390 G0 G90 X-1.1083 Y1.8864 S4365 M3
    N400 G43 Z1.0 H8 T15
    N410 G72.1 P0456 L6 X0 Y0 R60.
    N550 M09
    N560 M05
    N570 G28 G40 G91 Z.0 M09
    N580 G28 Y.0
    N590 G90
    N600 M30

    :0456 (SUB FOR 04550
    G01 G41 D108 X-1.308 Y1.7864 F.01
    N430 Z-.5442 M8
    N440 G1 Z-.6442 F17.4
    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609
    N460 G3 X-.9758 Y1.7864 Z-.5481 I-.055 J.0
    N470 G3 X-1.0308 Y1.7864 Z-.5288 I-.0275 J.0
    N490 G1 Z-.6442 F17.4
    N500 G3 X-.9523 Y1.7864 Z-.625 I.0392 J.0 F5.3882
    N510 G3 X-.9523 Y1.7864 Z-.5481 I-.0785 J.0
    N520 G3 X-1.0308 Y1.7864 Z-.5288 I-.0393 J.0
    N530 G0 Z1.0
    N540 M99

  18. #15
    Join Date
    Jan 2014
    Location
    Temecula, Ca
    Posts
    2,749
    Post Thanks / Like
    Likes (Given)
    1246
    Likes (Received)
    3568

    Default

    It looks like your lead in line is going the wrong direction. I think that was already pointed out to you.

  19. #16
    Join Date
    Jan 2017
    Country
    UNITED STATES
    State/Province
    Oregon
    Posts
    2,460
    Post Thanks / Like
    Likes (Given)
    442
    Likes (Received)
    1747

    Default

    ^^^ that's how I see it. The endpoint of X-1.308 on the G41 line should be X-1.0308.

    Assuming X-1.0308 is the center of the hole, .020" would be plenty to pickup the offset. So N390 should position closer to X-1.0508, so the Z move doesn't wipe out one side of the hole...

  20. Likes Booze Daily liked this post
  21. #17
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    3,655
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1438

    Default

    Quote Originally Posted by jancollc View Post
    ^^^ that's how I see it. The endpoint of X-1.308 on the G41 line should be X-1.0308.

    Assuming X-1.0308 is the center of the hole, .020" would be plenty to pickup the offset. So N390 should position closer to X-1.0508, so the Z move doesn't wipe out one side of the hole...
    Hello jancollc
    The X-1.308 would have be a Typo; wouldn't it? The program would be attempting to circular Interpolate with the following Block from a Start Point of X-1.308 Y1.7864 and that's never going to fly.

    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609

    Also, in both of alphonso's example code listings, there are two or more non XY moves in Cutter Comp Mode and that's not a good thing. The error he is getting, ps034, relates to Cutter Radius Comp Mode being Started, or Canceled using a Circular Interpolation Move. Clearly his program is showing Comp Mode being initiated with a G01 Block:

    G01 G41 D108 X-1.308 Y1.7864 F.01

    but N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609 is the first XY move Block after two, or more non XY moves in Cutter Radius Comp Mode; that may have something to do with this particular error being raised.

    Regards,

    Bill

  22. #18
    Join Date
    Jan 2017
    Country
    UNITED STATES
    State/Province
    Oregon
    Posts
    2,460
    Post Thanks / Like
    Likes (Given)
    442
    Likes (Received)
    1747

    Default

    Quote Originally Posted by angelw View Post
    ...but N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609 is the first XY move Block after two, or more non XY moves in Cutter Radius Comp Mode; that may have something to do with this particular error being raised.
    Hi Bill. This is something I also thought of, but was not sure as to the "legality" of it. I don't know of any reason you cannot call up the CC with an XY move and then make Z moves.

    I just don't write programs like the OP. I always position my Z before engaging CC. And I hate turning on cutter comp above the part.

    Truth is, I don't really grok the G3 lead-in and lead-out numbers. How do you G3 from X-1.0308 Y1.7864 to X-.9758 Y1.7864 with a J0 and I.0275? Doesn't seem like a rational lead-in to me. If it even runs, it would just trace a "hump", and you don't know if the apex is above or below centerline. To make an actual arc lead-in where the endpoint is tangent to the major, you would have to start somewhere below Y1.7864, and use a positive J value in that first G3 line, no?

    The Z change suggests a 90 degree lead in arc. So maybe something Like this (assuming adequate clearance in the entry hole dia.):

    N390 G0 G90 X-1.0308 Y1.7489 S4365 M3

    ...

    N440 G1 Z-.6442 F17.4
    N442 G41 D108 X-1.0033 Y1.7589
    N450 G3 X-.9758 Y1.7864 Z-.625 I0 J.0275 F4.1609

    Then do the same thing on exit...

    edit: strike that- my brain wasn't working when I typed that. I had an X move of .0275 in my head, not .055. That makes the first G3 a 180 degree ccw arc, so it's fine. Should be just a matter of fixing the G41 line as posted prev.

    Could the double Z move followed by the G3 be raising the alarm because it can't look far enough ahead to calculate the correct tangent point of the cutter for the G3 move?
    Last edited by jancollc; 09-06-2019 at 02:35 AM.

  23. #19
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    3,655
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1438

    Default

    Quote Originally Posted by jancollc View Post
    Hi Bill. This is something I also thought of, but was not sure as to the "legality" of it. I don't know of any reason you cannot call up the CC with an XY move and then make Z moves.
    Hello jancollc,

    Two or more non move Block Commands (Dwell, M Functions, etc.), or moves not related to the Tool Radius Compensation axes executed in Offset Mode is not illegal per se, but will result in either an excessive cut or insufficient cut, but no alarm.

    Based on the program code listed by alphonso, an 034 error is rather unusual, as the definition of error 034 doesn't specifically relate to the code. I can only assume that the first motion in the Tool Radius Compensation axes being a Circular Interpolation move is causing the issue. It would be interesting if alphonso could fix the X-1.308 as shown in Red below and run the program above the work with the two Z move Blocks deleted. This would prove if the two moves not related to the Tool Radius Comp axes, followed by a Circular Interpolation move is causing the error.

    Regards,

    Bill

    :0456 (SUB FOR 04550)
    G01 G41 D108 X-1.0308 Y1.7864 F.01
    N450 G3 X-.9758 Y1.7864 Z-.625 I.0275 J.0 F4.1609
    N460 G3 X-.9758 Y1.7864 Z-.5481 I-.055 J.0
    N470 G3 X-1.0308 Y1.7864 Z-.5288 I-.0275 J.0
    N490 G1 Z-.6442 F17.4
    N500 G3 X-.9523 Y1.7864 Z-.625 I.0392 J.0 F5.3882
    N510 G3 X-.9523 Y1.7864 Z-.5481 I-.0785 J.0
    N520 G3 X-1.0308 Y1.7864 Z-.5288 I-.0393 J.0
    N530 G0 Z1.0
    N540 M99

  24. #20
    Join Date
    Feb 2006
    Location
    Republic of Texas
    Posts
    2,452
    Post Thanks / Like

    Default

    Y'all caught the typo in my post. The typo was not in the program on the machine. Will test suggestions after I get back from vacation.


Tags for this Thread

Bookmarks

Posting Permissions

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