Gcode commands to home Cohesion3D with endstop switches

I’m happy with Lightburn running my Cohesion3D board in my homebuilt 45W laser cutter using Smoothieware, but I have failure with USB comms freezing with nearly every computer I’ve tried. I thought that I could bypass this by saving the Gcode file and telling Smoothieware console to play the file.
This works except that the machine doesn’t know where home is. It has endstops sqithes at 0,0. I have looked at all the Smoothieware Gcode commands and googled a lot, and have not found a command sequence that will do the homing dance that Lightburn does when it connects to my laser cutter.

Have you tried $H?

I have tried $H and it goes to the home limits and generates an alarm and stops moving. G28X moves to the X=0 position, not to the endstop.
The Lightburn Home button causes the machine to go to the home limits, then move away a couple mm, then back to home limits, then back away. (I have set the finish position to be +2,+2mm).
I am guessing that this dance is a product of some fancy programming rather than a simple series of G codes.
So, is there a magic command that I am not seeing, or what?

I want to say for Smoothieware that LightBurn uses G28.2 to home. Have you tried that?

Yes, G28.2 goes into the limits and stays there.

If you’re saying this works from hitting the LightBurn button try turning on “Show All” in console and hit the Home button. You should see the command in the Console output.

Also, what build of Smoothieware are you running?

I found it. G28.2 XY is the command to use. Not G28.2
Yay!

This thread gives the command that LightBurn sends.

Ah, sorry. Forgot the XY part…

But more importantly, you need to sort out the USB issues. That’s not a tenable situation.

I’d love to sort out the USB issues, as I’m a hardware engineer, but I’m not keen on solving a thing that LightBurn folks should solve with some sort of timeout or whatever. The software just hangs in the middle of a cut. I don’t have experience working on such low-level USB failures. Maybe I should ask my fried Andy who debugs stuff like that for fun.

Not following how that would solve it. If the device is failing to communicate there’s not much LightBurn would be able to do about that. Timing out would allow you control but not save a failed job.

Have you tried changing your Transfer Mode to “Synchronous” rather than “Buffered”?

I’ve tried synchronous mode. I’ve tried many high quality, short USB cables. I’ve tried a Cohesion3D board and a Smoothieboard. I’ve tried five different Windows PCs. Only the laptop that I’m using now will work reliably with the Smoothieware/Lighturn combo.
My day job is an electrical engineer on big radiotelescopes. All of our comms software that connects the various computers together uses timeouts to detect and retry when a message gets lost. It’s not rocket science, but maybe it is.

1 Like

I was bummed about Arecibo when that failure happened. Couldn’t believe we’d just let that thing fall into disrepair. But how stoked are you about James Webb?

Can you describe the symptom you’re having in detail? If you’ve tried all those combinations then I’m thinking something else has to be at play. And if it’s affecting your USB connection I’m curious if it’s affecting anything else.

Could the issue somehow be environmental? Are you always testing in the same location? Could you possibly have a grounding issue with the controller and laser chassis? That could explain why you’re getting the problem in spite of all the changes. Ortur had an issue previously where static charges that were building up on the chassis during printing were not getting dissipated and travelled down to the controller causing a USB disruption. This would result in random but reliable disconnects and job failures. This was fixed through a grounding kit that Ortur provided.

LightBurn has all sorts of timeouts for various communications. I suspect the controller is not in a state where it can recover. What do you need to do in order to recover from a failed state? I suspect it’s not just enough to right-click devices for a reconnect but please confirm.

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