January 9, 2016 at 8:20 am #5627
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!
Attachments:January 9, 2016 at 8:35 am #5629
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!
KarlJanuary 9, 2016 at 8:52 am #5630
Great! Looking forward to seeing the result.January 9, 2016 at 12:12 pm #5633
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.January 9, 2016 at 12:18 pm #5636
How do I embed pics inline with my text? I’m sure I’ve seen it done on here.
Oh well, for now, pics are attached.
Attachments:January 9, 2016 at 1:00 pm #5643
The etched picture looks great!January 9, 2016 at 1:04 pm #5644
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!January 9, 2016 at 1:08 pm #5646
DoneJanuary 9, 2016 at 1:35 pm #5650
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.
Ryan, how do I embed pictures in my posts?
Attachments:January 9, 2016 at 4:21 pm #5686
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?.January 9, 2016 at 6:40 pm #5687
Easiest way to embed is with something like imgur.comJanuary 9, 2016 at 7:41 pm #5689
Here’s a video of lasing my first picture. It couldn’t have gone smoother. Took 10 minutes with the image2gcode software – and that’s without ever having seen it before – and maybe 20 minutes to burn (that’s an estimate – I didn’t time it).January 10, 2016 at 6:21 am #5700
What feed speed did you use to run the picture through Leo’s updated program?
And Leo – you’re AWESOME. Thanks for coming to the community here and doing great stuff with it!January 10, 2016 at 11:44 am #5719
Alan, the feed rate on the picture was 1200mm/min.January 15, 2016 at 12:17 pm #5912
Great work guys. I missed out on this thread during my remodel. Hopefully I will get it done this weekend so I can start using my laser. I am interested in testing the image2cgcode software compared to the PicLaser software I purchased from J Tech. I hope to be able to start contributing to your efforts soon.
CurtJanuary 15, 2016 at 9:57 pm #5926
Anyone have an issue with the program Leo attached above? My antivirus (AVAST) scanned it and detected a threat and deleted it.
CurtJanuary 16, 2016 at 3:43 am #5927
Any antivirus program might consider an executable that opens and creates files “suspicious” but shouldn’t detect an actual virus. I just uploaded the executable to virustotal.com which is a free site thst will scan an uploaded file with 55 different AV packages(including Avast) and provide results. The image2gcode executable was only flagged by one obscure AV package called Qihoo 360 but passed on the rest, including Avast. Try it yourself if you’d like. I do plan to zip the source code today an upload it to the site but you’ll need Visual Studio to compile it.
Attachments:January 16, 2016 at 4:59 am #5929
I’m using image2gcode without issue.January 16, 2016 at 7:03 am #5931
Thanks guys. I will figure out how to whitelist it.January 16, 2016 at 7:53 am #5935
I have used the same photo and created gcode for both. My first impression is the I2G is cleaner code. The P2L does not add the spaces between lines and the “s” is lower case. The I2G sets the laser value in whole units (i.e. M106 s110) and in the P2L software it is a finer setting (i.e. M106 s110.3333). The lengths are I2G 831,106 lines vs P2L 2,238,620 which leads me to believe that the P2L will be more detailed. Also, bit images should end up about the same size (according to the software stated output image size)
I used to use Ultra edit a lot and it had a great compare function where you could have both codes side by side and synchronize the scrolls. Does anyone know how to do this in notepad++?
I will find time later to burn both images and share the results.
CurtJanuary 16, 2016 at 8:11 am #5938
I have a plugin for my notepad++ called Compare. I don’t know if it came with NP++ or I added it later. It’s on the plugin menu.January 16, 2016 at 8:34 am #5940
@Curt. I can’t speak for the original author but i think he used whole numbers for the power levels deliberately. These values (0-255) translate to ttl voltage levels of 0-5 volts.5volts divided by 256 gives you increments of about .02 volts. I’m not sure if the human eye could discern a shade of gray burned at 2.56256volts versus 2.56volts. If you conclude that it can then I’ll find the code where this value is rounded and make it so that it matches the JTP decimal placement. Keep us posted..January 16, 2016 at 8:43 am #5941
Actually , before you start you may want to see if your firmware even uses the decimal values. Front what I’ve read the reprap firmware accepts a real fraction as an S parameter for the M106 command but most interpreters only use whole numbers and ignore the rest. This is probably why the author choose to use whole numbers. It’s more compliant with gcode spec.January 16, 2016 at 9:24 am #5946
@leo69 I agree that the extra values after teh decimal point will no likely make any difference. I know the P2L will work with my firmware but I do not know if the firmware uses those values.
@karltinsly – Thanks for the heads up on the plugin. It was EXACTLY what I was looking for.
I need to head back to laying a laminate floor and I will do the comparative burns later. Also I set the feed rate the same and tried to adjust the settings so they test is as close of an apples-to-apples test I can do.January 17, 2016 at 10:18 am #5958
I finally was able to run the same image on both pieces of software. Both images are approx 1000x1000mm.
Feedrate – 1200mm/min
Min 0 & Max 255
The conclusions I came up with is the resolution on the PL software is a little better and that speed matters and it affects both a little differently. I do think the PL software is worth the money since it was only $40 but I do think with a little tweaking the I2G could work well.
I hope this helps
You must be logged in to reply to this topic.