Showcase: our adapted LinuxCNC 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
luto
Posts: 1
Joined: Mon Feb 06, 2023 9:21 am
Contact:

Showcase: our adapted LinuxCNC postprocessor

Post by luto »

Hi everyone!

We were prompted to post our adapted LinuxCNC postprocessor to the forum. Our CNC machine and/or the LinuxCNC version we're using doesn't quite like the default GCode FreeCAD is generating. So we had to roll our own :)

You can see it here: https://github.com/Metalab/freecad-cnc-postprocessor

Quick summary of changes (check the commit log for details):

The tool changing code doesn't work at all for us since a) we don't have a tool changer, and b) we need to start our spindle slowly:

Code: Select all

(begin operation: 3mm_3schn_VHM001)
(machine units: mm/min)
(3mm_3schn_VHM001) 
M5
M6 T2 
G43 H2 
M3 S24000 
(finish operation: 3mm_3schn_VHM001)
Instead we're doing this:

Code: Select all

M3 (turn clockwise)

(0U/min => 24000.0U/min)

(=> 6000U/min)
S6000
G4 P60.0
(=> 12000U/min)
S12000
G4 P60.0
(=> 18000U/min)
S18000
G4 P60.0
(=> 24000U/min)
S24000
G4 P60.0
The code also generates correct changes of spindle speed, like if you'd do a dive operation or final pass at a different speed.

The fixture / setup block is a rather weird change. FreeCAD does this:

Code: Select all

(begin operation: G54)
(machine units: mm/min)
G54 
G0 Z6.000 
(finish operation: G54)
Which places the tool very close to our work surface. We'd like it to be more far away for safety during run-up. So we're dropping that bit. The following operations move it to the correct position close to the work piece anyway.

Except for a few smaller changes - that's it. Feel free to ping us here with any questions.
stéfan
Posts: 16
Joined: Sat Feb 12, 2022 10:56 am
Location: Brussels

Re: Showcase: our adapted LinuxCNC postprocessor

Post by stéfan »

very helpful, thanks
Post Reply