Just got an XTool S1. Not a fan of XCS, much prefer Lightburn. Managed to get most of it working but the Home and Print commands both reset the Z height (focus). I exported the Gcode and there is a command that sets the Z distance early on in the file. Delete that command and everything works as it should.
I’m not a gcode wizard, but isn’t a line starting with a semicolon a comment?
![]()
Well yeah, that’s kinda the point - I had to add the semicolon to get it to burn correctly. That G0 command was put there by Lightburn and it resets the laser focus to zero when it should be 14.13 (in this particular case).
I get it now … sorry about that.
![]()
I figured out what was causing the extra gcode that reset the z axis. In Device Settings I had selected “Enable Z axis”, thinking that would be necessary for the Xtool since Z is used for focus. That caused Lightburn to insert the extra “G0 Z0” line - not sure why, but that was my mistake I guess. I changed the Device Settings to not enable the Z axis and now I can run my projects directly from Lightburn without having to hand edit the gcode. However… I still cannot use the Home button… THE HOME BUTTON WILL RESET THE Z HEIGHT TO ZERO! Hopefully that will get fixed soon. Meanwhile I will have to remember to use “Go to origin” instead.
I also should mention - do not use the Focus macro if the laser is parked at the origin. The z-height probe on the Xtool S1 is not at the same Y position as the laser is. If you try to focus without moving the laser “down” a few mm, it will poke thru the bed and cause an error… this is when you appreciate that the focus probe is stuck on with magnets and does net get bent when you do this… ![]()
I have read Lightburn updates that say that the Home command no longer resets the z axis for the Xtool, but with the current firmware it definitely DOES reset it. I do not understand way LB does this since one has to do a Focus to set the z-height and it should remain at that value until changed by another Focus. What does it take to get this fixed, please?
Thanks,
Will
It took a lot, but it’s already fixed.
Lots of background information in this thread, and the post marked as the solution there also applies in your case.
I’d be interested to know why you added the G1 Z14.13 to the START SCRIPT in xTool’s setting. Can you explain?
I added that G1 in the Start Script when I was trying to troubleshoot my original problem. Now that hitting Play no longer resets the focus I removed it.
You say there is a post marked as the solution in the linked post, but I am not able to find it. A search for “solution” does not return any hits.
I did solve the problem of the focus being reset when I started a burn - by turning off “Enable z-axis” (contrary to what the instructions say) but I still find that Home resets Z to zero, putting the laser out of focus.
That is because it is “Solved”. That thread has 100+ postings, but I think you should be looking for mention of the “lbdev” file that should have come with your laser.
xTool does not play well with Lightburn, so sometimes a custom LBDEV file has to be created, and not by xTool. xTool could care less about Lightburn because they want you to use their XCS software instead. xTool will change things and then Lightburn has to figure out (on their own) what got changed. That takes time. And testing. And patience. And cooperation from xTool owners.
That is the way.
OK I get it now. That is a rather convoluted way to get to where one needs to be!!!
Following the instructions did not work, but inporting that lbdev file did the trick.
I also noticed that the new Focus button moves the laser so it is focusing on where the cross hair is… nice once you get used to it.
Seems like a rewrite of that post might be helpful for anyone else trying to sort this out.
In the meanwhile, thanks for taking the time to answer my questions.
Will
Thanks, @mikey.
I agree the .LBDEV should probably be mentioned at the beginning of the post.
I sent you the convoluted route with the “broken record” thread in an attempt to show some of the problems that had to be solved.
A bit logic! Unless you home X and Y only.
xTool uses a special M368 macro to focus Z, so a different logic applies here.
I don’t hold it against Will for having a rough start—on the contrary, he followed the manufacturer’s instructions and has almost fixed the problems himself.
We’ll probably make another effort to get the working device profile linked on their site.
if you mean “logical” - NO!!! the point is that the z axis is focus on the Xtool S1. The last thing you want to do is reset that after carefully doing a focus on what you are burning…
If we had better cooperation with xTool, then… But it is what it is.
Ok.
A. Maybe you can goto Console Window and enable Show all. Click Home in LightBurn Laser Window and see the code sent by LightBurn:
Then remove the part that references Z and create a Macro with the remaining code.
.
.
B. If the code is an “insane” M code that homes everything:
Home the laser.
Move the laser head to the center of the workbed with the arrows in the Move Window.
In Console Window type G0 X0Y0 (or the coordinates of the laser after homing) and press enter.
If it works create a Macro (Home after focus…) for that workaround.




