Live data from Hacker News

CNC milling with open source software

opensource.com

51–60 of 133 posts

Re: CNC milling with open source software

#51

Earlier quoted context omitted.

I'm definitely interested. I got into 3D printers and CNC machines at about the same time last year. I figured out the 3D printer right away and quickly went from printing out things on thingiverse to doing my own designs and outgrowing my printer and getting a fancier one. While I've done about 250 print jobs in just under a year on my 3D printers after 8 months with the CNC I've cut two things. I got an entry level…

There's a big difference between an additive process vs subtractive process. To me, additive is much easier as it starts at the bottom and build up. Nothing is ever in the way of the next step. Subtractive is much more difficult as you have to figure out how to get to places that needs tooling, how to hold the piece to do the work on it (especially as the piece changes shape in the process). Most projects I work on r…

I've found the work holding on the CNC to be somewhat analogous to bed adhesion on the 3D printer. When milling you have to figure out how to hold this block down and printing you're using glue sticks and tape to try to get the first layer to stick. Both of these require the same trial and error shade tree mechanic skills that I enjoy developing.

My sticking point is more in the CAM side of things.

First I'll design something in Fusion 360. If I want to 3D print it the next steps are to export the stl (shape file) and open it in a slicer program. Then there are about ten parameters that may need some tweaking especially for a new printer and dozens more that you rarely change from the default before sending gcode to the printer. The slicer program can get you pretty close out of the box and the more I've done it the less time I spend slicing - my go-to settings print perfect 90% of the time. There are lots of resources (blog posts, youtube videos etc) explaining the different slicer settings and their effects on the print.

For CNC Milling after I've designed the part in F360 you switch over to CAM mode and it's like an entire different project that you have to design. With the slicer you say "lay it down on this side and print in PLA" the CNC CAM process makes 0 decisions for you. You can't just say "here's my stock, here's my end mill, put this side up and cut" and then tweak settings from there. Instead there are myriad permutations on feed rates, orders to cut things, multiple passes. Someone's feeds and speeds posted on the internet aren't going to work for your machine/material/design so there can't be something like a slicer program that can automatically route your CAM based on a few parameters and you can't reuse many settings between jobs.

I still like both printing and milling but milling is such a more difficult task with less mature software available (especially open source and hobby level software). That's why a fairly simple task warrants a pretty lengthy tutorial that's worthy of the HN front page.

Re: CNC milling with open source software

#52

CNC is programming "for keeps". Any tiny little error in your gcode has a chance to crash the machine. Unlike a computer crash, a CNC crash results in broken metal flying across the room and anywhere from $5- to $5000 in damage. I programmed for a heavy machine shop for a year before I gave up and went back to making websites. Hobby CNC is fun though, it is amazing what you can make out of wood when you can shape it…

A poorly programmed CNC machine can drill a gaping hole in itself, and into the table that it stands on. Don't ask me how I know.

If there was no table, it would be the ground, and yes, it would. Not many things can stand in the way of a spindle hell-bent on chopping chips off a block of titanium.

It's a very fun thing to play with, though. Probably the most high-stakes programming most of us are ever going to get.

Re: CNC milling with open source software

#53
post #41

If you're interested in Open-Source CNC you should check out two of my Open-Source projects. https://camotics.org/ a CNC simulator and https://buildbotics.com/ a CNC controller. I'm somewhat surprised neither of these were mentioned.

Will you be adding servo support in the future? Steppers are great, but anything big needs a servo, as the steppers get to expensive and too slow very quickly.

No servo support yet but we can drive NEMA 23s and 34s at up to 4k RPM.

Edit: We are adding step and direction outputs which could be used to control an external servo driver. You can actual access these outputs now of you are alright with soldering some headers on to the main board.

In the future, we do plan to make a servo version of the Buildbotics CNC controller.

Re: CNC milling with open source software

#54

