GRBL(_G81) - No Argument for Inches

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

GRBL(_G81) - No Argument for Inches

Postby quick61 » Sun Mar 24, 2019 5:22 pm

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
Posts: 1458
Joined: Fri Sep 16, 2016 9:28 pm

Re: GRBL(_G81) - No Argument for Inches

Postby mlampert » Sun Mar 24, 2019 7:39 pm

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

Re: GRBL(_G81) - No Argument for Inches

Postby quick61 » Sun Mar 24, 2019 7:43 pm

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
Posts: 848
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: GRBL(_G81) - No Argument for Inches

Postby roerich_64 » 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
User avatar
quick61
Posts: 3793
Joined: Sat Aug 24, 2013 2:49 am
Location: u.S.A.

Re: GRBL(_G81) - No Argument for Inches

Postby quick61 » Sun Mar 24, 2019 9:48 pm

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
Posts: 848
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: GRBL(_G81) - No Argument for Inches

Postby roerich_64 » Mon Mar 25, 2019 2:19 pm

:lol:

Also by me ;)

Ok, we can stumble together through python...
User avatar
roerich_64
Posts: 848
Joined: Thu May 21, 2015 7:00 pm
Location: Ostfriesland

Re: GRBL(_G81) - No Argument for Inches

Postby roerich_64 » Mon Mar 25, 2019 2:33 pm

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

Re: GRBL(_G81) - No Argument for Inches

Postby quick61 » Mon Mar 25, 2019 3:27 pm

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
Posts: 1458
Joined: Fri Sep 16, 2016 9:28 pm

Re: GRBL(_G81) - No Argument for Inches

Postby mlampert » Mon Mar 25, 2019 5:43 pm

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
Posts: 21384
Joined: Tue Mar 17, 2015 9:14 am

Re: GRBL(_G81) - No Argument for Inches

Postby chrisb » Tue Mar 26, 2019 12:09 am

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.