• Spring 2024 meetup in Calgary - tentative date Saturday, April 20/2024. Other regions are also discussing meet ups. If you want one in your area get going on organizing it! discussion
  • We are having email/registration problems again. Diagnosis is underway. New users sorry if you are having trouble getting registered. We are exploring different options to get registered. Contact the forum via another member or on facebook if you're stuck. Update -> we think it is fixed. Let us know if not.
  • Spring meet up in Ontario, April 6/2024. NEW LOCATION See Post #31 Discussion NEW LOCATION

CNC Programming

As I am trying to optimize my work on the CNC mill the biggest thing is identifying time wasting or error inducing operations.

For time wasting, using a CNC viewer is a must, NCviewer (Cloud based and Free) or GWizardE (paid) let you see the steps while adjusting the actual code and deleting or tweaking code to increase performance and reduce time without effecting work.

The second is changing approach in terms of setup and using the machine itself without additional tools to help position your work accurately and consistantly. In this case I have started using M200 which creates a pause to allow loading.

The more I use CNC, the more I find I must review on how I do things and see what other tools are available within the coding to simplify the work.

Manual machining thought process give a good understanding fundamentals, CNC on the other hand requires abstract thinking as it allows so many variations as how to approach a solution and finding the best one.
 

jcdammeyer

John
Premium Member
It's one of the reasons I went with AlibreCAM. The ability to see the simulation and even step through each line has been invaluable for figuring if I'm doing something dumber than normal dumb. Pretty sure that Fusion360 can do the same sort of simulation too.

Writing G-Code from scratch is a bit harder to visualize I suspect.
 

Dan Dubeau

Ultra Member
Thanks for the Ncviewer recommendation. I used to use NCplot years ago, but when I switched computers a few years back I lost my license, and never bought one again. While pretty basic and it doesn't pickup g70-72 canned cycle parameters (NC plot didn't either) it works great for visually double checking my finger cam lathe programs for egregious errors. It'll come in handy as I try and teach the young guy here how to program and run the lathe over the next couple months. He's more of a visual guy like me. Thank you!

For mill programming I use Edgecam, and it has a good backplot built in automatically (most cam does now anyway). Very rarely do I ever run full sims anymore to check for issues. If it looks good, it is good. After years of tweaking my post processors for our machines, I know what is on the screen is what I'll get at the machine. Any of the errors I usually make are almost never in the toolpath, it's always the wrong TLO or something similarly fat fingered. Catching that by reading the program at each toolchange, and watching the distance to go, is a great safety net habit to get into. Sometimes the idiot at the desk, tries really hard to out idiot the idiot at the machine.......Best be on your toes.

As for toolpath editing. I/we don't do much production, mostly one offs, high precision tooling work with a lot of 3d surfacing. But occasionally a job will come in the door that is too good to turn down, or we'll help the shop next door with some over run. I usually strive to get something running quick with the bones of the program/fixturing in place, and making dimensionally good parts. Then from there I can pare away at the program by CAM and by hand, cutting out extra air time, and extra moves, taking more/less aggressive cuts. etc All while the machine is making good parts. For the one offs i do, there is no point in trying to edit programs for outright speed, as it's pretty easy to sit down for 10 minutes picking away at a program trying to shave 2 minutes off. Not worth it, just make a note of it, change your approach and get it on the next one. After a day or two, you get pretty good at making efficient one off programs out of the gate, just by paying attention to the details along the way, and doing it right the first time. I still have occasional "why did I do it THAT way" moments, but heading back to the desk to make changes, eats up whatever time I would have saved anyway. I save a lot of time by using the same parameters and cycles for the same tools and approaches. Hard to explain, but it's my way of turning ones offs into production runs in a way. After a while the built up tool libraries and cycles make it pretty cut and paste, freeing up time to do other things.

Programming for production vs one offs is like running. There are marathon runners, and there are sprinters. A marathon runner would get slaughtered in a sprint race, just like a sprinter would be gassed quickly in a marathon. Sometimes you need to sprint, and sometimes you need to run a marathon. It helps to have both arrows in the quiver, and use them when required. We've had production programmers in here before, and that mentality doesn't fly with one off, and special ordered material. You can't "burn" a few parts/blocks to dial in a program/tool to get it running right, and roast tooling constantly just to save a few minutes of cycle time on a 4 hour program. Alternatively, you can't spend all day trying to write the perfect program for a 10 run production of $50 dollars worth of material, which you have racks of. Totally different approaches. I am a much better one off programmer, than production, but I enjoy the process of production programming more. When I get to the point of a nice efficient program spitting out parts, with reliable tool life, I want someone to take over quickly though.

