Easy way to get path to grbl LASER?

Here's the place for discussion related to CAM/CNC and the development of the Path module.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
OldMicroguy
Posts: 7
Joined: Tue Feb 16, 2021 1:02 am

Easy way to get path to grbl LASER?

Post by OldMicroguy »

I've been working on learning FC, it's different, that's for sure. Mostly I'm getting along.
I've been doing some part drawings with sketcher and Part Design WB. And then using the Path WB to get some gcode to my little 1830 CNC. The machine is lacking (too much play, but an upgrade is in the works).

But I'd like to burn a "sketch" on some some work pieces, so I know where cut lines go, maybe part outlines, etc.... more or less a way of double checking my work. Basically, just burn parts of the sketch (much like a Path job). Instead of a milling bit, it would know there's a LASER in there.

So is there an "easy" way to turn a Part Design into something LASER appropriate? That LASER just goes to town burning stuff if the machine thinks there's a drill bit in there. :oops: I saw another post about "reversing the spindle". Haven't tried that, not sure how/why that would work. I did see another post about upgrading the Path WB to work with LASERs, I really look forward to that one.

As a side note, I did modify Sliptonic's grbl post drilling script a little bit. Seems maybe the newer python 3.0 doesn't like a few things. All I could manage is adding parenthesis where it complained. I still have to cut the gcode examination window code and past that into the actual output file as the post processor doesn't save the actual code, just an empty file. Not a problem, still works for me. (so yeah, learning python is on the list of stuff to do/learn, if I can manage to put any more stuff in there)

OS: Windows 10 (10.0)
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.19.24054 (Git)
Build type: Release
Branch: master
Hash: ed873038025277f220dfaa058599a0dfbb435835
Python version: 3.8.6
Qt version: 5.12.5
Coin version: 4.0.0
OCC version: 7.4.0
Locale: English/United States (en_US)

Tanks in advance.
chrisb
Veteran
Posts: 54288
Joined: Tue Mar 17, 2015 9:14 am

Re: Easy way to get path to grbl LASER?

Post by chrisb »

Moved to Path forum.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
keithsloan52
Veteran
Posts: 2764
Joined: Mon Feb 27, 2012 5:31 pm

Re: Easy way to get path to grbl LASER?

Post by keithsloan52 »

Think there are ways to output a sketch as DXF and also SVG. Are they a possible route for you?
OldMicroguy
Posts: 7
Joined: Tue Feb 16, 2021 1:02 am

Re: Easy way to get path to grbl LASER?

Post by OldMicroguy »

Pretty sure that would work. I just looked at that, and didn't see anything, but went off on something else and haven't gone back to try it yet. I did see some SVG items under one of the Draft or Drawing WBs, but couldn't get this sketch over there, easily (think redraw from scratch).

I really like FC, but so far I'm mostly a one tune band, Part Design and Path.

I guess, basically just "print" the drawing with the LASER.

That would bring up an issue with the LASER WB if it's created, such as are you trying to just draw with it or actually cut a material with it. I guess that could be fixed with something like a "time on product/power" setting. Fast moving/lower power vs. slow moving/higher power control. Part of that would have to be up to the end user to know their LASER and setting.

Thanks for the suggestion, I'll look at that again.

Ok, looked again. So far, no joy.
Most of the "export" functions seem to want to give me a gcode file, as if it's "exporting" the path job or something.

If I use the built in print to PDF function, it seems to print actual size, and I can't seem to scale it. So part of the print is off the page.
Unless I use the print preview function to set it up, just "print" does what it wants, preview/print, allows you to set it up some.

I can use Microsofts built in "print to PDF". That will give me the whole drawing on a page. But I'm not sure about scaling yet, Does it print out full scale? No idea.

Plus I get all the information on the drawing, the helix path, the tool path from orgin to milling point etc... I'm sure I can turn most of that off though.

