Can multiple laser gcodes be merged or printed sequencially?

I have some wood tiles and on it I print a combination of words and a chess piece which are requested occasionally, I use different configurations for the words by tracing the letters border and the icons by filling the shape.

To make the job easier I’ve created multiple files with only the words and icons individually, so when is requested a bishop with the word “checkmate” I create the text gcode and print first the icon then the text.
Sometimes I get requested the same text and icons so I keep the gdcodes and print them sequentially.

  • How can I print sequentially both files automatically?
    After it does the icon I will start the text manually, currently I haven’t figured out a way to automate this. When the printer finishes the icon it put itself in the home position and I start the text.

  • Could gcode files be merged into one?
    I know the gcode instructions sometimes can refeer to relative coordinates and I’m guessing that copy-pasting the content from one file at the end of another would break something. I use different configurations for the gcodes and I need to keep the same laser power and speed each component is intended for.

I haven’t found a solution about it on the web, and the UI of the printer doesn’t show to have anything of what I’m looking for. I keep updated the printer to the latest firmware version.
My snapmaker model is A350T with the 1600mW laser module.

Thanks in advance for any solution. :slightly_smiling_face:

It depends on what software you used to generate the gcode. I think Luban uses just absolute coordinates, so you should be able to merge them. Even if it’s in relative, if you include the absolute start position in the merge, it should be fine. If you don’t mind uploading the two I can take a look.

You can create one Gcode file that has multiple different processes in Luban then just edit that file to change the pic and text as needed.
Or if you want to change the text or image in each file to a custom one, you will need to either create a separate Gcode for each different combination of pic and test, or use one of the multiple methods for assigning and recreating a start point for each job. (Jig, Co-ords etc).
Depending on exactly what you are doing.

This is a good solution. Another thing I’ve missed to communicate is that I have a lot of icons, not only the 12 unique pieces but I have multiple styles for each. Could this process be automated?

I know a bit of programming, I could attempt to write a script with python to generate the gcodes but won’t be the same result the Luban software would give. Luban doesn’t have automated scripts as far I could find. And testing in my condition could be time consuming because I have the machine installed in a workshop on the other side of the city with a bad computer I rarely use to correct the image to print.

I will evaluate any possibility to make the combination process easier and faster, probably other people have found themself in a similar issue like mine. I’ll keep looking.

I use the Luban software to create the gcodes, I know there’s others like LaserBurn but I’ve never used them because most of them requires to buy a license. I choosed to use the software the printer was inteded for (Luban).

Testing new software is a but slow for me, I’ve said it to another reply, I have the machine far away from me in a workshop and the computer connected to it is not in the best condition. The place gets dirty all the times. :sweat_smile:

You asked for some gcode samples, here in this link I share 2 labels and 2 icons: Unique Download Link | WeTransfer

Good news? Luban does indeed use absolute coordinates. Better news? It looks like just merging them worked fine. :slight_smile:

I took the ‘asd’ icon and text and merged them by removing everything above and including ‘start’ gcode from one, and the last ‘end’ gcode line at the bottom, and copy/pasting it before the ‘end gcode’ of the other. However; since everything I deleted was just comments, you don’t have to do that! It should work fine just copying one and pasting it to the end of the other.

And here’s the combined gcode that plots the above.

combined_icon_text_asd.nc (50.7 KB)

Just make sure to use the same origin selection when making your designs and you should be able to just copy one and paste it at the end of another and save as a new .nc file and go.

1 Like