Change LightBurn G-code to mach3 g-code like from ArtCam

Hello, I have a question of great importance.
I have a CNC machine with a mach3 controller, which works well with ArtCam.
The diode laser turns on when the axis is -Z and turns off when the axis is +Z. The laser power depends on the spindle speed (100% = 24000, 10% = 2400)
Below I will attach 2 files, where one is a simple square layout and 2 other files are LightBurn with a GRBL-M3 controller and a file from ArtCam.
Please tell me how best to change the GRBL-M3 g-code to ArtCam g-code. Or maybe you have other suggestions?
I am ready to listen to everything
ArtCam.txt (497 Bytes)
LB.gc (449 Bytes)

Congrats and welcome.
You can create a Custom GCode device then edit the PP to your requirements.

This M3 S24000 is needed for the PP? to “enable”?

1 Like

M3 S24000 is the laser power which is 100%
and to turn on the laser you need the coordinates of the axis -Z (-Z0.1000), to turn off the laser +Z (Z0.1000),

  1. The laser is turned on and off along the z axis (-Z0.100 on, +Z0.100 off)
  2. The laser power depends on the spindle power. 24000 = 100%, 2400 = 10% of the laser power.
  3. The laser works well with g-code generated in ArtCam, but it is not convenient.
    Maybe you have some ideas?
1 Like

But with G0 ?

Your ArtCam code has the following Z:
G1 Z-0.2000 F1000
G1 Z-0.3000 F1000
In this case this is used to move the Z axis?

Did you edited the ArtCam.txt file? cause there are any G0 Z - …?.
.

  • Download then drag the below file over the Lightburn window to Auto-import and Auto-select the device. Check if the configurations are correct.
    Mach3_03MAR25.lbdev (424.9 KB)

  • Draw a simple square as a start ( don´t make Z passes for the test ), use Absolute Coordinates in Lightburn, save the GCode then edit and remove the Red circled lines.

  • Test and report back.

Hello, friend. The program works but a little incorrectly.
The laser turns on at -Z1.000 and immediately turns off, then it goes through the shape along the X and Y coordinates and that’s it.

I also add a cube from ArtCam.
where:
M3 S2400 - laser power (in Lightburn = 10% Power Max) (2400 = 10%, therefore 24000 = 100%)
G0 X0.0000 Y0.0000 Z1.0000 - place where the laser becomes
G1 Z-0.1000 F1000 - Z-0.1000(turns on the laser) F1000 is the plunge rate this side is constant everywhere (G1 Z-0.1000 F1000)
G1 Y10.0000 F2000 - F2000 (in Lightburn Speed(mm/min)) is the Feed Rate which sets the speed (mm/min) of the laser movement
sq artcam.txt (348 Bytes)

I am attaching a TXT file of a 10x10 mm square.
I also attach a file with two cubes 10Ń…10 where I change the Feed Rate (speed) on cube #1 the speed of the pawn is 2000, on cube #2 the speed is 1000
2 sq artcam.txt (524 Bytes)

Just updated the Device Mach3_03MAR25.lbdev in post #4 with the changes that I think will work.
Test with this file:
Mach3_2square.lbrn2 (3.7 KB)

  • Save the GCode and edit per the post #4 instructions.
  • Z is disabled for now…Keep it disabled! We are testing the device.
  • Be prepared to Turn OFF your machine if something goes wrong.

Hi, I understand everything)
I checked the code. the sequence is as follows, the laser turns on, goes down the Z axis, makes a point with the laser, then the laser immediately turns off and the laser goes along the trajectory of the squares. at the end it returns to the point x0 and y0. The situation is the same as with the previous square (

How? Z is disabled in the updated device!
Draw a square and post here the output with the ArtCam PP.
Draw a similar square and position in Lightburn with this device Mach3_03MAR25.lbdev (424.9 KB) and post here the gcode.

Hi friend, sorry I couldn’t answer for a long time, there were problems. I tried the code, deleted lines and left lines, changed the speed and the speed changes, but the laser itself on the Z axis does not turn on, I don’t know why(

I’ve also been a bit busy lately, but I need the above 2 files to see what we can do.

1 Like

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