Otherwise, I think I could import the PDF into something like InkScape and convert to SVG and then back to gcode (or leave as is and use the graphic LASER burner, which doesn't like the milling gcode output)
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: Easy way to get path to grbl LASER?

Post by GeneFC »

OldMicroguy wrote: Tue Mar 23, 2021 1:17 am I saw another post about "reversing the spindle". Haven't tried that, not sure how/why that would work.
I know nothing about laser processing, but I remember that someone mentioned the reversed spindle.

Standard spindle commands are M3-forward, M4-reverse, and M5-stop.

Someone said their laser needed an M4 command, and the suggestion was to use a "reverse spindle" command in the Path operation. No extra programming needed. Simple as that.

Gene
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Easy way to get path to grbl LASER?

Post by sliptonic »

Lasers aren't as standardized as 3D printers and CNC mills. Some work from gcode and some work directly from dxf or svg. I think maybe laserweb can do this too.

For the first kind, you just need to customize your postprocessor. My laser runs like this using a smoothieboard. I have a set of job templates and a slightly tweaked smoothie_post.py to output exactly the gcode I want.

For the second kind, check out the dxf postprocessor for Path. This will output a DXF file where each operation in the job becomes a layer in the dxf. It should be ideal for producing a dxf that's easy to use in the laser control
OldMicroguy
Posts: 7
Joined: Tue Feb 16, 2021 1:02 am

Re: Easy way to get path to grbl LASER?

Post by OldMicroguy »

Thanks, I'll look at the DXF method.

I tried the reverse spindle thing, and it didn't do anything. Not that I could tell, still LASER ON, LASER OFF when you get down to it.
OldMicroguy
Posts: 7
Joined: Tue Feb 16, 2021 1:02 am

Re: Easy way to get path to grbl LASER?

Post by OldMicroguy »

OK, I did look at the DXF output. I did get an output, but nothing (so far) that I can use.

The only program I have that I know of that imports DXF (PCB program), didn't like it (nope, Inscape didn't seem to like it either) . I'll download something else and see if I have better luck.

But my 1830 CNC machine upgrade came today (yay! (metal frame instead of (boo!) plastic, boy, what a bonehead purchase that was...)). So I'll be busy with that for a couple days. (built a limit switch input board, now's a good time to test that, etc...)
User avatar
sliptonic
Veteran
Posts: 3460
Joined: Tue Oct 25, 2011 10:46 pm
Location: Columbia, Missouri
Contact:

Re: Easy way to get path to grbl LASER?

Post by sliptonic »

I guess I still don't understand what you're working with. You say grbl Laser but I'm making the assumption that you're talking about LaserGRBL.

I don't know this software but according to the website it's a sender designed to communicate with a GRBL controller. It looks like it works with gcode natively but can also convert an image into raster gcode itself.

If I'm on the right track, then you just have to generate correct gcode.

Again, looking at the website on the configuration page it appears that the LaserGRBL defaults to PWM control of the laser power via the S word of the gcode with M3/M5 turning the beam on and off. That's pretty typical. I don't know what the valid range of S values is for your machine. It might be 0 - 100 or something else. Assuming it's 0-100% The beam would turn on full power with M3 S100 and turn off with M5.

So you'd just configure a Path Job using the grbl post processor. You'd create a 'tool' to represent your laser beam and set the diameter to the typical kerf that the beam cuts...maybe 0.1mm. Then create a tool controller and set the feed rate to something appropriate and the spindle speed to 100.

Then create a profile of your sketch or shape.

Post process it and feed the gcode to laserweb. I'm skipping over a lot of parts but that should get you in the ballpark.
OldMicroguy
Posts: 7
Joined: Tue Feb 16, 2021 1:02 am

Re: Easy way to get path to grbl LASER?

Post by OldMicroguy »

My apologies, I'm being a real bonehead again. My brain got stuck on getting "burning the sketch/part" out of path.

When you're right (and it's obvious now), I should be using LASERGrbl and not GRBLControl (Candle).

I was so focused on the part making aspect of it and have only recently powered up the LSASER and tried out LASERGrbl. (that's when the idea of burning the part outlines came to me)


Looks like I have the new (all metal yay!) CNC up and running (mostly, bad proximity sensor/limit switch). So once I get the LASER powered up again (different mounts, incompatible, reason to buy a more powerful one Yay!) I will try your suggestion and see what comes of it.

Does sound like it should work a lot better. Sorry for the confusion.
Post Reply