Yeah I mentioned that earlier. M106 and M107 are the fan control M codes. I don’t know what all the G1 X0 Y0 commands are sprinkled in for. Makes no sense. I’m just going to mod the code to use “M106 S” in place of just “S” and to replace the M05 at the end with an M107.
I’m not sure why all the commands were for x0 y0, but that is the format the gcode needs to be in - for example, G1 X99 Y45. I think any line that has movement has to have the G1 at the beginning, and spaces between the coordinates.
Sorry guys. My old laptop is slow as molasses and needed a bunch of windows updates. I decided to play xbox to kill time and kill time I did:) I just finished the code mods. Karl, I went ahead and added the G1 codes before the coordinate moves but I don’t think the white space is necessary. Please test and if this doesn’t work I’ll add the whitespace in too. Good luck all! Keep me posted.
The generated code will look like this:
M106 S0
Leo, thanks for making those changes! I tested out some of the lines using the manual control window in Repetier Host, and it looks like the white space between the coordinates is necessary. Also, the M106 Sxxx needs to be on its own line. I don’t know if it needs to precede or follow the coordinates.
I’m looking forward to trying this out. Like Ryan said, thanks for all your work on this! You’re adding value to the MPCNC for all of us.
Ok I’ll work on it later. Are you sure this will do it? Have you tried sending these commands individually with a gcode sender? Did the laser respond to the M106?
Thanks for the code clip Karl. You’re right, with all the newline and whitespace requirements it would definitely require regex to parse through a gcode file. I didn’t realize Marlin was so picky about whitespace and newlines. Most interpreters ignore it because all the extra whitespace adds up to more bandwidth when transferring files but it does look cleaner.
The changes you need were a little tougher to make and I had to create a new function to handle the gcode and mcodes separately. I think it works ok and I did a quick test with both the horizontal and diagonal scanning options as well as the outline option .The resulting code looks like what you posted. I changed the title bar to call this an MPCNC-Jtech mod because I don’t want the original author getting hassled over any bugs that I may have introduced.
Please test and let’s follow up for everyone’s benefit. I’m happy to be a part of this…let’s burn something now!
So awesome that you’ve put in the effort for this - thanks to both you and villamany for the software.
I just got my driver current set, so I’m getting close to actually being able to burn something worthwhile. I am going to run a picture through your modified program so it will be ready when the machine is!
The image2gcode picture came out better than I ever expected - very nice, indeed! The black and white logo, which I did with Laser Etch, is over-burned. I’m not sure what I need to tweak to fix it, yet. Lower power and/or faster speed, I imagine.
All in all, I am very happy with my initial burns. I will edit some video and put it up later, but for now here are some pics:
Here’s the laser on its quick release mount with the target line lasers, cooling fan and terminal board for prototyping the connections.
The whole thing’s a bit of a mess, until I get the bugs worked out and then I can wire it up properly.
Here it is, lasing its first picture.
This was the first try ever at burning a picture - came out great! I used Leo’s modified version of image2gcode. Highly recommended! Thanks, Leo!
This is the same logo I’ve cut multiple times with a router at different sizes. Something is wrong with this burn. I’ll try speeding it up and see what happens.
Looks great Karl.From here it’s just minor tweaking of power, focus, and feedrate for best results but the grayscale pic looks good.
Ryan, now that Karl has tested the software, can you remove the non- working version from a few posts back? I don’t want anyone to download it if it won’t work with the mpcnc firmware. Thanks!
Doesn’t it! And that was the very first try - for me, and for Leo’s modifications to villamany’s great program!
I re-ran the black and white logo through LaserEtch at 1000mm/min and it came out much better. Apparently the default is 200mm/min, which is way too slow, and I would have changed it had I noticed the first time. I wonder how fast I can push it and still get good results.
So are you still planning to add a laser to your machine? If so, will it be Jtech or will you buy a Nichia 2.8w laser module and use a generic driver? I’m asking because I’d like to see more “poor man’s” solutions for an MPCNC laser add-on. If you’re planning to do this and document it then that’s awesome but if not then I’ll try to get it done. Only thing is that I don’t use Ramps on my MPCNC so I’d be able to demonstrate how good/equivalent the cheaper 2.8w laser works but wouldn’t be able to create a how-to for wiring,software, etc… What do you think?.