CNC/3D Printer Hybrid
-
I am building a machine that is capable of CNC milling and 3D printing by switching out the toolheads. I read another post where someone created a base config.g file and 3 macro files to modify the base config.g for either CNC, 3D printer, or laser engraving. I am wondering how I would go about doing such a thing? And is there an easier way to go about doing this?
-
This is one of those things that is really so simple that it seems like a mystery... there is really nothing special about "config.g" beyond the fact it gets 'processed' after a boot.
Therefore...
Create "whatever.g" files. They can be macros, or you can "print" them, it is really the same. This bears repeating: 'config.g' runs at boot... it can be "re-run" by "printing" it. As can any file with any name that ends in g.
So have your "config.g", your "CNCcfg.g", your "3DPrintcfg.g" whatever you want to name them. Or make them macros...
Those files will have the various M codes that are also in config.g., setup for YOUR various configurations. When you want to 'switch', just run that file. Either run it as a macro, or 'print it'. There are a few (very few) restrictions on ordering. Most of them are common sense. For example, you must map axis-to-drive BEFORE you set speeds, or current, or whatever for an axis. Again, common sense.
Other than that, configuration is ALL dynamic, and can be changed at any time. Collecting the commands to change it into files is just a convenience, and can be done many ways.
-
Ah, thanks. I am interested in how the Duet boards are programmed (ex. G20 - do this...). I know a little C and I was wondering if it would be something helped to know how to do (I am planning on using the Duet board for many projects). I don't suppose you know where I could find some information on that?
-
If you mean how is the Duet programmed using G- and M-codes, the reference for these commands is https://duet3d.dozuki.com/Wiki/Gcode. But you may find it easier to start with https://duet3d.dozuki.com/Wiki/ConfiguringRepRapFirmwareCartesianPrinter.
-
I was thinking more about how the G-codes were programmed "behind the scenes". Another quick question now that I've captured the attention of an Admin: Is it possible to probe for an angle in the X or Y direction and compensate for that angle when printing/milling? Similar to what the Prusa Mk. 3 does when it probes the bed and all the prints come out square to the bed. As far as I can tell this is not a feature but maybe you could pass it on to the dev team?
-
@roosevelt155 said in CNC/3D Printer Hybrid:
I was thinking more about how the G-codes were programmed "behind the scenes". Another quick question now that I've captured the attention of an Admin: Is it possible to probe for an angle in the X or Y direction and compensate for that angle when printing/milling? Similar to what the Prusa Mk. 3 does when it probes the bed and all the prints come out square to the bed. As far as I can tell this is not a feature but maybe you could pass it on to the dev team?
You can measure the XY, YZ and XZ skew manually and correct for the angle using the M558 command. We don't have any plans to measure the angles automatically, because it's not hard to get the X and Y axes orthogonal.
-
@roosevelt155 said in CNC/3D Printer Hybrid:
Ah, thanks. I am interested in how the Duet boards are programmed (ex. G20 - do this...). I know a little C and I was wondering if it would be something helped to know how to do (I am planning on using the Duet board for many projects). I don't suppose you know where I could find some information on that?
-
Thanks for all your help! This has probably been the most responsive forum I've ever been on. I'm reconsidering my design and wondering if a large dedicated printer would be better. Maybe one that prints Ultem and PEEK...