Page 1 of 2 12 LastLast
Results 1 to 20 of 22
  1. #1
    SRT Mike is offline Hot Rolled
    Join Date
    Feb 2007
    Location
    Boston MA
    Posts
    755

    Default Problem with G2 arcs on Okuma w/OSP5000

    I have a part that was drawn in CAD using splines. I usually manually program the lathe, but in this case I asked machine shop next door if I could use their MasterCAM computer to do the G-Code so it would easily calculate the numerous points for the curves. Using line segments, it's hundreds of lines... using arcs, it's just a few lines. So I would very much like to use arcs, but I can't get it to work.

    Here are the pieces of code giving me trouble:

    G0 X-.0581 Z.1 M8
    G1 Z-.0001 F.01
    G3
    X.2063 Z-.0659 I-.0113 K-.1882
    X.4118 Z-.2626 I-.3746 K-.321
    X.485 Z-.531 I-.9267 K-.263
    G1 Z-1.2813



    G0 X.485 Z-.5 M8
    G1 Z-1.2966 F.01
    G3
    X.4853 Z-1.3179 I-1.6749 K-.0213
    X.3592 Z-1.7732 I-1.6751
    G2
    X.2263 Z-2.0382 I.8545 K-.355
    X.3549 Z-2.3975 I.7712 K-.0474
    X.4513 Z-2.5056 I2.2617 K.9436
    G0 X.564




    I highlighted the line it's failing on above. Now, the post the other shop uses outputs R parameters with the arcs, my Okuma uses I and K. I first used NCPlot to convert the R's to I and K, didn't work. Then I tried another post for Fanuc that did output I and K and that didn't work either. I noticed the values MasterCAM output was the same as the numbers NCPlot gave me when converting from R's to I's and K's.

    Anyone have any ideas why this is failing on my Okuma w/the OSP5000? I don't have the error in front of me but it's the parameters of the G3 it doesn't like.

  2. #2
    huskermcdoogle is offline Stainless
    Join Date
    Nov 2005
    Location
    South Texas
    Posts
    1,274

    Default

    Are you in G18?

  3. #3
    litlerob's Avatar
    litlerob is offline Hot Rolled
    Join Date
    Jun 2009
    Location
    PDX, OR
    Posts
    547

    Default

    Quote Originally Posted by huskermcdoogle View Post
    Are you in G18?
    Hah G18 is for Funsuc, Okuma would never stoop that low

    The only thing I see is that the G2/G3 is on a different line than the endpoints, it shouldn't matter, but it seems weird to me. If you post R values you can change them to L and Okuma will accept that.

    Robert

  4. #4
    SRT Mike is offline Hot Rolled
    Join Date
    Feb 2007
    Location
    Boston MA
    Posts
    755

    Default

    Thanks for the responses.

    I think I have it figured out... the Okuma has a tolerance and so does MasterCAM... when I tightened up the tolerance figure, the control accepted the numbers no problem.

    Weird.. but it's working

  5. #5
    angelw is offline Stainless
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    1,601

    Default

    Quote Originally Posted by SRT Mike View Post
    Thanks for the responses.

    I think I have it figured out... the Okuma has a tolerance and so does MasterCAM... when I tightened up the tolerance figure, the control accepted the numbers no problem.

    Weird.. but it's working
    Not so weird when I and K are used. I and K describe the center location of the arc relative to the start point. The control uses this data to calculate if the programmed end point exists on the arc trajectory based on the start point and the arc center and will generate an alarm if its off by more than a tolerance set in parameters.

    R or L used with circular interpolation is dealt with quite differently. The control uses the Start Point, End Point and Radius passed by the CNC program to calculate the arc center. Accordingly, if the Start, End, or both Start and End Points are incorrect, within reason of course, the control still calculates a center point for the arc based on the information passed to it, and generates the circular interpolation trajectory. The control simply shifts the center point to allow the arc of R or L radius to pass through the two points. From this you can see that using R or L with circular interpolation can lead to an erroneous profile without it being obvious. Accordingly, I prefer to use I, J and K for circular interpolation moves.

    Another point, but not so applicable to a turning center, is that a complete circle can't be programed in one block using R or L.

    Regards,

    Bill

  6. #6
    litlerob's Avatar
    litlerob is offline Hot Rolled
    Join Date
    Jun 2009
    Location
    PDX, OR
    Posts
    547

    Default

    Bill is correct about the I,J and K arc commands, but I like the R/L definitions because it's faster. I am glad that we see a resolution to this. Good info in this thread.

    The linear and arc tolerances in M.C. are easily controlled through the control definition file. Thanks Bill

  7. #7
    angelw is offline Stainless
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    1,601

    Default

    Quote Originally Posted by litlerob View Post
    but I like the R/L definitions because it's faster.
    Hi Rob,
    Following is a direct quote from a late model Fanuc control manual dealing with using R to specify the Radius in circular interpolation.

    "When an arc having a center angle approaching 180 is specified, the
    calculated center coordinates may contain an error. In such a case, specify
    the center of the arc with I, J, and K."


    I'm not quite sure why the above is, and I assume it may be the same with Okuma. However, following is the math I use in a CAM routine for creating an arc or circle based on two existing points and a given radius. This routine seem to be accurate in all tests I've done.

    1. If the two points and radius support an arc with centre angle of 180, then only Steps 1 and 2 are used.

    2. Any two viable points and radius, except when the centre angle is 180, will support two circles with different centres. The centre point used is defined by a modifier, or in the case of NC code, the direction (G02, G03) and whether the centre angle is more or less than 180. Hence the two solutions for X and Y in Step 3.

    Regard,

    Bill

    'Step 1
    'Get distance between 1st and 2nd points
    q = Sqr((X2 - X1) ^ 2 + (Y2 - Y1) ^ 2)

    'Step 2
    'Find mid point of q (X3,Y3)
    X3 = (X1 + X2) / 2
    Y3 = (Y1 + Y2) / 2

    'Step 3
    'Find centre point of circle
    X = X3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
    Y = Y3 + Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q

    X = X3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (Y1 - Y2) / q
    Y = Y3 - Sqr(r ^ 2 - (q / 2) ^ 2) * (X2 - X1) / q

  8. #8
    Chip Turner's Avatar
    Chip Turner is offline Plastic
    Join Date
    Sep 2011
    Location
    ohio
    Posts
    41

    Default

    Okumas use "L" instead of "R". try using the first post that you tried with "R" and change them to "L". I never use I, J, & K on my okuma lathes always L. It's much easier and more forgiving.

  9. #9
    angelw is offline Stainless
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    1,601

    Default

    Quote Originally Posted by Chip Turner View Post
    I never use I, J, & K on my okuma lathes always L. It's much easier and more forgiving.
    I just don’t see that using R or L is much, if any easier than using I, J and K in circular interpolation. If the program is being generated by a CAM system, then no difference whatsoever in terms of difficulty. If the coordinates are being calculated manually, and given that the majority of work drawings have arc detail dimensioned as a radius with a centre, the Start and End coordinates of the arc have to be calculated whether the intention is to use R/L or I, J and K format in the program. Frequently, if not on all occasions, when calculating the Start and End points, I, J, and K values are by products of the calculations. Accordingly, I see no great saving using R or L format.

    But why I mainly avoid using R and L with circular interpolation is for the very reason, that it is forgiving. It has the potential of forgiving for mistakes being made in the calculation of the arc Start and End points, because the control uses the data passed to it via the CNC program and just shifts the arc centre to make the arc fit. In many cases, this may not be of any great concern, but if the profile really had to be correct, as stated in an earlier post, using R or L has the potential of machining an erroneous profile without it being obvious.

    Regards,

    Bill

  10. #10
    litlerob's Avatar
    litlerob is offline Hot Rolled
    Join Date
    Jun 2009
    Location
    PDX, OR
    Posts
    547

    Default

    I don't want to be an antagonist, and I am obviously not as good at adding and subtracting as Bill, but Bill you said with R commands there is forgiveness, how is that possible when generated by CAD? It is a setting, it doesn't change the geometry. I understand that as an operator I can "fudge" the R value at the control (and do) but the code posted from MasterCam is going to be just as accurate, wether it be R/L or I,J and K.

    I was simply making a suggestion to get the OP's machine up and running.

    Robert

  11. #11
    angelw is offline Stainless
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    1,601

    Default

    Quote Originally Posted by litlerob View Post
    I don't want to be an antagonist, and I am obviously not as good at adding and subtracting as Bill, but Bill you said with R commands there is forgiveness, how is that possible when generated by CAD? It is a setting, it doesn't change the geometry. I understand that as an operator I can "fudge" the R value at the control (and do) but the code posted from MasterCam is going to be just as accurate, wether it be R/L or I,J and K.

    I was simply making a suggestion to get the OP's machine up and running.

    Robert
    Hi Robert,
    I don't see you as being antagonistic, and similarly, my comments are for the sake of discussion.

    You've answered your own question in your reply, and given weight to my point of view with your following comment.

    I understand that as an operator I can "fudge" the R value at the control (and do) but the code posted from MasterCam is going to be just as accurate, wether it be R/L or I,J and K.

    I should have qualified my comments, with regards to the forgiveness, I was referring more to calculations done manually and not via a CAD or CAM system. The inaccuracy doesn't come from the CAM system, but from how the CNC control deals with R and L formatted circular interpolation.

    You may note from my penultimate Post that if a CAM system is used to generate the code, I implied that there is no advantage whatsoever gained by using R or L format over I, J and K. As far as the CAM operator is concerned, its no quicker, the CAM system will do the calculations via the Post Processor for both with similar speed, and its not easier, their are no additional steps required by the CAM operator for the code to be processed either way. So, if there is no difference form a CAM point of view, and you have comments from the control builders, Fanuc at least, such as:

    "When an arc having a center angle approaching 180 is specified, the
    calculated center coordinates may contain an error. In such a case, specify
    the center of the arc with I, J, and K."


    Why would one want to use what seems to be an inferior system?

    I think it fair to say that R and L format may be used more by those calculating coordinates used in the NC program, manually. The forgiveness comes from the control, when using R and L format. If either, or both the Start and End points have been calculated incorrectly, and don't exist on the geometrically correct arc as requested by the part drawing, the control simply shifts the arc centre to make it fit. In this case, the control will take the incorrect points passed to it via the NC program, and using an algorithm similar to mine, calculates an arc centre that allows the arc of given radius to pass through the points specified in the program. Result? An inaccurate profile without the operator being aware.

    Regards,

    Bill

  12. #12
    litlerob's Avatar
    litlerob is offline Hot Rolled
    Join Date
    Jun 2009
    Location
    PDX, OR
    Posts
    547

    Default

    Bill,
    Penultimate? We're simple machinists

    As the CAD operator you are right there is no advantage, like I said "it's just a setting". In fact there is an advantage to the machine operator, because adjustments can be made on the floor, without needing to go to the CAM operator to change the original CAD geometry to manipulate, re-post, re-send and re-proof a program. Using R values gives the machine operator to change it at the control, huge time advantage.

    Again, just making a suggestion to get this guys machine up and making chips, but as a resolved issue.........Robert

  13. #13
    angelw is offline Stainless
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    1,601

    Default

    Quote Originally Posted by litlerob View Post
    Bill,
    Penultimate? We're simple machinists

    As the CAD operator you are right there is no advantage, like I said "it's just a setting". In fact there is an advantage to the machine operator, because adjustments can be made on the floor, without needing to go to the CAM operator to change the original CAD geometry to manipulate, re-post, re-send and re-proof a program. Using R values gives the machine operator to change it at the control, huge time advantage.

    Again, just making a suggestion to get this guys machine up and making chips, but as a resolved issue.........Robert
    Hi Robert,
    I understand your point, and I did suggest in an earlier post, that in many cases the accuracy of the arc is not important; it may be simply a blend radius. However, if the OP's profile shape is important, and the error was due to incorrect calculated arc end points and significant, then using R or L format is only going to mask the error, and result in an incorrect profile.

    If you wanted to split hairs, you would have to say that the coordinates calculated by the CAM system in the OP's example were wrong; albeit through rounding and being outside the tolerance set in parameters of the control. By tightening up the system tolerance of MC resolved the issue. What I'm saying is that the R or L format won't pick up errors in calculations, even significant errors. It just shifts the centre to make the arc fit. Further, even with accurate, correct numbers, according to Fanuc, if the centre angle is close to 180, the calculations made by the control may be erroneous.


    Regards,

    Bill

  14. #14
    HuFlungDung is online now Diamond
    Join Date
    Jan 2005
    Location
    Canada
    Posts
    6,552

    Default

    I think I would tend to blame the problem on bad trim of the original geometry. The output from CAM should be blameless at comparatively low precision like 4 decimal places, because the CAM is probably working at a higher precision than that.

    The original move to Z-0.0001 is suspicious as it is unlikely that that is the true intended start point.

    Strange thing: when I backplotted that code sample, and then toolpathed it again, I did not get an exact match to the original code. I suspect my CAM is smoothing over the bad intersections for me.

  15. #15
    angelw is offline Stainless
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    1,601

    Default

    Quote Originally Posted by HuFlungDung View Post
    I think I would tend to blame the problem on bad trim of the original geometry. The output from CAM should be blameless at comparatively low precision like 4 decimal places, because the CAM is probably working at a higher precision than that.

    The original move to Z-0.0001 is suspicious as it is unlikely that that is the true intended start point.

    Strange thing: when I backplotted that code sample, and then toolpathed it again, I did not get an exact match to the original code. I suspect my CAM is smoothing over the bad intersections for me.
    Hu,
    Yes, I agree. However, the output file still must have been outside the error checking tolerance for arcs set in the control's parameters, before the OP tightened up the MC tolerances. Its not unusual to be able to change the level of precision at which a CAD or CAM system works. My own package can be set on the fly to virtually any tolerance; useful particularly when reading in an NC file to create geometry. In that case you're starting with a precision of 0.0001 (imperial NC input file) at best.

    Regards,

    Bill

  16. #16
    JenniferF is offline Plastic
    Join Date
    Oct 2011
    Location
    Iowa, USA
    Posts
    17

    Default

    I have this trouble everytime we buy a new machine. I have to go in and change the error tolerance in the parameters.

  17. #17
    Gackman is offline Aluminum
    Join Date
    Apr 2007
    Location
    Wisconsin
    Posts
    128

    Default

    Quote Originally Posted by angelw View Post
    Not so weird when I and K are used. I and K describe the center location of the arc relative to the start point. The control uses this data to calculate if the programmed end point exists on the arc trajectory based on the start point and the arc center and will generate an alarm if its off by more than a tolerance set in parameters.

    R or L used with circular interpolation is dealt with quite differently. The control uses the Start Point, End Point and Radius passed by the CNC program to calculate the arc center. Accordingly, if the Start, End, or both Start and End Points are incorrect, within reason of course, the control still calculates a center point for the arc based on the information passed to it, and generates the circular interpolation trajectory. The control simply shifts the center point to allow the arc of R or L radius to pass through the two points. From this you can see that using R or L with circular interpolation can lead to an erroneous profile without it being obvious. Accordingly, I prefer to use I, J and K for circular interpolation moves.

    Another point, but not so applicable to a turning center, is that a complete circle can't be programed in one block using R or L.

    Regards,

    Bill

    Bill,

    I totally agree with you on the I J K output thing here. We can all argue on what's easiest, better, best, etc..... but when you scrap a part (or come close to scraping a very expensive part) no one here can argue with what you are saying. Only because we deal with producing quality, I never use R or L or any "quick" code for arcs, especially on mills. Years ago, I had a seasoned CNC machinist talk to me about this and I thought he was blowing smoke until I seen it for myself when I was trying to pocket an oil pump cavity that was rotated by 3 degrees. Machine made the pocket ok with the R outputs with no rotation but when I had to rotate 3 degrees and re-posted for cleanup and fixturing purposes, the cutter made some weird moves and I would of wrecked the part had I not been dry running it above the part. I mean it was so far off you could see gross error. Posted in I J output it was perfect. Since then, I've defaulted my post to output I J K for my machines from that day on and I thank you for bringing this to our attention.

  18. #18
    706jim is offline Stainless
    Join Date
    Jun 2006
    Location
    Thunder Bay Canada
    Posts
    1,248

    Default

    Quote Originally Posted by Gackman View Post
    Bill,

    I totally agree with you on the I J K output thing here. We can all argue on what's easiest, better, best, etc..... but when you scrap a part (or come close to scraping a very expensive part) no one here can argue with what you are saying. Only because we deal with producing quality, I never use R or L or any "quick" code for arcs, especially on mills. Years ago, I had a seasoned CNC machinist talk to me about this and I thought he was blowing smoke until I seen it for myself when I was trying to pocket an oil pump cavity that was rotated by 3 degrees. Machine made the pocket ok with the R outputs with no rotation but when I had to rotate 3 degrees and re-posted for cleanup and fixturing purposes, the cutter made some weird moves and I would of wrecked the part had I not been dry running it above the part. I mean it was so far off you could see gross error. Posted in I J output it was perfect. Since then, I've defaulted my post to output I J K for my machines from that day on and I thank you for bringing this to our attention.
    I agree with your observations here. Radius programming seems so much easier than ijk, but as pointed out, can create errors. I've had parts ruined because of the control fitting an arc that would have certainly not happened with ijk coordinates.

    I mention this here because I teach programming and sometimes have to justify doing arcs this "harder" way.

    Also, the output from our cam system is ijk and it is nice to be able to read this format, even if R output were available.

  19. #19
    angelw is offline Stainless
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    1,601

    Default

    Quote Originally Posted by 706jim View Post
    I agree with your observations here. Radius programming seems so much easier than ijk, but as pointed out, can create errors. I've had parts ruined because of the control fitting an arc that would have certainly not happened with ijk coordinates.

    I mention this here because I teach programming and sometimes have to justify doing arcs this "harder" way.

    Also, the output from our cam system is ijk and it is nice to be able to read this format, even if R output were available.
    I mention this here because I teach programming and sometimes have to justify doing arcs this "harder" way.

    Apart from the accuracy reasons, you can further justify the use of I,J and K format by explaining that its no easier to create a CNC program using R, if creating the program manually and a typical parts drawing is used as the detail source. The amount and degree of difficulty of math used to obtain the arc Start and End points is the same in both cases, and the I, J or K values have to be found during the process of calculating the arc Start point.

    Regards,

    Bill

  20. #20
    litlerob's Avatar
    litlerob is offline Hot Rolled
    Join Date
    Jun 2009
    Location
    PDX, OR
    Posts
    547

    Default

    I will guess here, that Bill you don't actually make chips.

    I understand that I as a machine operator, I am going to get an alarm when the IJK are not totally accurate. That is not the point.

    That is why I incorporate R values when I need to. It really is just a prefrence when it comes from a Cam program anyway. You can change it, but what is more efficient for the operator?

    Programmers/Teachers/Owners and Engineers, typically believe that a machine will repeat permanantly, and if it doesn't it at fault.

    I believe that a machinist needs to make stuff, and make it fast.

    Robert

Page 1 of 2 12 LastLast

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
  •