GCode has wrong post-processor and units

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
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

GCode has wrong post-processor and units

Post by micksulley »

OS: Linux Mint 19 Tara
Word size of OS: 64-bit
Word size of FreeCAD: 64-bit
Version: 0.18.13959 (Git) AppImage
Build type: None
Branch: master
Hash: 2f18182b6dff87f8857787c854e39ca4d441f993
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
OCC version: 7.2.0
Locale: English/UnitedKingdom (en_GB)

Just got some strange results on my CNC, on investigation the generated gcode is wrong
In Preferences
Units = Standard (mm/kg/s/degree)
Post Processor selection just has grbl checked
This is the start of the gcode generated -

;Exported by FreeCAD
;Post Processor: centroid_post
;CAM file: /home/mick/Documents/Drawings/BaseBoard/BBTest3.fcstd
;Output Time: 2018-07-26 18:59:40.460240
G90 G80 G40 G49
;T1=T1__3mm
;T3=Default_Tool
;begin preamble
G53 G00 G17
G20
;begin operation

which has the wrong post processor and G20 which is inches

This has worked previously, but I recently ungraded from Mint 18.3 to Mint 19, which did cause a library issue with FC. I have run from a terminal and it doesn't show up any errors.
Just tested it on my laptop, which is still on Mint 18 and I see the same problem there, so it is not a Mint problem.

I have also tried it on FC installed from the repository with the same result, so not an AppImage issue.

Any ideas?
Mick
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: GCode has wrong post-processor and units

Post by micksulley »

I have just opened a drawing that worked previously, run simulation and post process and it generates the correct gcode.
Am I missing something here? Don't understand why my new one doesn't work. I have attached it.
Attachments
BBTest3.fcstd
(28.6 KiB) Downloaded 26 times
GeneFC
Veteran
Posts: 5373
Joined: Sat Mar 19, 2016 3:36 pm
Location: Punta Gorda, FL

Re: GCode has wrong post-processor and units

Post by GeneFC »

Your FC file is calling for the centroid postprocessor. The hard-coded choice in the centroid postprocessor is G20.

Select the correct postprocessor, and all should be back to normal.

Gene
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: GCode has wrong post-processor and units

Post by micksulley »

Hi Gene,
I've done a bit more investigation, started from scratch with a new file and it worked fine. I don't understand what went wrong the first time.
When you say select the correct post processor, the only one checked in preferences is grbl, but the problem file generates centroid. Is there an option to select a different one?
I have just tried setting preferences to have many post processors, but when I generate gcode the problem file still generates centriod, the new file generates grbl, nether of them give me an option to select a different one.
Does my problem file work for you?
By creating a new file I am able to get around it, but I would like to know what caused it.

Thanks
Mick
chrisb
Veteran
Posts: 54166
Joined: Tue Mar 17, 2015 9:14 am

Re: GCode has wrong post-processor and units

Post by chrisb »

When you create a job you select a postprocessor in the output tab. It might be sensible to work once through the Path Walkthrough for the Impatient.
Path Job tells you more if you want to edit an existing job.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
micksulley
Posts: 78
Joined: Fri May 11, 2018 9:28 am

Re: GCode has wrong post-processor and units

Post by micksulley »

Thanks Chris,
Yes you are right, I will spend some time reading through the manuals
Mick
Post Reply