No G64 in preamble when generating gcode for linuxcnc

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
DomCa
Posts: 33
Joined: Tue Nov 05, 2019 9:00 pm

No G64 in preamble when generating gcode for linuxcnc

Post by DomCa »

Hi there,

I am generating gcode for a 3axis CNC that is powered by LinuxCNC.
Today I ran a program with 3000mm/min and noticed VERY round corners. After some research, I learned that linux cnc will use the G64 mode as standard, if no explicit G61 or G64 P*** is given.

According to this: https://forum.freecadweb.org/viewtopic.php?p=435584
the G64 P0.025 should be generated in the preamble. However, in my case it is not:

Code: Select all

(begin preamble)
G17 G54 G40 G49 G80 G90
G21
(begin operation: Fixture)
(machine units: mm/min)
G54 
(finish operation: Fixture)
(begin operation: TC: 2mm_Endmill)
(machine units: mm/min)
(TC: 2mm_Endmill) 
M5
M6 T1 
G43 H1 
(finish operation: TC: 2mm_Endmill)
Is there any setting I have to check/set?

Thanks
Dom

My Version of Freecad is:

Code: Select all

OS: Ubuntu Core 20 (ubuntu:GNOME/ubuntu)
Word size of FreeCAD: 64-bit
Version: 0.21.31153 (Git) Snap 464
Build type: Release
Branch: master
Hash: 3f118b52bc62db6a5ca85daafaa2c021411e7177
Python 3.8.10, Qt 5.15.5, Coin 4.0.0, Vtk 7.1.1, OCC 7.6.3
Locale: German/Germany (de_DE)
spanner888
Posts: 326
Joined: Tue May 28, 2019 10:51 am

Re: No G64 in preamble when generating gcode for linuxcnc

Post by spanner888 »

I am wondering if the G64 is only added in a default preamble, which might get overridden if you then provide your own preamble, which I assume most users need to do to tailor setup of their machine.

Some quick testing now, shows that the default preamble, in this test for LinuxCNC, is replaced by what ever you specify. This can be seen in the gcode output preview window.

So maybe you can add the G64 to your existing preamble, or create one and add the G64.

I was going to try and determine what is going on from the code, but there are a LOT of Path code changes and postprocesser changes happening and I have lost track of which change in which release/dev version of FreeCAD, so will wait for those more up to date to comment .
DomCa
Posts: 33
Joined: Tue Nov 05, 2019 9:00 pm

Re: No G64 in preamble when generating gcode for linuxcnc

Post by DomCa »

Hi spanner888,

thank you for your tips. Frankly, until now I never needed a custom preamble.
I will try to build my own until I get some more info here.

Best regards,
Dom
Post Reply