How To Write Cnc Lathe Programs

CNC Time Estimating for the above: Tool change time depends on the machine and the time for setup depends on your own skill. The basic method for figuring the time for cutting is to figure RPM, then the rate of feed per minute. Take the total distance cut in G1 and divide that by the rate of feed. CNC Lathe Programming for Turning CNCCookbook’s G-Code Tutorial CNC Lathe Axes. CNC Lathes come in a variety of configurations, but for the basics, we’ll stick to the simplest and most common setup–2 axes.

  • Forum Actions
  • Quick Links
  • Thread Tools
  • Display
  1. Stainless
    Join Date
    Mar 2003
    Country
    UNITED STATES
    State/Province
    Utah
    Posts
    1,058
    Post Thanks / Like
    Likes (Given)
    51
    Likes (Received)
    15

    How long would it take to learn CNC swiss

    Hi guys
    I'm looking for a better job and always liked CNC Swiss machines. I know of a local shop that's looking, but have never setup a Swiss lathe before.
    I have about six years of experience doing 2 axis CNC lathe and 3 axis CNC mill. I have setup Brown & Sharpe (Ultra and G) and New Britain (model 52) screw machines and have a pretty well rounded background in simple screw machine work.
    I don't have any time with CAD/CAM software. All the CNC lathe programming I've done is simple 2 axis stuff, g-coded by hand (accurately.) All the CNC mill work has been on a Hurco, so I haven't HAD to learn a CAD package yet.
    Here is a picture of some CNC work completed recently. Sorry for the large size.
    The 'wedding band' ring I made is in the bottom right for scale approximation. That ring is MP35N. A real jewel. :>
    Anyway, how long do you think it would take to become a productive CNC swiss setup guy, setting up jobs with sub-spindle and live tools and such?
  2. Stainless
    Join Date
    Dec 2006
    Location
    Central Ky
    Posts
    1,091
    Post Thanks / Like
    Likes (Given)
    59
    Likes (Received)
    95
    I doubt it would take you very long, but I would get some time in front of a cad program, being able to draw geometry and get needed points quickly comes in handy.
    Programming cnc swiss is something you have to 'get in your head, and get your head into it'. I dont know if that makes sense, but in my experience it is like this: I can step away from the 2 axis lathe for a couple months, and walk right back up to it and go to work. Same with the mill. But the swiss was always different for me. Stop thinking about it for a couple weeks, and have to scratch my head a minute or two when I got back in front of it. there are alot of things to keep up with as compared to 2 axis lathe or 3 axis mill, not just 'the what to do' but the 'when to do it'.
    I ran one with 2 heads, waiting m-codes, live tools, and either wrote it all by hand or wrote a spreadsheet and let it write the code (for part families). Ran it for years, even trained other people on it. been away from it for abot 4 years, I bet I couldnt home it today if I tried.
    And, nice lookin parts!
  3. Aluminum
    Join Date
    Dec 2007
    Location
    sinking spring Pa.
    Posts
    199
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1
    I agree with Spock you have to be able to see it in your head before you start setting up. You seem like you have a good background for it with the brownies. CNC just makes it easier to make changes. I was out of cams for about 8yrs and went back for some part time--Like riding a bike you don't forget how to.
    TR
  4. Aluminum
    Join Date
    Apr 2003
    Location
    Massachusetts
    Posts
    70
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    0
    I teach CNC Swiss to new people all the time and the time you will need varies. You have enough other expierence that you should be able to get the 'concept' in a few days. Then spend some time watching parts run and how they are done. Setting tools properly is an important part of swiss. The thing I find people having the most trouble with is grasping how important the DETAILS are when setting up a process, just like the cams were. When I get them to take the time to clean everything, before installing anything, they finally start to have alot of sucess in getting the machines to run continiously as they are designed to.
    You should be able to be a top rated 'Setup' person within a couple of months but alot of that depends on how many setups you get under your belt to get the expierence.
    Getting the machine running is easy, getting it to run well without alot of attention should be the ultimate goal. Build the 'process' correctly and let the MACHINE do the work!
  5. Aluminum
    Join Date
    Jul 2006
    Location
    Mass
    Posts
    156
    Post Thanks / Like
    Likes (Given)
    27
    Likes (Received)
    5
    Hello all
    As I am someone that Cogsman helped teach I can vouch for his credibility and methods. I was taken from a 2 axis turning center set up person to a pretty good swiss set up person in about three weeks.Getting your head to grasp the concepts is definetly the hardest part with programming in positive on the z axis running a close second. I have over 350 setups under my belt on 3 different types of machines in about 2 years now and am cruising along quite nicely.Setting tools is also definetly a pita. As I run some jobs that require .014 end mills and .020 drills and have broken enough of them to attest to that fact. Good luck!
  6. Hot Rolled
    Join Date
    May 2006
    Location
    Illinois
    Posts
    964
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    26
    Originally Posted by Pitglc
    Hello all
    As I am someone that Cogsman helped teach I can vouch for his credibility and methods. I was taken from a 2 axis turning center set up person to a pretty good swiss set up person in about three weeks.Getting your head to grasp the concepts is definetly the hardest part with programming in positive on the z axis running a close second. I have over 350 setups under my belt on 3 different types of machines in about 2 years now and am cruising along quite nicely.Setting tools is also definetly a pita. As I run some jobs that require .014 end mills and .020 drills and have broken enough of them to attest to that fact. Good luck!
    Pit,
    For small delicate tools just set them in the live head and use a gage pin to touch them off. Lets, use a 0.1000' (minus) gage pin for example with 0.250' bar stock:
    1) Set the tool in the holder.
    2) Call up the tool station.
    3) Use the MPG (handwheel) to bring the tool within about 0.05' of the outside of the bar.
    4) Put the MPG in 0.001'
    5) Hold the pin against the end mill and up against the bar with light pressure.
    6) Jog in the X plus direction until the gage pin slides in between the bar and the end mill.
    7) Move two clicks in the minus direction.
    8) Switch to 0.0001'
    9) repeat steps 5 & 6.
    10) Set the geometry offset, don't forget to add 2x the gage pin thickness to the bar diameter. In this case X0.450' <measure>
    For a 0.014' end mill I would probably use a 0.05 pin or smaller but you get the idea. You'll never break another tool and once you get the hang of this your first part will be right on nominal.
  7. Stainless
    Join Date
    Mar 2003
    Country
    UNITED STATES
    State/Province
    Utah
    Posts
    1,058
    Post Thanks / Like
    Likes (Given)
    51
    Likes (Received)
    15
    I was always the guy programming everything manually on Fanuc controls. I never tried anything more complicated than 2 axis lathe work. However, I'm quite good with geometry using basic trig and circular segment calculations.
    Would any of you write a part program manually for CNC swiss parts?
    Is there a good CAM package that is capable of writing programs for such a complex machine with so many things going on at once?
    I'm very comfortable with straight up production jobs on a 2 axis Fanuc controlled CNC, something with 100 lines of code. I can write a good program in maybe two hours with 8-12 tools, something that runs good and makes nice parts.
    Compared to that, how complicated is CNC swiss part programming?
  8. Hot Rolled
    Join Date
    May 2006
    Location
    Illinois
    Posts
    964
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    26
    Originally Posted by apestate
    I was always the guy programming everything manually on Fanuc controls. I never tried anything more complicated than 2 axis lathe work. However, I'm quite good with geometry using basic trig and circular segment calculations.
    Would any of you write a part program manually for CNC swiss parts?
    Is there a good CAM package that is capable of writing programs for such a complex machine with so many things going on at once?
    I'm very comfortable with straight up production jobs on a 2 axis Fanuc controlled CNC, something with 100 lines of code. I can write a good program in maybe two hours with 8-12 tools, something that runs good and makes nice parts.
    Compared to that, how complicated is CNC swiss part programming?
    I've written a bunch of complex programs by hand. As others have said being able to visualize what operations yoou want to happen simultaneously is critical. Most Swiss are two path machines, meaning they run two programs. Usually the main side is just X,Y,Z, and C axis. The sub spindle side is just X and Z just like a two axis lathe. Really no different than writing the second op program for your existing two-axis lathe. Then the programs are synchonized with 'wait' codes which are matching M-codes put into both programs to make either program stop and wait for the other program to catch up to that point.
    That being said there are options for CAM systems.
    First off if you buy a new Tsugami the machine comes with proprietary CAM software that requires zero CAD knowledge. If you can read a drawing you can generate 1, 2, and 3, path programs easily. It also has 3D graphical prove out. Since the builder writes the software the 3D models of the machines are quite accurate. While this software is very easy to use, I can make a typical 10 tool program with milling and sub spindle ops in under 20 minutes, it doesn't support advanced CAM functions like trochoidal milling, etc.
    Second is PartMaker. It is very easy to use as well and can program most any Swiss. http://www.partmaker.com/ PartMakers graphics are much improved from years ago. Most of their posts need some tweeking to get the output to your liking and like most CAM systems it puts in extra useless code. Again this software gives you graphical proveout on your PC so you can feel confident before you ever load the program into the machine.
    Esprit is also a good choice and by far the most powerful software. Although it will take at least a year to learn it. http://www.dptechnology.com/en/index.asp We use Esprit for our 'B'-axis machines although Partmaker also has posts for them. Esprit is a more advanced milling program than Partmaker is. But that may change now that PartMaker was bought by Delcam and they are releasing a new version in time for IMTS.
    Esprit gives us the best support in the Midwest, while PartMaker has done a better job for East coast office.
    I wouldn't sweat the programming too much. It's a lot easier than you think it is. The more difficult things to learn are tooling and troubleshooting problems. Swiss machines behave a little differently than a lathe and you'll need to learn some new tricks. Make sure that whomever you buy the machine from has free phone support and good on-site and off-site training.
  9. Stainless
    Join Date
    Mar 2003
    Country
    UNITED STATES
    State/Province
    Utah
    Posts
    1,058
    Post Thanks / Like
    Likes (Given)
    51
    Likes (Received)
    15
    Heh
    Thanks for all the help and advice. It gives me some idea of what I'll be getting into, however, I won't be the one buying the machine.
    Not yet.
    I'm looking to get into a shop with Star CNC swiss machines. Only problem is, they do lots and lots of plastic.
  10. Cast Iron
    Join Date
    Jun 2008
    Location
    Tennessee
    Posts
    290
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    1

    Swiss Machine v/s VMC

    apestate,
    Are you looking at the Swiss Machines more for Auotomation?
    The 'U' shaped Bracket and 'Triangle Solid' parts look to be better suited for a samll foot print Brother TC-S2C type machining center.
  11. Stainless
    Join Date
    Jan 2007
    Location
    Ohio
    Posts
    1,153
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    2
    apestate,
    Nice lookin' parts, but there are many here that can show nice lookin' parts.
    Seems that you are intelligent enough to get the swiss stuff, but set up will be the most challenging...lots of clearance issues. I think you will get it no problem. Just don't try to fool the company into thinking you already know the swiss machines. They will know in 2 seconds! A good mahinist and programmer can learn just about any machine, IMHO.
    BTW, I spent a glorious week in Melborne 'bout 18 years ago with a horrible woman (my ex). There was a little restaurant in the old downtown area that served the best gumbo I've ever had before or since. The chef was from New Orelans. Indiatlantic Beach sucked for swimming or body surfing with the rocks so damn close...was beautiful though. Lotsa hotties!!
    Good luck!
  12. Bill Cain
    Plastic
    Join Date
    Jul 2006
    Location
    Fort Washington Pa
    Posts
    16
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    0
    Originally Posted by SwissPro
    I've written a bunch of complex programs by hand. As others have said being able to visualize what operations yoou want to happen simultaneously is critical. Most Swiss are two path machines, meaning they run two programs. Usually the main side is just X,Y,Z, and C axis. The sub spindle side is just X and Z just like a two axis lathe. Really no different than writing the second op program for your existing two-axis lathe. Then the programs are synchonized with 'wait' codes which are matching M-codes put into both programs to make either program stop and wait for the other program to catch up to that point.
    That being said there are options for CAM systems.
    First off if you buy a new Tsugami the machine comes with proprietary CAM software that requires zero CAD knowledge. If you can read a drawing you can generate 1, 2, and 3, path programs easily. It also has 3D graphical prove out. Since the builder writes the software the 3D models of the machines are quite accurate. While this software is very easy to use, I can make a typical 10 tool program with milling and sub spindle ops in under 20 minutes, it doesn't support advanced CAM functions like trochoidal milling, etc.
    Second is PartMaker. It is very easy to use as well and can program most any Swiss. http://www.partmaker.com/ PartMakers graphics are much improved from years ago. Most of their posts need some tweeking to get the output to your liking and like most CAM systems it puts in extra useless code. Again this software gives you graphical proveout on your PC so you can feel confident before you ever load the program into the machine.
    Esprit is also a good choice and by far the most powerful software. Although it will take at least a year to learn it. http://www.dptechnology.com/en/index.asp We use Esprit for our 'B'-axis machines although Partmaker also has posts for them. Esprit is a more advanced milling program than Partmaker is. But that may change now that PartMaker was bought by Delcam and they are releasing a new version in time for IMTS.
    Esprit gives us the best support in the Midwest, while PartMaker has done a better job for East coast office.
    I wouldn't sweat the programming too much. It's a lot easier than you think it is. The more difficult things to learn are tooling and troubleshooting problems. Swiss machines behave a little differently than a lathe and you'll need to learn some new tricks. Make sure that whomever you buy the machine from has free phone support and good on-site and off-site training.

    I also started out Programming my Swiss machines by hand. It's as Swiss Pro said, not too bad. Also, the learning curve from regular lathes to Swiss is not too bad. Be very careful and accurate when setting up. Take the time to learn the little things and all the adjustments. If you do that it's not bad at all.
    I work at PartMaker and we are owned by DelCam now. We work out of Fort Washington Pa with a Sales office in Chigago. With the additions to the software in the last few years, we have greatly improved the amount of choises our users have. The newest version includes an updated user interface and Programming directly on Solid Models. In my opinion it's the easiest CAM Software to learn when it comes to multi-axis machining.
    Our Posts are very robust and we work directly with the major manufacturs and machine tool dealers. All post from any CAM system with need tweaking from time to time to handle the many possibilities that Multi-Axis allows for.
  13. Plastic
    Join Date
    May 2010
    Location
    washington
    Posts
    4
    Post Thanks / Like
    Likes (Given)
    0
    Likes (Received)
    0
    CNC Swiss is a different beast. I've been running them and progamming them for 14 years. Tornos Deco's, Star, and Tsugami. I've trained over 40 people on how to run them and program them and let me tell you some people never figure it out. Even guys who were good on CNC lathes.
    When the diameters go down in size the entire machining process increases in difficulty. And factor in material. Swiss is great with ground bar stock to
    .0002 but throw in some nylon and get ready to fight the guidebushing all day / night.
    But I love'm. Jump in they're a lot of fun.
  14. Gerrythewelshman
    Cast Iron
    Join Date
    Oct 2006
    Location
    Ireland
    Posts
    449
    Post Thanks / Like
    Likes (Given)
    30
    Likes (Received)
    74

    setting sliders

    Hi,
    Adapt. Like any good setter, I does not matter what machine you use if you are 'the best'
    then it will come easy. and yes we all think we are the best.
Basic cnc lathe programQuick NavigationCNC MachiningTop
  • Site Areas
  • Forums
  • Manufacturing Today
  • Specific Machine Forums
  • Open Discussion
  • Commerce
  • Machinery Manual, Brochure and Photo Archives
  • Forum features
«Previous Thread | Next 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
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

How To Write Cnc Codes

CNC lathe simple g code example for CNC machinists/CNC programmers who just started their journey to learn CNC programming.

Simple G Code Example CNC Lathe

Cnc Lathe Programming Examples

Code Explanation
N5 Clamping workpiece
N10 Changing No.1 tool and executing its offset
N15 Rapidly positioning to A point
N20 Starting the spindle with 600 r/min
N25 Cooling ON
N30 Approaching B point with 600mm/min
N40 Cutting from B point to C point
N50 Cutting from C point to D point
N60 Rapidly retracting to A point
N70 Canceling the tool offset
N80 Stopping the spindle
N90 Cooling OFF
N100 Releasing workpiece
N110 End of program, spindle stopping and Cooling OFF

Comments are closed.