Skip to main content

Site Navigation

Your Account

Choose Language

These manuals will walk you through the BoXZY experience, from the first un-boxing to using your device for the first time. Please follow each numbered manual in sequence so that you don't miss any crucial information. After you complete 1.3 Using Your BoXZY, you'll be able to move on to the 3D Printing, Laser Engraving, and CNC Milling manuals.

91 Questions View all

Sample Laser Lines G-Code

I would like to exercise my BoXZY by drawing a series of laser etched lines using G-Code. I used Excel to generate something like this (there's a lot more, this is just the first handful of lines):

G0 X159 Y0 L50 G1 X160 Y1 L0

G0 X158 Y0 L50 G1 X160 Y2 L0

G0 X157 Y0 L50 G1 X160 Y3 L0

G0 X156 Y0 L50 G1 X160 Y4 L0

G0 X155 Y0 L50 G1 X160 Y5 L0

G0 X154 Y0 L50 G1 X160 Y6 L0


I haven't tried it yet, but the intent for each line is to "MOVE TO POINT 1, SET POWER TO LASER, DRAW TO POINT 2, TURN OFF LASER". Will this work? Do I need to break each G0 or G1 onto a separate line? Is setting the laser power to some value or zero the right way to turn it on and off?

I read a few posts about rapid moves versus interpolated moves. I don't quite get the difference or how BoXZY is "different" than other CNC machines. I assumed G0 (rapid traverse) was the right code for the MOVE TO parts and that G1 (interpolated move) was the right code for the DRAW TO part. If I want to go quickly and then control the rate, which codes should I actually use? And is it possible to interpolate laser power too?

Answered! View the answer I have this problem too

Is this a good question?

Score 1
Add a comment

1 Answer

Chosen Solution

I personally have G0 and G1 as separate lines. I don't know if stacking will create a problem but I copied how gcode appeared in the boxzy edit window and went from there. The lines with L0 will not burn anything, and I've found that L10 is too light to mark cardboard. Also, you haven't specified a speed rate, so it'll run at the machine default OR runs the risk of picking up numerical trash and moving suuuuper slow (I've had it happen, wont ruin anything but I didn't feel like being patient).

As a reference:

Speed vs Feed Rate, Laser

Speed (%), Feed Rate












Technically I've been told that G0 is for moving and G1 is for burning, but I've been using G0 for both as I didn't want any accelerations tacked onto my moves. Doesn't mean you have to do the same, mine has been having speed issues using G1 so I've had to stick with G0.

As an example, here's a square!

G0 X135 Y135 F600000

G0 X145 F1200 L100

G0 Y145 F1200 L100

G0 X135 F1200 L100

G0 Y135 F1200 L100

any line not containing a L# value wont burn, and the laser will turn off at the end. Hope this helps :)

Was this answer helpful?

Score 0


OK cool, so casting my example lines in your suggested format:

G0 X159 Y0 F1200

G0 X160 Y1 L50 F630

G0 X158 Y0 F1200

G0 X160 Y2 L50 F630

G0 X157 Y0 F1200

G0 X160 Y3 L50 F630

G0 X156 Y0 F1200

G0 X160 Y4 L50 F630

G0 X155 Y0 F1200

G0 X160 Y5 L50 F630

G0 X154 Y0 F1200

G0 X160 Y6 L50 F630




That looks fine, although I'm not sure you have to always use G0 as the G1 error has only showed up with my machine as far as I can tell. It would otherwise look like:

G0 X159 Y0 F1200

G1 X190 Y1 L50 F630

Also, the feed rate F60000 that I used isn't actually 60000, that's just the reference value the coders used so that boxzy would fetch a stored fast movement speed. 60000 would be nuts!

Otherwise, your code looks fine. Best of luck :)


Add a comment

Add your answer

James Osborn will be eternally grateful.
View Statistics:

Past 24 Hours: 0

Past 7 Days: 3

Past 30 Days: 7

All Time: 1,822