Custom Gcode Size

Not sure what I’m doing wrong but I have a linuxcnc setup with custom g-code so it will use Q power along with M62/M67. When I create a gcode file it outputs a file that is much larger than my lightburn file. A 400mm text ends up being 14000mm? I’ve checked the rotary and it is not on. When I use the standard linuxcnc device the output is correct (but not using Q power).

Hi @Dunnr

Could you try exporting a simple 100 × 100mm square using both the standard LinuxCNC device and your Custom GCode device, then attach both GCode files here?

Please also share screenshots of the Dimensions/Units and Custom GCode sections under Laser Tools → Device Settings.

This should help us determine whether the coordinates are being scaled incorrectly during export or interpreted differently by LinuxCNC.

Dominic - thanks for your reply, I did check 100x100mm square and it gave good results.

G0 X-100Y0

;Layer C00

G1 X-100 Y-100 M67 E0 Q20 F6000

G1 X100 Y-100 M67 E0 Q20 F6000

G1 X0 Y100 M67 E0 Q20 F6000

G1 X-100 Y0 M67 E0 Q20 F6000

;return to starting pos

G0 X100Y0

Attached is gcode for some lettering which is ~200x43mm as per snip below

I copied the code into excel and added up the x/y moves (column 1/2) and as you can see it seems to grow beyond my machine limits:

Code Column1 Column2 Column3 X Y
G1 X-146.45 Y0.74 M67 E0 Q20 F6000 -146.45 0.74 -146.45 0.74
G1 X11.14 Y-23.834 M67 E0 Q20 F6000 -135.310 -23.094 11.14 -23.834
G1 X-135.31 Y-0.74 M67 E0 Q20 F6000 -270.620 -23.834 -135.31 -0.74
G1 X-0.93 Y-24.574 M67 E0 Q20 F6000 -271.550 -48.408 -0.93 -24.574
G1 X-0.443 Y-0.014 M67 E0 Q20 F6000 -271.993 -48.422 -0.443 -0.014
G1 X-0.435 Y-0.073 M67 E0 Q20 F6000 -272.428 -48.495 -0.435 -0.073

…

G1 X0.252 Y0.356 M67 E0 Q20 F6000 -12752.529 -1349.542 0.252 0.356
G1 X0.313 Y0.304 M67 E0 Q20 F6000 -12752.216 -1349.238 0.313 0.304
G1 X0.366 Y0.242 M67 E0 Q20 F6000 -12751.850 -1348.996 0.366 0.242
G1 X0.412 Y0.171 M67 E0 Q20 F6000 -12751.438 -1348.825 0.412 0.171
G1 X0.45 Y0.091 M67 E0 Q20 F6000 -12750.988 -1348.734 0.45 0.091

Here are some snips from device settings, hopefully it is something simple that I’ve entered inproperly…

Thanks, Rob