Usb serial protocol of Repetier vs Marlin firmware

A little background first: I have an old Chinese JSM40 Co2 laser that I removed the proprietary parallel port equipped controller and replaced with a Mega 2560 and RAMPS 1.4 that’s flashed with the latest Repetier firmware for laser mode and it has a smart 128x64 LCD with SD card. No camera yet and no Z axis.
I’m using an HP Ryzen 5 laptop with Windows 10 Home to run it,

I do have a successful connection between Lightburn and my laser.
I am trying to get Lightburn to run a g-code program that I verified was working in Repetier Host to my laser but when I try to run it in Lightburn, the laser will get about 10 seconds into the program and stop after homing correctly and positioning to the program start position and making one cut. I selected Marlin as the device since that is the closest to Repetier that I can find (GRBL doesn’t work) and I set its parameters to as generic a setting as possible. BTW, Repetier uses S255 M3 to arm the laser and any G01 will fire it after those codes. An S0 or G0 stops firing it while a M5 will stop and disarms it. The code is guaranteed correct as I have run it in Repetier Host perfectly many times as a test.
I think there is a buffer incompatibility with Marlin vs Repetier firmware in the protocol maybe as I can move the laser using manual control in Lightburn. I really like the “all in one” of designing and sending in the same program if I can get it to work correctly. I have also tried to create a new program with a raster file and it worked the same as running a G-code file as it would stop running the file a few seconds after starting it. Do I need to edit a script or C+ file or wait for a Repetier device to be created for my laser? I could flash to GRBL if I had to but I like the LCD and SD card functionality that Repetier gives me. Maybe flash Marlin if it supports smart LCD and SD but I hope to get what I have to work first
Also, can I edit the G-code directly in Lightburn?
Thanks in advance.

Marlin has only recently added proper support for lasers - It’s a bit like extruding for a 3D printer, in that it needs to be dynamically adjusted based on the speed of movement of the head, but for lasers it happens much faster, so a typical 8-bit controller can’t keep up, unless it’s doing simple vector cuts or engraving.

LightBurn pushes the communication to the target really hard, and ‘knows’ what the buffer size of each target device is so it can do this. If the Repetier firmware has a smaller than 128 byte serial buffer, it will overflow when LightBurn is streaming to it, and fail.

Thank you for the reply.
My laser is simple on or off. It doesn’t use PWM for rastering and I’m ok with that so I was hoping to get Lightburn to control it. I can use Repetier but I can’t generate Gcode for it in the app so the toolchain is a long process. Can I edit a config file somewhere to adjust buffer size or is it in a compiled binary file?
Thanks again for your help.

Unfortunately it’s compiled into the application. I’ve considered making it a setting, but people have a nasty habit of touching those without knowing what they do, and it’s the sort of thing that quickly becomes a support nightmare.

You should be able to save GCode from LightBurn and run it from any GCode sender. Do you know how big the receive buffer is in the Repetier firmware?

From what I can gather at Repetier’s website, the serial buffer size is 127 bytes but they also say anywhere from 63 to 127 using Fletcher checksum and the stop bits set to 1 and parity of none. They claim either ASCII or binary can be used but prefer binary. That’s all I know at the moment.
I have used Inkscape (not so stable it seems) extensions to write code and execute in Repetier Host but It’s not my favorite method. I much prefer an all in one solution.
Thank you for your help.
If you can recommend a setting that might work or add a Repetier device to your list, I would be most happy, else I may need to flash to Marlin.

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