LaserWeb / LaserWeb4-Binaries

Installers for LaserWeb4
GNU Affero General Public License v3.0
307 stars 57 forks source link

Gcode isn't Marlin friendly #21

Closed Mordiev closed 4 years ago

Mordiev commented 5 years ago

Hello Everyone! I just discovered this app today and tried to get it to work with my MPCNC running the Marlin Firmware.

Both of these issues are related to Settings > GCode

Issue #1 the On Off button for "Intensity Separate Line" doesn't seem to do anything.

Issue #2 the "Tool On" and "Intensity settings" don't generate usable gcode for Marlin. Examples below

Some details on my settings. please let me know if I missed something.
I have GCODE Generator set to "Marlin" GCode End set to M107 ;This is what will turn off my laser. Tool Off is also set to M107. Then before I generate the Gcode I have tried "Verbose Gcode" on and off.

Ok I need the program to generate Gcode that will look like this. G0 X### Y### F###; Travel to the starting X and Y at the travel feedrate. M106 S###; Turn the laser on at the desired intensity level G1 X###; Move some distance while burning M107; Turn off the laser before the next move. Or this could be M106 S0. Either option would work.

When I try setting Tool ON to "M106" I get gcode like this... G1 F###; Feedrate is on its own line. I'll have to double check but I don't think this works in marlin without it getting added to an actual X or Y move. G0 X### Y###; Travel to the starting X and Y M106; Turn the laser on at FULL POWER NOT the desired intensity level G1 X###; Move some distance while burning M106 S###; Adjust the laser to the desired intensity level; This happens AFTER the burn move aka too late.

So I tried to leave the Tool On setting blank and changed the Laser Intensity setting to "M106 S" That resulted in Gcode that looked like this...

G1 F###; Again not sure if this works to set the speed

; stripped: S0.0000; Looks like it is trying to set the laser to 0 for a Travel move but it Should have looked like this "M106 S0.0" G0 X### Y##; Travel move ; stripped: S###; Should have looked like "M106 S###" G0 X### Y###; Burn move ; stripped: S0.0000; Should have looked like this "M106 S0.0"

So I can't get this thing to produce marlin flavored Gcode. On top of that I tried all of these same combinations with the "Intensity Seperate Line" on and off and I never saw a difference in the Gcode it produced.

Please not that Marlin could use M106 S### to turn on a laser or M03 O####. It just depends on how it is configured. Then it would also use M107 or M05 to turn the laser off. But that detail really doesn't matter here.

cprezzi commented 5 years ago

It works ok for me. Just set "M106 S0" in the start gcode, "M107" in the end gcode, "M106 S" for intensity and activate intensity separate line.