GRBL(_G81) - No Argument for Inches

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!
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

GRBL(_G81) - No Argument for Inches

Post by quick61 »

Was looking over the post processors in Path after watching a few of sliptonic's videos and noticed that neither the grbl_post.py or grbl_G81_post.py have the option to turn on G20? (--inches) Was just wondering if this is intentional, like problems with GRBL firmware, or just hasn't been added yet? I'd almost be willing to give it a try, adding the option, though I really suck rocks at python... it could be good practice.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: GRBL(_G81) - No Argument for Inches

Post by mlampert »

No intention - I think it's just that nobody's needed it so far.
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: GRBL(_G81) - No Argument for Inches

Post by quick61 »

mlampert wrote: Sun Mar 24, 2019 7:39 pm No intention - I think it's just that nobody's needed it so far.
Shiny, then give me a week or two and I'll try to figure it out. ;) Maybe even submit it if it works.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: GRBL(_G81) - No Argument for Inches

Post by roerich_64 »

Hi Mark,

also it would be nice we could switch off / on mist / coolant before and after tool change.

BR
Walter
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: GRBL(_G81) - No Argument for Inches

Post by quick61 »

roerich_64 wrote: Sun Mar 24, 2019 9:24 pm Hi Mark,

also it would be nice we could switch off / on mist / coolant before and after tool change.

BR
Walter
Oh, now we're just asking for miracles. :shock:

Like I said, I suck rocks at coding and I'll be very lucky if I can figure this first thing out.

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: GRBL(_G81) - No Argument for Inches

Post by roerich_64 »

:lol:

Also by me ;)

Ok, we can stumble together through python...
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
User avatar
roerich_64
Veteran
Posts: 1465
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: GRBL(_G81) - No Argument for Inches

Post by roerich_64 »

Mark,

have you test to set the preamble with G20?
Last edited by roerich_64 on Tue Mar 26, 2019 4:19 pm, edited 2 times in total.
Die Liebe wird siegen, denn sie ist unzerstörbar :) ;)
User avatar
quick61
Veteran
Posts: 3803
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: GRBL(_G81) - No Argument for Inches

Post by quick61 »

roerich_64 wrote: Mon Mar 25, 2019 2:33 pm Mark,

have you test to set the postamble with G20?
No, but I don't think that would work. Take a look at linuxcnc_post.py - The raw path, which to my understanding is always in metric as FreeCAD is always metric internally, the Post Processor, when give the argument --inches, converts the metric units - both distance and speed, to inches and inch/minute.

My thinking is that maybe I can just hijack some of the code out of linuxcnc_post.py and get it working in the grbl post processors. Anyone that has written a post processor think that would work???

Again, I have only about 1/4 of a clue what I'm doing here... :?

Mark
This post made with 0.0% Micro$oft products - GOT LINUX?
mlampert
Veteran
Posts: 1772
Joined: Fri Sep 16, 2016 9:28 pm

Re: GRBL(_G81) - No Argument for Inches

Post by mlampert »

quick61 wrote: Mon Mar 25, 2019 3:27 pm My thinking is that maybe I can just hijack some of the code out of linuxcnc_post.py and get it working in the grbl post processors. Anyone that has written a post processor think that would work???
I haven't written the linuxcnc post processor, but I added the --inches option to the opensbp post processor, and your strategy is good! :D
chrisb
Veteran
Posts: 53921
Joined: Tue Mar 17, 2015 9:14 am

Re: GRBL(_G81) - No Argument for Inches

Post by chrisb »

quick61 wrote: Mon Mar 25, 2019 3:27 pm My thinking is that maybe I can just hijack some of the code out of linuxcnc_post.py and get it working in the grbl post processors. Anyone that has written a post processor think that would work???

Again, I have only about 1/4 of a clue what I'm doing here... :?
It most probably will work, I wrote the philips post processor based on a common ancestor. In the meantime the post processors are developed independently and have moved a bit apart, but they still follow the same structure.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply