-With hopes I have chosen the best forum to post this.
I have started development of a CPS for Marlin 2.1x based CNC. This CPS installs into Fusion360.
Marlin_CNC-Laser_CPS_for_Fusion360
There are three functional files at this time. Minimal, Multimode, and Magic.
-Feedback and ideas are 100% welcome. If you love it, or hate it, I still want to hear about it.
-Forks and pulls are 100% welcome.
-Code is intended to be 100% open source.
- Minimal: No doubt there is more that can be done to make it better and cleaner. But for now it does output working code that does work without issue, without need of manual post edit in order to cut with Marlin. The point of minimal is to be a bare bones simple and strait forward CPS with as little over head and alteration of the base output as possible.
- Availability: This CPS is available now and will see very little intentional development.
- Feature: Invert Axis support: I have no easy way of making Fusion output as I need, and CNCjs has no way to flip. So what I see on screen is reversed from what prints on both axis. With bit of effort to rework everything I might resolve starting in the firmware. OR, just ask the CPS to invert the X and Y motion path. So it was added. If for whatever reason your own files come out flipped you can invert the axis at the CPS control.
- Feature slim: This project intentionally is devoid of excess features. This should be just enough to get any new user up and going. No complex questions. Just a basic post process to make sure the code works well in Marlin.
- Feature Headers: Both Minimal and Multimode will include basic headers. If you need something fancier you can always fork and impliment your own insanity as needed. MPCNC worked well, required manual edits to work right in Marlin mostly due to insane long complex headers. I would like to keep them informative but simple.
- Multimode: Still in development, should when done, nicely support the options for FDM, LASER, or CNC. In theory, I can take it farther. But at this point it’s all theory and I ideas that might not be practical. This is intended to become the all in one monstrosity that will encompass whatever you can come up with, Within reason and it will still work.
- Availability: This code is tested and otherwise fully functional.
- Nonstandard machines support : Sorry there is no specific support for anything past 3 axis at this time. Does not mean there will not be. But I do not have any of these beasts so I cannot easily test. Don’t be afraid to fork the code and start a new branch.
- Feature: Invert Axis support: I have no easy way of making Fusion output as I need, and CNCjs has no way to flip. So what I see on screen is reversed from what prints on both axis. With bit of effort to rework everything I might resolve starting in the firmware. OR, just ask the CPS to invert the X and Y motion path. So it was added. If for whatever reason your own files come out flipped you can invert the axis at the CPS control.
- Feature: enhanced TMC support: I am tinkering with ways to add augment support for TMC drivers in a way that will allow me to take advantage of the code in Marlin without needing to keep all kinds of extrapolation stuff active. This is way more practical for testing as the results are more repeatable and there is no guesswork. But its a work in progress. It might even fizzle and get removed.
- Feature: Startup Code: although the code will eventually feature a series of prescripted start up functions, I have intentionally made it so that the Post Processor will allow for the injection of both start up and shut down code. The operator also has the option to disable and make use of their own hand written start up or shut down as may be needed with more complex custom hardware.
- Feature Headers: Both Minimal and Multimode will include basic headers. If you need something fancier you can always fork and impliment your own insanity as needed. MPCNC worked well, required manual edits to work right in Marlin mostly due to insane long complex headers. I would like to keep them informative but simple.
- What if I dont need features: There are functions like TMC and Magic that should at some point ONLY show up if they are enabled. For now all you can do is uncheck the boxes you don’t need. See attached screen shots of how I have it setup.
- Magic is a concept: For now, Magic works mostly as a minimal CPS. It doesnt do any magic. So there is not any particular reason to load it. Magic is some special sauce thats intended to be added back into Multimode when fully developed.
- Availability: You can access this file and notes, but its not really available.
- Feature expanded Marlin Support: Similar to the idea behind the TMC support I want the CPS to be able to look at the code written by Fusion360, even direct fusion as CPS can, and directly convert or influence the generation of movement commands to tap directly into Marlin, directly changing parameters to create movement and behavior that generic movement commands cannot.
- Drag&Drop EXE: I am working on an idea to also offer a drag and drop version of the minimal CPS for use as a generic filter for Marlin use. Thus an operator can export with other non Marlin CPS then drop it on the EXE and the file will be converted. -This is a mental concept not in the folder.
- Diagnostic Files: The oldest files including Diagnostic are generated to help flush out issues in getting the functions and CPS working. I will eventually purge all but the Diagnostic file. These will not produce a useful NC file.
People talk about NC files being machine specific. On FDM gcode is very much machine specific. But in general, NC files are not so special. In this respect with excel and a little tweaking most can be converted easily. Sometimes it’s less effort than that. Not counting code for industrial hardware I have no experience with.
Marlin can handle pretty much everything. GRBL runs fine on Marlin. But it’s so basic. The long term goal is to create NC files that bring out the full power of Marlin, nor just it’s most basic functions. MPCNC also has a marlin friendly CPS but the header is insane and the stuff it adds has to be removed for the code body to function.
Minimal and Multimode are functional and available now.
All code is OPEN SOURCE with MIT license.
The community is welcome to play with the files, provide feedback and create pull requests and forks. I hope it is useful to others.
My own setup is Fusio360, CNCjs, Marlin 2.1x on Spider V3, with TMC2209 drivers on a generic 3018 desktop CNC. -Note my own setup I need to add a relay, but the Spindle is not controlled by Marlin. Instead it uses a 3rd party PWM controller for small motors. Marlin spindle control was not good.
Other projects:
CPS for Shark CNC: This repository is online and live but still cooking and I cannot vouch for the files to be usable yet. Assume this is mostly notes and placeholders. Pretty sure nothing in the CPS is functional.
CNCjs control panel: This isn’t code as it is a shared copy of my on screen layout. When you install CNCjs builds a file in the user directory and it stores your interface layout setup in there. In general it does not effect the behavior of CNCjs in anyway. This file lets me share my own on screen setup and recover of needed. -Note: Don’t merge the secret, thats unique to your PC and it need to stay in that file. If you copy the secret from my copy it will likely lockup CNCjs at launch. -4k monitors will notice the buttons are out of alignment. I filed a ticket but it’s not likely to get fixed. My layout works on a 32in 1080p HDMI.
10/18/2025 21:07 CST

