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.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
User avatar
Gauthier
Posts: 123
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

GRBL new post processor with drill cycles G81..G83

Post by Gauthier »

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 1218 times
crc1021
Posts: 1
Joined: Sat Nov 18, 2017 2:57 am

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

Post by crc1021 »

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

Post by georgevt »

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: 123
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

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

Post by Gauthier »

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
Veteran
Posts: 2657
Joined: Mon Nov 03, 2014 3:45 pm
Location: Windsbach, Bavarya (Germany)

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

Post by herbk »

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

Post by polemidis »

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: 123
Joined: Fri Jul 04, 2014 10:00 am
Location: Audenge, France

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

Post by Gauthier »

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

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

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

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

Post by GeneFC »

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

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

Post by chrisb »

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.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
Post Reply