Changing from inches in main program to mm in subprogram
Close
Login to Your Account
Results 1 to 16 of 16
  1. #1
    Join Date
    Oct 2017
    Country
    UNITED STATES
    State/Province
    Missouri
    Posts
    69
    Post Thanks / Like
    Likes (Given)
    10
    Likes (Received)
    4

    Default Changing from inches in main program to mm in subprogram

    I have a couple of nice Kennametal threadmill tools with replaceable inserts that the last engineer had ordered but I guess never got around to installing them. They're the style that come as a certain pitch but then I can threadmill whatever diameter I need. I contacted my Kennametal rep and he sent me the software to write the programs, however, the program outputs the units in millimeters.

    I'm not a CNC programming whiz but in order to substitute our current production program's tap code to use this threadmill, I figure I use Kennametal's autogenerated program to become a subprogram whenever the time comes to tap. Since our production programs are in inches, can I G21 at the beginning of the subprogram and then G20 at the end before M99? I've never used those G codes before and am not 100% certain if that's the correct way to do this.

    Thanks.

  2. #2
    Join Date
    Aug 2002
    Location
    West Unity, Ohio
    Posts
    24,928
    Post Thanks / Like
    Likes (Given)
    5166
    Likes (Received)
    7707

    Default

    I've never done this, but I think that on some controls you can get into trouble as the offsets may not update with the change.

    If you try it - make sure to make a first pass try above the part to see how it goes.


    -------------------

    Think Snow Eh!
    Ox

  3. #3
    Join Date
    May 2004
    Country
    UNITED STATES
    State/Province
    California
    Posts
    2,497
    Post Thanks / Like
    Likes (Given)
    885
    Likes (Received)
    1622

    Default

    Why not just ask Kennametal for the inch version?

    No CAM on the premises?

  4. #4
    Join Date
    Nov 2014
    Country
    UNITED STATES
    State/Province
    Florida
    Posts
    3,338
    Post Thanks / Like
    Likes (Given)
    1462
    Likes (Received)
    1581

    Default

    Quote Originally Posted by Ox View Post
    I've never done this, but I think that on some controls you can get into trouble as the offsets may not update with the change.

    If you try it - make sure to make a first pass try above the part to see how it goes.


    -------------------

    Think Snow Eh!
    Ox

    On our Haas NGC it wouldn't work. If I put a G21 anywhere I get an error message something to the effect of "machine not in metric mode". I guess the machine is somewhat smart enough to recognize a difference between a 3.123MM offset and 3.123INCH offset..? Or maybe it is just checking a param like H&T code agreement on/off?

  5. #5
    Join Date
    Jan 2015
    Country
    UNITED STATES
    State/Province
    California
    Posts
    680
    Post Thanks / Like
    Likes (Given)
    102
    Likes (Received)
    353

    Default

    Some NC text editors can convert units. Post your program here. I can do it on editNC

  6. Likes mhajicek liked this post
  7. #6
    Join Date
    Oct 2017
    Country
    UNITED STATES
    State/Province
    Missouri
    Posts
    69
    Post Thanks / Like
    Likes (Given)
    10
    Likes (Received)
    4

    Default

    Quote Originally Posted by [email protected] View Post
    Why not just ask Kennametal for the inch version?

    No CAM on the premises?
    It's all there is. You can select all types of threads: standard, British, NPT, BSPT, etc. but all the depths and output is metric for some reason and there isn't a way to change it.

    We have a stupid simple 2.5 CAM. We mostly poke holes and face. I can't do threadmill with my CAM software.

    Quote Originally Posted by thesidetalker View Post
    Some NC text editors can convert units. Post your program here. I can do it on editNC
    Appreciate it. Let me see what I can do since I have a bunch of different sizes to program. Honestly, it's not that bad. I could sit down and replace the metric units to inches with Excel. That would probably be the next best bet.

    Controller is Fanuc 31 BTW.

    Thanks for the feedback. Just need to get the brain juices flowing for ideas.

  8. #7
    Join Date
    May 2017
    Country
    UNITED STATES
    State/Province
    Minnesota
    Posts
    838
    Post Thanks / Like
    Likes (Given)
    932
    Likes (Received)
    494

    Default

    Download a free trial of NCPlot, that'll do it easy.

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

    Default

    Quote Originally Posted by rbmgf7 View Post
    It's all there is. You can select all types of threads: standard, British, NPT, BSPT, etc. but all the depths and output is metric for some reason and there isn't a way to change it.

    We have a stupid simple 2.5 CAM. We mostly poke holes and face. I can't do threadmill with my CAM software.



    Appreciate it. Let me see what I can do since I have a bunch of different sizes to program. Honestly, it's not that bad. I could sit down and replace the metric units to inches with Excel. That would probably be the next best bet.

    Controller is Fanuc 31 BTW.

    Thanks for the feedback. Just need to get the brain juices flowing for ideas.
    Excel is an excellent idea for your application! No need to send your code anywhere and wait on a 'return', just build the Excel file and have it always at your fingertips.

  10. #9
    Join Date
    Aug 2002
    Location
    West Unity, Ohio
    Posts
    24,928
    Post Thanks / Like
    Likes (Given)
    5166
    Likes (Received)
    7707

    Default






    ---------------------------

    Think Snow Eh!
    Ox

  11. #10
    Join Date
    Jan 2014
    Country
    UNITED STATES
    State/Province
    Washington
    Posts
    4,281
    Post Thanks / Like
    Likes (Given)
    786
    Likes (Received)
    2305

    Default

    Won't work easily on a Mitsu control either. They specifically note that you must switch macro variables (some system variables and any user variables used in the unit switched code), and offsets (tool and fixture) to the unit of choice before commanding a unit change G code. After the unit change G code is set then the feed command must be restated in the new units too.

    Too much a PITA in my mind and a HUGE crash potential. Far better to crunch the numbers through the unit conversion tool that a good CNC editor program will have.

  12. #11
    Join Date
    Feb 2012
    Country
    CANADA
    State/Province
    Ontario
    Posts
    1,120
    Post Thanks / Like
    Likes (Given)
    88
    Likes (Received)
    431

    Default

    Quote Originally Posted by Mike1974 View Post
    Excel is an excellent idea for your application! No need to send your code anywhere and wait on a 'return', just build the Excel file and have it always at your fingertips.
    ZOMG for a second there!

  13. #12
    Join Date
    Oct 2012
    Location
    Orange county, CA
    Posts
    79
    Post Thanks / Like
    Likes (Given)
    3
    Likes (Received)
    18

    Default

    i knew a fanuc control once that when you'd switch between g20 and g21 it would convert all the tool offsets, but it would only shift the decimal on the work offset.

  14. #13
    Join Date
    Sep 2010
    Location
    Victoria Australia
    Posts
    3,638
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1426

    Default

    Quote Originally Posted by rbmgf7 View Post
    Since our production programs are in inches, can I G21 at the beginning of the subprogram and then G20 at the end before M99? I've never used those G codes before and am not 100% certain if that's the correct way to do this.
    Hello rbmgf7,
    What you're suggesting is 100% not possible. Either of these G codes must be specified before setting the coordinate system at the beginning of the program. Further, Fanuc actually offer a Warning in their Manuals stating that G20 and G21 must not be switched during a program.

    Regards,

    Bill

  15. #14
    Join Date
    Jan 2007
    Country
    UNITED STATES
    State/Province
    New Jersey
    Posts
    914
    Post Thanks / Like
    Likes (Given)
    428
    Likes (Received)
    429

    Default

    It's really hard to believe that Kennametal wrote this software and did not add the capability to do either Inch or Metric. Are you positive there is no switch somewhere to back and forth?

    Paul

  16. #15
    Join Date
    Oct 2017
    Country
    UNITED STATES
    State/Province
    Missouri
    Posts
    69
    Post Thanks / Like
    Likes (Given)
    10
    Likes (Received)
    4

    Default

    Totally lied. There is a small button on the main screen that opens the settings menu. Wasn't highlighting when I hovered over it like the other buttons.

  17. Likes [email protected] liked this post
  18. #16
    Join Date
    May 2004
    Country
    UNITED STATES
    State/Province
    California
    Posts
    2,497
    Post Thanks / Like
    Likes (Given)
    885
    Likes (Received)
    1622

    Default

    Quote Originally Posted by rbmgf7 View Post
    Totally lied. There is a small button on the main screen that opens the settings menu. Wasn't highlighting when I hovered over it like the other buttons.
    Obviously Kennametal is racist against inches.

    I'm glad it was an easy fix for you.


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
  •