If you're interested in Open-Source CNC you should check out two of my Open-Source projects. https://camotics.org/ a CNC simulator and https://buildbotics.com/ a CNC controller. I'm somewhat surprised neither of these were mentioned.

Do any of them support the arc or spline gcode? I noticed that most of the 3d printers do not, even though they are essentially 4-axis CNCs.

G3 and G4 arcs are supported but not splines. It would be easy to add spline support but there is very little demand for them. Since I released CAMotics in 2011 no one has asked for spline support.

Re: CNC milling with open source software

#55

G-code is the most hilariously bad language. Keywords are G + a number, e.g. G01, with wildly different effects, varying arg lists and no standard. E.g. G01 move to position, G20 set the machine units to inches. Its often stateful. Obviously its coz its old and works, but i chuckle everytime i have to look up the codes at how comically awful it is compared to anything else i see https://en.m.wikipedia.org/wiki/G-code

Check out https://TPLang.org/ for a JavaScript based Open-Source alternative to GCode. I'm the author.

Re: CNC milling with open source software

#56
post #23

Earlier quoted context omitted.

Is there no way to test? Or there is, just not everything?

The best shops use simulation tools, but you need the 3D models / configurations of everything to make them work, and then the machinist still needs to load everything correctly. It's very easy to make a mistake. Check out a simulator here: https://www.ncsimul.com/

>machinist still needs to load everything correctly. It's very easy to make a mistake.

Tool configuration is kinda-sorta solved with ISO 13399, this is being supported in more and more CAM systems and tool vendors, but as you say it is very easy to make a mistake.

Assuming the mistakes are happening when the tool data is reduced from the comprehensive format that ISO 13399 supports to the barebones and simple TxDxHx format that is loaded on CNC machine. Would be nice if machine tools supported a comprehensive format directly.

Re: CNC milling with open source software

#57
I've been looking into building my own CNC. Sounds like there are some experienced CNC peoople here. Does anyone know why there are not more polar coordinate based CNC machines? I've been wondering what the pros and cons are.

Re: CNC milling with open source software

#58

G-code is the most hilariously bad language. Keywords are G + a number, e.g. G01, with wildly different effects, varying arg lists and no standard. E.g. G01 move to position, G20 set the machine units to inches. Its often stateful. Obviously its coz its old and works, but i chuckle everytime i have to look up the codes at how comically awful it is compared to anything else i see https://en.m.wikipedia.org/wiki/G-code

At first glance, it looks like an assembly language. Does anything compile to it?

Yes, http://tplang.org compiles to GCode. Or rather, it produces GCode when executed.

Re: CNC milling with open source software

#59

G-code is the most hilariously bad language. Keywords are G + a number, e.g. G01, with wildly different effects, varying arg lists and no standard. E.g. G01 move to position, G20 set the machine units to inches. Its often stateful. Obviously its coz its old and works, but i chuckle everytime i have to look up the codes at how comically awful it is compared to anything else i see https://en.m.wikipedia.org/wiki/G-code

At first glance, it looks like an assembly language. Does anything compile to it?

> Does anything compile to it?

Compilers targeting G-code are called CAM software.

Re: CNC milling with open source software

#60

CNC is programming "for keeps". Any tiny little error in your gcode has a chance to crash the machine. Unlike a computer crash, a CNC crash results in broken metal flying across the room and anywhere from $5- to $5000 in damage. I programmed for a heavy machine shop for a year before I gave up and went back to making websites. Hobby CNC is fun though, it is amazing what you can make out of wood when you can shape it…

A poorly programmed CNC machine can drill a gaping hole in itself, and into the table that it stands on. Don't ask me how I know. If there was no table, it would be the ground, and yes, it would . Not many things can stand in the way of a spindle hell-bent on chopping chips off a block of titanium. It's a very fun thing to play with, though. Probably the most high-stakes programming most of us are ever going to get.

In other words, don't mix up your G0 , G1 , G90 , and G91 .

Much sadness will ensue.

Post reply on HN