The following email will show you how great this guy has been to deal with. This is NOTHING compared to what he went through for me to get his software running on my dinosaur of a laptop. It’s been amazing working with him thus far. I most likely don’t need to post his entire email but it can’t hurt if anyone really wants to read into it and understand a bit about his software.
His response is as follows - the nc code I generated earlier is attached.
The G-code PixelCNC currently generates is "Mach3-compatible", although from what I can tell Marlin G-code appears mostly the same, but there are some differences, mostly pertaining to the fact that Marlin is geared more for 3D printing, but its G-code dialect is built on the plain G-code specification. (http://marlinfw.org/meta/gcode/)
I don't know much about Marlin specifically, but PixelCNC issues these G-code commands:
G20/G21 = interpret coordinates as inches/millimeters (Marlin)
G90 = enable absolute coordinate mode (Marlin)
G40 = disable cutter radius compensation (non-Marlin)
M3/M4/M5 = spindle cw/ccw/stop (Marlin)
M6 = tool change (non-Marlin)
M7/M8/M9 = coolant off/mist/flood (non-Marlin)
G0/G1 = rapid/feed (Marlin)
M30 = end program (Marlin, but means something else)
The commands I marked "non-Marlin" are commands that I'm sure Marlin will not recognize as anything at all, and there's a good chance it will just ignore them entirely, but it could error out complaining about encountering unrecognized commands. These commands are not listed on the Marlin G-code page at all for anything, so they will probably just be passed over and ignored.
The disable cutter-compensation G40 command is prefixed at the beginning of all PixelCNC G-code programs, along with a G20 (or G21) and a G90 command, and can be manually removed easily. I would be surprised if you had problems running G-code with the G40 or the M6 toolchange commands in there at all. Also, if you create your PixelCNC project's operations with coolant set to 'off' then the program generated will not have any of the coolant commands whatsoever, so you won't have to worry about the Marlin encountering any M7/M8/M9 commands at that point.
[** this is me again…..I should add here that the process of exporting the CNC programs is one pass / tool at a time. IE I saved off the roughing pass, then saved off the cleanup pass and then saved off the detail final pass. Three separate files for three separate tools. I’m trusting in my system of “moving everything to the corner” tool change for now. ]
Then there's the end-program M30 command, which means something else entirely to Marlin: "delete SD file". I'm guessing it's referring to deleting a file from an SD card that is plugged into the controller? I can't find any equivalent command to 'end program' on the Marlin G-code page so I'm guessing that you simply don't need an end-program command, and the program is just done when the controller encounters no more commands. You might need to remove the M30 commands from the end of PixelCNC's programs though, which is easy enough, but I imagine that at the very most it would error out when encountering an M30 - because there's no filename/path parameter following them in the G-code PixelCNC generates, but the program would be done running by the time it encounters the M30 so maybe that would not be a big problem anyway? At the very least I think it might just do nothing if it encounters an M30 that has no filepath parameter after it. That would be convenient. Otherwise just erasing that M30 line out at the end should be fine.
There's a good chance that the Marlin will gracefully ignore any unrecognized commands, instead of erroring out or going haywire and crashing or something bizzare. I'd try running PixelCNC G-code output as-is, just do something small and have it cut the air. If the G40/M6/M30 are all ignored then you won't have to worry about manually editing the CNC programs PixelCNC outputs at all. I'm sure it will spit out an error telling you about anything that trips it up and you'll be able to easily go in and make any change needed to appease the controller, but there otherwise shouldn't be any problems with everything else PixelCNC generates as far as toolpath feed/rapid commands and spindle commands. The Marlin controller should be able to execute all the toolpath traversal G-code just fine.
[** me again - I’m happy to try an air cut on something small…let me know if you think I should or if you know from above that there are definitely things I will want to edit out. ]
PhotoTestRough.nc (138 KB)