Live data from Hacker News

CNC milling with open source software

opensource.com

71–80 of 133 posts

Re: CNC milling with open source software

#71
post #23

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…

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

You can put all your workholding devices (vice, clamps, etc.) and toolholder into your CAM software and it will find some crashes during simulations.

Most CAM will do good simulations.

I usually run a new program without an actual cutter in the spindle. Then I run it with the cutter but 2-3" above the actual material to be cut.

Many people will do trial runs on machinable wax.

Re: CNC milling with open source software

#72

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.

Is there any reason why CNC machines aren't directly controlled by CAM software, beyond it always having been done that way? I'd think it would be useful to integrate the two, instead of the CAM software just firing-and-forgetting toolpaths.

Wild assed guesses:

Damage/safety issues: operating the milling machines incorrectly, or in an untimely manner.

Related to latter point: lack of hard real-time processing in the upstream software?

Re: CNC milling with open source software

#73

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.

Is there any reason why CNC machines aren't directly controlled by CAM software, beyond it always having been done that way? I'd think it would be useful to integrate the two, instead of the CAM software just firing-and-forgetting toolpaths.

The gcode emitted by CAM software is quite literally the assembly code of CNC machines.

Your question is somehow similar to "why can't the C code directly control the CPU"?

Re: CNC milling with open source software

#74
post #64

Earlier quoted context omitted.

It's not that easy. You need accurate models of your machine, the tools and the stock material. Your simulation has to be linked to the real machine movements and be ahead of time so you can estop the machine before the crash happens. But that still doesn't help in case of insufficient workholding or breaking tools.

It seems like the machine itself could implement some safety checks, like if a motor is commanded to go outside of its range of motion you trigger a stop with an error code and let the operator sort it out. Or go even more oldschool and have physical safeties on the machine that trip if your cutting tool attempts to exit the work area. I mean these aren't cheap machines, it seems like they could be engineered to be j…

If an axe could detect your thumb was in the way, it would no longer be useful.

There's a balance. Sometimes it really is up to the operator to maintain safety. Sometimes the machine can handle it. IMHO, other than reliably finding zero, everything else is up the the operator. The tool doesn't REALLY know how big it is or how fast it's going (just what it was told), and even if it did know, some operator would screw it up assuming that the tool was smart enough to adjust itself.

Re: CNC milling with open source software

#75
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.

FYI there are hybrid steppers now, which helps with some of the traditional stepper drawbacks. See e.g.

https://youtu.be/NARodU-vVWs

Re: CNC milling with open source software

#76
post #33

Earlier quoted context omitted.

What would a good G-Code variant look like? For all its flaws, it's pretty good at encoding the exact thing you want the CNC machine to do and while there certainly are different post-processors for different machines and in most cases they're not optional, it's also not like they're entirely different. I think of G-code as ASM. For high-performance work you might write code differently for different (related) machin…

It would look like something like this: go_home set_units mm set_movements relative activate_tool 0 move X 10 move Y 10 Instead, each of those names is replaced by G + a number.

That's because the above would be highly wasteful on a slow serial link, like the ones gcode was made on and for.

That said, I bet vim syntax highlighting could get you most of what you want. Color code movement, configuration, values, maybe display the toolhead status and position at your current line in the status bar...

Re: CNC milling with open source software

#77

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.

Is there any reason why CNC machines aren't directly controlled by CAM software, beyond it always having been done that way? I'd think it would be useful to integrate the two, instead of the CAM software just firing-and-forgetting toolpaths.

CAM can take a lot of time and need considerable computing resources. Not that much of issue today, but still, why do the same computations over and over again? Also, you will want to inspect the toolpaths before running them on real hardware.

Re: CNC milling with open source software

#78
post #24

Earlier quoted context omitted.

3d printers typically don't care about arcs or splines since they only use STL files which do not have "real" curves. Some firmwares support arcs (smoothieware, which is based on GRBL) but it still breaks the arcs down to segments.

>> 3d printers typically don't care about arcs or splines since they only use STL files which do not have "real" curves. I would have thought the printer would support arcs even if the slicer doesn't. There is work going on to support arcs in slic3r (automatic detection of arcs) but it will be irrelevant for printers that don't support it. It's would also be possible for a slicer to import step files and find such su…

I just flashed my Ender 3 using the latest Marlin version and I deactivated ARC support manually on it to save space. Considering how pretty much all 3D printers use a Marlin firmware, seems like ARC is supported pretty much everywhere.

Re: CNC milling with open source software

#79
post #64

Earlier quoted context omitted.

It's not that easy. You need accurate models of your machine, the tools and the stock material. Your simulation has to be linked to the real machine movements and be ahead of time so you can estop the machine before the crash happens. But that still doesn't help in case of insufficient workholding or breaking tools.

It seems like the machine itself could implement some safety checks, like if a motor is commanded to go outside of its range of motion you trigger a stop with an error code and let the operator sort it out. Or go even more oldschool and have physical safeties on the machine that trip if your cutting tool attempts to exit the work area. I mean these aren't cheap machines, it seems like they could be engineered to be j…

Real CNC machines have limit switches, they monitor the load on the axis and spindle servos etc etc. But that doesn't prevent running your cutter into a fixture at positioning speed and ruining the spindle bearings.

Re: CNC milling with open source software

#80
post #77

Earlier quoted context omitted.

Is there any reason why CNC machines aren't directly controlled by CAM software, beyond it always having been done that way? I'd think it would be useful to integrate the two, instead of the CAM software just firing-and-forgetting toolpaths.

CAM can take a lot of time and need considerable computing resources. Not that much of issue today, but still, why do the same computations over and over again? Also, you will want to inspect the toolpaths before running them on real hardware.

Yeah, you'd still definitely want to look at the toolpaths. As far as recalculating everything, it could still calculate most of it ahead of time.

What I'm thinking of is something like a CAM workspace in FreeCAD. That is, something like would let you take your model, generate and inspect a toolpath (or flip through possible toolpaths), and produce a part. The CAM software would get feedback from the controller, so it could follow what was going on.

It might also be possible to make adjustments, or pause the run, based on sensors. For instance, if you could detect chatter, you could slow down the feed rate; if you could detect a broken tool, you could pause the run and ping the operator.

Post reply on HN