GRBL new post processor with drill cycles G81..G83

Here's the place for discussion related to CAM/CNC and the development of the Path module.
User avatar
Gauthier
Posts: 73
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

GRBL new post processor with drill cycles G81..G83

Postby Gauthier » Tue Nov 28, 2017 2:33 pm

Hi all,

Because of GRBL limits (https://github.com/gnea/grbl/wiki#limitations-by-design), and that not all GCode sender program do the translation, I added the translation code between G81, G82 & G83 to the G0, G1 & G4 corresponding moves & pause.

Added 2 new options to the grbl_post.py :
--translate_drill : translate drill cycles G81, G82 & G83 in G0/G1 movements (default)
--no-translate_drill : don't translate drill cycles G81, G82 & G83 in G0/G1 movements

This new GRBL post-processor is attached here, any test and comments are welcomes :D

@++;
Gauthier.
Attachments
grbl_post.py
(15.89 KiB) Downloaded 389 times
crc1021
Posts: 1
Joined: Sat Nov 18, 2017 2:57 am

Re: GRBL new post processor with drill cycles G81..G83

Postby crc1021 » Sat Dec 30, 2017 3:10 am

I don't have much to say other than it was exactly what I was looking for and it worked great. Thanks.

Eric
georgevt
Posts: 9
Joined: Wed Nov 29, 2017 6:05 am

Re: GRBL new post processor with drill cycles G81..G83

Postby georgevt » Sun Mar 04, 2018 1:05 am

Thanks for the fix. Are there any plans to add this to the master branch? I noticed that the latest grbl_post.py has a different precision value (3 vs 4). And there might be other changes. It would be nice if your fix was merged into master branch so that other changes get automatically picked up.
User avatar
Gauthier
Posts: 73
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

Re: GRBL new post processor with drill cycles G81..G83

Postby Gauthier » Sun Mar 04, 2018 10:56 am

Thanks for the feedback,

In fact, only a few small changes have been made since my version:
- Update of the default value of the precision from 3 to 4 digits, the operations remains the same. You can use the "--precision" option to define what you want from FreeCAD.
- The others modifications concern the necessary corrections for the transition to Python version 3. Tey don't change the current functionalities with Python 2.x.

I will integrate these updates ASAP and then, I will propose a Pull Request.

For the moment, I'm working on a new version of GRBL working up to 5 axes on Mega 2560 with RAPMS 1.4, and a new interface for managing those 5 axes, so I do not have much time ... But I'm going to try anyway not to be too long on the post-processor.

@ ++;
Gauthier.
herbk
Posts: 1572
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

Re: GRBL new post processor with drill cycles G81..G83

Postby herbk » Sun Mar 04, 2018 3:00 pm

Gauthier wrote:
Sun Mar 04, 2018 10:56 am
For the moment, I'm working on a new version of GRBL working up to 5 axes on Mega 2560 with RAPMS 1.4, and a new interface for managing those 5 axes, so I do not have much time ... But I'm going to try anyway not to be too long on the post-processor.
That sounds very interessting, please keep us informed about it.
Gruß Herbert
polemidis
Posts: 36
Joined: Thu Feb 09, 2017 4:58 pm

Re: GRBL new post processor with drill cycles G81..G83

Postby polemidis » Tue Mar 13, 2018 12:08 am

Can I have a hint plz on how to use the new post processor? Sorry I have no idea about python. Should I run it somehow, or can I replace the default grbl that freecad 0.17 has??
User avatar
Gauthier
Posts: 73
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

Re: GRBL new post processor with drill cycles G81..G83

Postby Gauthier » Tue Mar 13, 2018 9:17 am

Hi,

You need to place this file (grbl_post.py) in <FreeCAD_program_path>/Mod/Path/PathScripts/post, replacing the old one or rename it.

@++;
Gauthier
polemidis wrote:
Tue Mar 13, 2018 12:08 am
Can I have a hint plz on how to use the new post processor? Sorry I have no idea about python. Should I run it somehow, or can I replace the default grbl that freecad 0.17 has??
chrisb
Posts: 19562
Joined: Tue Mar 17, 2015 9:14 am

Re: GRBL new post processor with drill cycles G81..G83

Postby chrisb » Tue Mar 13, 2018 1:34 pm

Gauthier wrote:
Tue Mar 13, 2018 9:17 am
You need to place this file (grbl_post.py) in <FreeCAD_program_path>/Mod/Path/PathScripts/post, replacing the old one or rename it.
Or you put it with the same name in the user's Macro Directory.

I am a bit unhappy with this architecture, because the individual modifications prevent updates on that very post processor. I will make a proposal for 0.18 how to change this, which should take into account that the PPs are very similar.
GeneFC
Posts: 1025
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: GRBL new post processor with drill cycles G81..G83

Postby GeneFC » Tue Mar 13, 2018 2:26 pm

chrisb wrote:
Tue Mar 13, 2018 1:34 pm
I am a bit unhappy with this architecture, because the individual modifications prevent updates on that very post processor.
I am not disagreeing, but I cannot understand the point you are trying to make. How are updates prevented?

Gene
chrisb
Posts: 19562
Joined: Tue Mar 17, 2015 9:14 am

Re: GRBL new post processor with drill cycles G81..G83

Postby chrisb » Tue Mar 13, 2018 2:49 pm

GeneFC wrote:
Tue Mar 13, 2018 2:26 pm
chrisb wrote:
Tue Mar 13, 2018 1:34 pm
I am a bit unhappy with this architecture, because the individual modifications prevent updates on that very post processor.
I am not disagreeing, but I cannot understand the point you are trying to make. How are updates prevented?
Rereading my post I have to confess that the statement given was very unclear :oops: . I give an example for what I actually meant: When a user wants to have a special tool change GCode in his linux_cnc he copies it and makes the changes. He either gives a new name to his personal post prcessor or he puts it in his local macro directory.
When sliptonic adds an improvement to linux_cnc it is well updated in the FreeCAD Path subdirectory, but the changes will not affect the locally modified copy.