Sequential Serial Numbers


I’m looking for an easy way to increment serial numbers on a batch of parts that I’m making. I came across the link below on YouTube for a Haas mill but was wondering how to do this on a Carbide3d machine. Has anyone gone down this road yet?

(Neil Ferreri) #2

GRBL doesn’t have anything like that built in. What CAD/CAM tools are you using?

(William Adams) #3

How many do you need?

Do you want to machine them one at a time or in batches?

If one at a time, I’d suggest making a template .c2d file, dividing it up into sections before the number and after the number then create a list of the desired numbers and stitch together multiple copies of the file, one for each needed number using a script.


Thanks for the replies guys. I’m using Fusion 360 and need to make about 100 parts. I have a jig set up to cut them in batches so the scripting method could work if there aren’t variables built in GRBL. I was hoping to use the same g-code for all of them but can use a work around it that’s not possible.

(William Adams) #5

No, Grbl doesn’t do variables — if you make files you might be able to use Gsharp though:

(mikep) #6

I had to do this for a set of 15 or so items. I used f-engrave to make a toolpath for the SN:xxxxx . text for each one. Loaded one at a time and just ran a toolpath on each part. Worked ok for a small number. f-engrave doesn’t have a good command line, so I don’t know that it would be tolerable for 100.

(Neil Ferreri) #7

Are you modeling the “batch” in Fusion and running one file? Did you pattern the gcode or are you just running one at a time and resetting your zero each time?
Fusion 360 had a pretty powerful API…I wonder if it could be used to manipulate text like that.


I patterned the g-code in Fusion so that I can keep one zero, run a batch of parts, then load the next batch and run the same code again. Right now I have a second program that I run to engrave the serial numbers and the engraving program has to be unique to each batch. I’m trying to find a better way but if G47 isn’t available in Carbide Motion, I’d probably need to look at other controllers but I’m not sure if I have the time.

(Daniel Story) #9

I don’t think G47 is a “common” g-code word, I see it referenced as “G47: Axis offset double increase” from other sources. HAAS is using it as an engraving function instead?

While CNCjs supports macros, documentation is lacking (non-existing) on what it supports. Doubt it supports the functionality of this script for example (, if statements and goto. However @WillAdams suggestion of GSharp ( might support interpreting the G-code script (slight tweaking may be required).

(Neil Ferreri) #10

The controller won’t matter if it’s grbl based…grbl doesn’t support the the generation of g-code on the fly like the video you linked.

I think this is how I’d do it.

(system) closed #11

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.