Modification to the GRBL Postprocessor

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
ModuloFS
Posts: 69
Joined: Tue Dec 08, 2020 9:57 am

Modification to the GRBL Postprocessor

Post by ModuloFS »

Hello,

i have slightly modified the grbl postprocessor and attached it to this post (grbl_modified_post.py) I have done two changes:

1. Updated the behaviour of the modal flag
To safe UART bandwith and computing power of the grbl controller, you can activate the modal flag. This suppresses modal commands if they are already sent. Up to now it suppresses the G0,1,2,3 commands but not the feed rate command. I changed this and only write the feed rate if it is changed.

2. Added a new comment feature for the tool change
I am using FluidNC (https://github.com/bdring/FluidNC) as grbl controller together with gSender (https://github.com/Sienci-Labs/gsender) as the GCode sender. gSender is outputing the comment after a M6 tool change command to the UI. To get a more readable UI advise during a tool change i changed the postproccessor to write the tool commend in the same line as the tool change command. For example it looks like this: M6 T12 ;3.175mm_Endmill_straight
You can activate this option with the flag "OUTPUT_TOOL_COMMENT" set to true.

i have marked my changes with the comment: #Modified by ModuloFS

If you have any comments or see any errors in the postproccessor, I would be very grateful if you could let me know.

Thank you!
Attachments
grbl_modified_post.py
(26.52 KiB) Downloaded 34 times
Post Reply