Traditional G code and ground control

Hey everyone, I’m new to the Maslow world, but I’m excited to be here. I am a machinist by trade, so maybe you know where this is going. I hand write most of my code. I typically work straight from a napkin sketch to g code. I seem to be in the minority around here. I use use Fusion 360 occasionally when the job calls for it, but I am provided the digital files by the customer, so I am new to the CAD world as far as design goes.
I understand that GRBL needs absolute positioning commands and I will never get it to understand what a g41 is, and it would be unfair to overtax the arduino with bulky firmware, but how can I make ground control understand? My control unit (PC) is a monster and has plenty of resources to do some basic geometry. I have searched the forums, and other people have asked the same question, but near as I can find, there has been no resolution. And if I can’t make Ground Control understand basic g code like humans write it, is there a program that I can convert g code to GRBL friendly absolute positioning coordinates?
I’m old school and I don’t care, but I will tell you this: I can write g code faster from a napkin sketch quicker than the CAD department can render a 3d model of it. Which means I’m tooling up when they’re drawing their first box. Right now, my first maslow project is bogged down in the design stages because I have to learn how to draw 3d models.
When I first started using Fusion 360, I wrote my own post processor to generate g41/g42 and g13 instead of the messy, resource hogging point to point nonsense that overloads the old machines. I see you guys recently figured out g02 and g03. Saves a ton of space, right? I know g code. You guys know maslow. If no one’s tackled this yet, maybe I’ll put some time into it. It’s just a post processor in reverse, right? A pre-processor?
I’m going to go swear at Fusion for a little while I guess. Thanks for your time!

Gcode fluency is somewhat rare I believe, so your insight would be useful. I had to go look that up G41, but i’m relatively new to cnc. Typically the gcode generator handles the cutter compensation as a coordinate offset instead of G41/g42. It is a software setting for whether to cut inside or outside the circle and easel or fusion360 will let you pick. The arduino does not know what bit size is in the router and the way it is written doesn’t need to, so yeah. You can write in absolute coordinates though. The home spot on the maslow is wherever you tell it to be as long as it is a position the sled can move to, you can go from there. Webcontrol will take your absolute coordinates and make them relative to the home position on the machine. It can run in absolute or relative mode based on the gcode header. The g2/G3 recent improvements were for radius commands. The I/J commands have been functional for years.

The maslow doesn’t do any cutter compensation, many CNC machines don’t, they
leave that up to the CAM software. when I create the g-code manually, I adjust
for the bit size in my calculations.

what I think would be the most useful would be to implment G54/G56/etc and
replace the ‘define home’ mechanism that has Ground Control/Web Control
re-writing the gcode on the fly with setting the home position in the firmware
(and being able to have multiple positions defined)

The firmware in the arduino is very simple, and it doesn’t handle most of the
fancy g-code commands (as it turns out, a lot of the CAM software out there
won’t use them anyway)

we are trying to be grbl compatible, but are still a ways behind grbl.

David Lang

Why bother with 3D CAD, when Maslow is essentially a 2D machine?

Try QCad instead of Fusion. QCad really is free, and pretty old-school (which is why I like it). You could do your simple point-to-point napkin sketch on-screen, save it (as DXF) then use DXF2GCODE to convert the DXF to, er, G-code, and specify the tool size at that point. DXF2GCODE will produce the code that you want with the correct offsets.

I understand that GRBL is not going to ever understand cutter comp. What I am asking is if there is a front end that can convert my “human g code” into GRBL friendly (and Malow friendly) absolute coordinates. I would just compensate with absolute (g90) code and offset the cut line manually, but when you get into radii and other things, doing the math by hand is time consuming and would be a better task for a computer front end program.

I would love to see some more compatibility with traditional g code, whether that means I have to write my own converter or not. Using work offsets (g54, g55, etc.) would be a huge step in the right direction, but g41, g42, (cutter comp left/right) and maybe even a g13/g12 (circle pocketing) would help immensely for old school guys like me. The beauty of the cutter comp commands is that if your cutter is cutting under/over size, you can adjust it with a few keystrokes rather than rendering the g code again in its entirety and then cleaning it up. A 3/8" inch circular pocket in human g code looks like this:
g13 g41 p.25 i.1875 f30.
Now tell me what the code looks like when you render it with a computer. If your pocket is cutting small, you can just adjust the “p.25” argument to “p.24” and the machine will cut the hole .01 larger. When you have a string of xy components instead of a simple line of code, debugging and adjusting requires you to go to the computer again and render the code from scratch, generating another impossible to debug code which you will then run again and hope that it works.

As far as the limitations of the Maslow control unit, I have run an early eighties 8 bit Bridgeport in my younger years that boasted a whopping 64k of RAM that did not hesitate to understand cutter comp and had room to spare for ten work offsets and a graphic interface. Also: traditional g code use will allow you to enable smoothing with g184 which allows you to adjust smoothness and add a corner rounding value to all sharp corners. It would help quite a bit with the swing and swagger of the maslow. Fusion 360 will do all that, but only if you can find it and set it up correctly.

As far as most CNCs not understanding g code: bull. The only other machine that I have come across that did not understand human g code is my 3d printer, which also runs on GRBL and actually requires a computer to render the code because of the thousands of lines (layers) needed to print. This could be a function of which machines I have been in contact with, but it is rare to find one that does not understand a g41. What is rare is people who know how to use it. Most of the older machines will not run the bulky, computer generated code that comes from programs like fusion without experiencing hesitation caused by data starving when a flood of xyz components is plugged into it like when you radius a corner. Those same machines run a flawless and smooth arc when you give them the equivalent g02 code.

