MillenniumOS - A CNC "Operations System" for RRF 3.5+
-
I thought I'd share something that I've been working on for a while (since October ) and made public earlier today - MillenniumOS, which is an "Operations System" for RRF 3.5+.
There's further documentation for the system, and the operations it implements, on our (Millennium Machines) documentation site, and I made a video a while back (while developing it!) of how the system works in practice - I'll be making more of these now that the repository is public including example videos of each probing operation.
MillenniumOS is a combination of 3 things:
- A G-Code dialect
- An RRF addon consisting of a set of custom G- and M- codes and system macros (tool change, pause, resume etc) that implement the gcode dialect and
- Post-processors for Fusion360 and FreeCAD (Realthunder branch until FreeCAD releases a version packaging Python 3.11)
This addon implements a bunch of CNC features designed to allow novice operators to approach their first cuts more safely and in a guided fashion, including:
- Guided workpiece probing (Bore - shown above, Boss, Rectangle Block, Rectangle Pocket, Outside Corner, Vise Corner, Single Surface) using both a touch probe and manually with a datum tool. Includes touch probe deflection and radius compensation as well as datum tool radius compensation.
- Protected moves when using a touchprobe so during travel moves, the machine will stop if an unexpected collision was detected.
- Workpiece rotation calculation on certain probe cycle types which will be used in future to apply
G68
transformations. - Tool changes with tool length compensation using a toolsetter, or re-triggering a z-probe on the workpiece if no toolsetter is enabled.
- Parking in Z and optionally X/Y for easy access to the table.
- Pause and resume with spindle control and delay.
- Variable Spindle Speed Control, which adjusts the spindle RPM up and down within a range to avoid resonance between the tool and workpiece.
- Configuration is handled using a Wizard process that runs on first-install, guiding operators through the process using RRF dialogs. Includes a guided procedure to measure touch probe deflection.
- Probing cycles gather information required using RRF dialogs as well.
The base design choice of this system is that all complex functionality is implemented as RRF meta gcode - there are some great post-processors for RRF but these all seem to take the approach of implementing rather complex functionality in the post-processor itself, rather than doing this directly in meta gcode.
One of the benefits of taking the MillenniumOS approach is that the post-processors are relatively simple, and implementing wider post-processor support to target this gcode dialect is much quicker than re-implementing all of the functionality in a new post-processor to support a different CAM package.
One thing I wanted to do with this was to make manual probing easier / safer. Not everyone has a toolsetter and touch probe, but the maths to calculate probing points and origins is the same whether using a touch probe or not - so MillenniumOS can guide the operator through manual probing in exactly the same way it would use a touch probe.
The probing macro is actually the same, but runs different underlying macros to trigger either a touch probe move or a M291-dialog-driven manual move. This avoids the RRF jog window as much as possible as I've found it too easy to hit the wrong button - the manual probing will only ever move directly towards or away from the surface that needs to be probed - it won't accidentally move up or down, or along the wrong axis.
You can see an example of how the probing cycles are the same between touch probe and manual probing in this video, and one of the early testers made a video of running through the installation and machining using the MillenniumOS post-processors and macros here!
This addon is designed to work with our (Millennium Machines) open-design desktop CNC mill, the Milo, but it should work with any machine that has the axes configured in the same direction (i.e. Moving tables with Y max when the table is at the front, X max when the table is at the left, and Z min when the spindle is at its' lowest point). I'd be interested to hear from anyone who decides to try and use this on a machine that isn't the Milo.
On machines that don't have the axes in the right direction (X and Y only, Z minimum must be the lowest spindle position), then certain settings like corner names or surface names will need to be changed as these would be back to front depending on which directions your axes move.
I've found while developing this that I have been pushing the capabilities of RRF and some of the boards we've been testing on (specifically the
stm32f407
) so this has been a really fun project and a bunch of the Duet and Teamgloomy guys have been a great help in tracking down a bunch of issues, so if you guys are reading this thank you so much for your help - this is why I was coming up with all sorts of random questions and issues and everything else.My goal has been to reduce the learning curve for those just getting started with machining and hopefully what I've developed here helps with that - this is only a first public release and I'm hoping I'll be able to continue working on this more in future!
-
Has anybody tested this on Duet yet? Because with stuff like rotation compensation I can see it being very useful for various DIY CNC machines. I might convert my little Volksfräse to a Duet and MOS because it sure beats the pain that is Estlcam hooked up to a tablet.
-
@NineMile said in MillenniumOS - A CNC "Operations System" for RRF 3.5+:
(Realthunder branch until FreeCAD releases a version packaging Python 3.11)
JFYI the weekly dev builds of FreeCAD 0.22 (which will be FreeCAD 1.0 by all accounts) is building with Python 3.11, has the TNP fixes included, and has a greatly improved UI compared to the last stable release of FreeCAD. I am using the weekly builds without issue for a couple months now.
-
@mhe I can confirm that this works on a Duet2 and a Duet3 Mini 5+. Though I didn't test it with the rotation compensation and G68.
-
Funny how I missed that thread... probably because it was posted on april 1st?
Will watch it from now on, maybe it's useful for my CNC plasma table, too? -
@o_lampe It popped up as a new and unread post form me the other day, I missed it in April too ... maybe a forum glitch.
-
Ah, good to login and see some talk in this thread I've just released v0.3.0 (and very quickly after,
v0.3.1
, someone always points something out just as I cut a new stable release ) - this new stable adds the following functionality (with a caveat that you must be using v3.5.2 if using an stm32f4 based board):- Radius tool probing (when your tool is bigger than the toolsetter, a number of probe points will be generated around the circumference of the tool so things like big face mills can have their lengths calculated accurately)
- Implement G73, G80, G81 and G83 canned drilling cycles (used by FreeCAD post)
- Implement Spindle Feedback Delays (Spindle control with M3.9 can now take a general purpose input, waiting for it to change state before proceeding with cutting moves)
- Implement storage of multiple WCS probing details (can recall previously probed details for further use either in custom macros or for...)
- Implement Rotation Compensation M5011 (this is now called automatically by the post-processor after probing, and will use G68 to apply rotation compensation if a rotation was detected by the probing method used)
- Add coolant control (Adds separate gcodes for Air, Mist and Flood coolant as well as controlling it on pause and resume)
@oliof Thanks for the info on FreeCAD dev builds - I've been using the realthunder branch for a year or so at this point so fallen behind on what's going on with FreeCAD itself - I'll absolutely be switching back to 1.0 when it comes out and will make sure the post-processor is compatible if any changes are required.
@o_lampe While I've been developing this in a machine-agnostic manner, it is pretty opinionated towards the problems we encountered with new users of the Milo CNC Mill - the gcode format that the post-processors output follows a pretty milling-specific workflow that may not be appropriate for a plasma table.
That said, if you have any sort of need for decently fleshed out probing macros using a touch probe (I have no idea how CNC plasma tables work but my guess is probably not), then it could be of use. While it's not my focus, I'd be interested in seeing what changes would be required to the workflow to add support for plasma tables or laser engravers, if that even makes sense (I have neither).
@mhe As mentioned above, I have tried my best to develop this in a machine-agnostic manner. I don't know of anyone else using it on a machine that isn't a Milo, but it should work on any 3-axis machine. It might be necessary to override some of the internal variables to make sure things like corner names are correct (e.g. if your axes run 'backwards' compared to Milo then the corner names will be back to front), but it should work nonetheless.
Happy to provide input / help if you do choose to try it, either on here, on the RRF discord or on the Millennium Machines discord (same name as on here).
-
@NineMile most if not all of the relevant real thunder changes in terms of TNP and UI improvements have now been backported into FreeCAD proper; FreeCAD 0.22 also has a 'native' Assembly workbench so unless you have a lot of files making use of real thunders Assy4 Workbench, I think it's a good idea to switch earlier rather than later (-;