Editing stuff in CAM is only so good, some programs are better than others. I think the final seconds to come out of a production cycle are best done at the control, or in notepad, by watching and learning what the machine is doing line by line. The hard part then becomes documentation, when the job comes back in months/years, and you need to pickup where you left off. Brackets () in the program are great to explain what's happening, and I use them a lot for production programming, not so much for one offs. That's another can o worms.....Take lots of notes, and have good housekeeping. It pays off.

Knowing what your machine can get away with is another story altogether. A bit of a learning curve programming my Tormach after years of running Haas'.....Every machine is different. Even our Haas' from the VF6 to the VF2 need different approaches for some stuff. Not having a toolchanger means more holes get helical milled, vs drilled, etc....

Wow, sorry for the rambly ADHD info dump.....It's a subject I enjoy a great deal, and have made a living doing for almost 20 years now and still learning new/better ways of doing stuff all the time.
 
I agree with you on one off's vs multiple's. I use Intercon (Centriod's include conversational tool to grunt programming) while pretty good it does have some issues. Which is why I look for time wasters with other software.

I will look at Edgecam and others once I find the need to progress beyond the simple stuff. Ideally make the upgrade pay and make money before investing lots more (ultimately an upgrade will occur).

I have determined one thing on G-Code is has flavours that are manufacturer specific. So what works on one may not alsways be the same on another.
 

Dan Dubeau

Ultra Member
I would steer you away from Edgecam. I hate it, I've always hated it, but it's what we have, so it's what I use. I've just gotten good at exploiting workarounds over the years to get it to do exactly what I want. Something that I found is necessary with most software, but more so with certain ones. I've been given the green light to spend some money in the new year to upgrade our CAD and CAM programming software, so I'll see whats available out there when I get some time to demo some. We tried switching to Solidworks 2 years ago, but the main designer here could never find the time to learn it, and the migration got stalled when we got really busy the past 2 years. Software Migrations are hard.....I would have rather spent that money on CAM software, but oh well....I'm going to pick it back up in the new year, as we're starting to slow back down to "normal", and I move back into designing more.

Controls themselves are all different too. Fanuc, while stable, and reliable falls way down my list of preferred controls to work with. Haas are nice and easy to figure out, and what I have the most time driving, but my favourite by far was Heidenhain. I miss working with that control. I only had a brief experience with siemans many years ago, and never really got a chance to form an opinion of it. They all like a bit different flavours of g/m code too, but for the most part the meat and potatoes of direction control are all pretty much the same. That's where having a software package that easily lets you edit a post processor on your own without having to pay someone comes in very handy. I will give edgecam the nod in that department, it's code wizard is very intuitive, even for a computer coding neophyte like myself. I've also got a seat of MADCAM that runs in Rhino, and it's highly configurable. Much cheaper than edgecam, but lacks some polish and features that I like. Good for surfacing, and programming undercuts with a universal head (the reason I have it)

Conversational programming is awesome. None of our Haas' at work have it, and I wish they did. My Tormach (pathpilot) does, and it's very handy for a lot of things. I'm still getting used to it, and try to use it more and more, instead of resorting to CAM for simple stuff. Old habits are hard to change.

I equate this stuff to driving cars. Spend the time learning the fundamentals, and moving between brands/controls becomes a whole lot easier. All the car brands will get you from a-b, but some are nicer, have more options and more luxurious than others. And come priced accordingly. Some are also more crash prone, and maintenance intensive. Buttons are all different and in different places, but it doesn't take long to figure out the new locations, and their functions if you just poke and play around with it a bit.

I'm also on the hunt for a new CAD/CAM package for home use too, so 2023 will be the year of smoke rolling out of my ears as I try and learn new things and kick old habits lol.
 
I would likely go Solidworks (and their CAM integration) for best optimization Mastercam (cad in from solidworks) seems to be the goto. Both $$$$$$$$.

Learning curve for Intercon was ok (getting better as I use it). See the steps of each line of code as you scroll through is best saves crashes and 1500 lines is quick to review.

To be fair learning G-code and CAM programming was not on my bucket list.
 

little ol' e

Jus' a hobby guy
I agree with Dan on staying away from Edgecam.
It certainly isn't the cheapest of software's, just not the most user friendly when starting out.
Rather than buying the full blown seat of Mastercam. Level 2 would be where I would start, if I had to do it over again.
 
Last edited:
Top