I do not want another program to draw things. Mostly, what I am looking to do is to avoid drawing it at all. My employer loves me because I can go from concept to code without adding two more steps in between. Maybe I’m the only one on the planet that can do that. I am quite possibly the only one who can do that who now owns a maslow. The maslow is strictly for personal use, but that doesn’t mean I want to be pokey about making things with it. That being said, I spent a late night learning Fusion 360 to draw and have made my first productive cuts. Damn this thing is slow. Is that really 30 ipm?

If you guys need input on g code, please feel free to reach out. I’m also a welder, carpenter, writer, and super-friendly guy with an astronomical IQ, so there isn’t much I can’t handle/figure out. Thanks for your help!

1 Like

Wait, so your employer loves you because you produce G-code without doing any CAD? Are all of your filing cabinets full of sketches on napkins? I can write G-code by hand, it’s not hard, however, even for my most trivial hobby project I’ll do a CAD drawing and save it as DXF (or I’ll write a program that produces DXF as its output). From that point you can produce G-code, of course, but having a CAD file lets you do a lot more.
I could rebut the points you are trying to make, but I don’t think you have a compelling argument.

Hahaha! Sorry. Napkin sketch=hand drawing. No data/graphic file. About fifty percent of the work I do is off of hand drawings, meaning that for me to use a typical CAM program, it would have to be drawn in CAD first. So yeah, my employer loves that they don’t have to use the CAD department for things like that. To be fair, I do have a few napkins with sketches on them in my filing cabinet.
I’m not a CAD guy, so I was hoping I could write some code the way I usually do and get the machine up and running while I got used to drawing things on CAD. I realize that I need to get with the times, and I’m in the process of learning the “new” way to do it, but I just thought there would be an easy way to convert my hand written code into something useful for the Maslow, without having to convert it all into absolute position code by hand. I was hoping someone out there had an easy answer for me. I see by everyone’s responses that you do not.

Andrew, no need to rebut anything. I didn’t even realize I was arguing. If I’ve offended you, I apologize. I don’t want to get off on the wrong foot around here.

I wasn’t offended. Just surprised. Genuinely. That’s no way to run a business.

Once you’ve tried CAD you’ll be surprised at how quickly you can create stuff and adapt it. Plus, I can’t see that your drawings can be very complex at all if you are coding them by hand. Skipping the step of making a tidy CAD drawing isn’t really saving you anything.

You could write your own converter, and in fact that’s what you will probably have to do. I can’t find any G-code to G-code converter software (i.e. read G-code, apply offset, write new G-code) probably because no-one needs it. All of the things that you want to do are done in CAM these days, so there’s no need to clutter up the machine controller with extra functionality.

Again, if you are doing simple 2D designs you should try something like QCad and DXF2GCODE. The workflow is simple, and you can streamline it easily by adding cutting information in the layer names. Fusion 360 does it, but it’s not free, and it has a lot steeper learning curve.

If you really want to punish yourself then you can convert your “human G-code” to DXF (there’s a tool for that), then run the DXF through DXF2GCODE and get DXF2GCODE to apply the offset. I would be really curious to know if that would do what you actually wanted, but I’d be horrified if you actually adopted it.

All good points. I will be sure to tell my employer that you do not approve of his efficiency. He’s heard that from me plenty of times before. That being said, I’m not building rocket ships here. A vast majority of my work is simple stuff, hole patterns, profiles, and cutting to length. To waste time in CAD with it is truly a waste. Even most of the things designed in house, with 3d models available, don’t even warrant me walking upstairs to annoy a CAD guy and get the files.

When I finished building my maslow, I intentionally had some simple projects in mind that would be simple to code. I thought about writing my own converter, but at this point, my time would be better spent learning a program to draw. Interesting thought on converting the “human code” to DXF, then to a “GRBL friendly code,” but yikes. I don’t see why it wouldn’t work and I may even give it a try for a laugh, but I would also be horrified if I was to adopt such a roundabout way of doing it.

Will probably try either QCad or DXF2GCODE. Would be nice to have something simple and quick on the control PC for parts that do not need a full 3d model. I feel like Fusion is overkill for what the Maslow needs anyway, both CAD and CAM. Thanks for your time!

I’ll second the writing gcode by hand in a machine shop is super useful, especially in a job shop or when you are making a bunch of quick one off parts. It’s a pretty different environment than doing wood routing where it’s almost always faster to do the CAD approach

I agree 100%. I’ve always been jealous of the flat plate guy (laser/waterjet operator) at work. He just loads a DXF, places it on the sheet, and hits go. Not so with my vertical mill.

When I started collecting pieces for my maslow, I knew that I wanted that ease of use and was headed that direction anyway, but I had hoped that it would understand my handwritten code so that I could get it up and running, giving me time to learn a CAD program while still being productive. When I found out that the Maslow wouldn’t understand things like cutter comp, I was hoping there was a simple conversion program to turn my handwritten code into something the Maslow would understand, but no such luck.

Instead, I had to skip right to the end game and now I have QCAD and DXF2GCODE installed right on the control pc, so rather than handwriting code for the simple stuff, I just draw a picture instead and run it through the DXF2GCODE converter. All in all, it’s a nicer front end than the waterjet at work, so I feel like I’ve done a solid job.

As for my handwritten gcode, I guess I’ll just leave it for the mill at work and recognize it as a talent that will soon be obsolete like driving a car with a manual transmission, having a conversation, or writing novels. Those are all things I will do until I die, whether technology has left them behind or not.

Bar, thank you for backing me up on handwritten code being useful in certain circumstances. I was starting to feel very lonely here.

Thank you all for your input and advice. I am up and running thanks to you guys!