I've been using FreeCAD for a few years as my modeling software however, just recently switched to it for my CAM needs. I'm relatively new to the CAM / CNC world and had a question regarding some G-Code at the beginning of my post file.
I'm utilizing a third party post processor for my SnapMaker 2. When the post processor outputs the gcode for the machine, it starts with the following lines first prior to any of the translated paths from FreeCAD:
G0 Z10.00 F120
G0 Z0.50 F120
I'm curious why it would be advantageous to send the tool to Z = 10mm and then to Z = 0.5mm prior to lifting up to work clearance height to translate over to the first X,Y coordinates to start the cut. This seems like it could cause issues depending on how the WCS system is setup and zeroed. Thoughts?
G-Code Question - G0 Z0.5
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
-
- Posts: 10
- Joined: Wed Nov 24, 2021 4:07 pm
G-Code Question - G0 Z0.5
Code: Select all
if ($hungry) { eat(); } else { sleep(); }
Re: G-Code Question - G0 Z0.5
I don't think it causes issues, as there should be nothing above Z0.5.
It's probably just going to clearance height according to the "Heights and depths" section in Path Workbench.
It's probably just going to clearance height according to the "Heights and depths" section in Path Workbench.
A Sketcher Lecture with in-depth information is available in English, auf Deutsch, en français, en español.
- sliptonic
- Veteran
- Posts: 3459
- Joined: Tue Oct 25, 2011 10:46 pm
- Location: Columbia, Missouri
- Contact:
Re: G-Code Question - G0 Z0.5
Is that from a Path post or from your third party post?
It looks harmless but also useless. Maybe the z axis is like a 55 year old programmer and needs to limber up before doing physical work.
It looks harmless but also useless. Maybe the z axis is like a 55 year old programmer and needs to limber up before doing physical work.
-
- Posts: 10
- Joined: Wed Nov 24, 2021 4:07 pm
Re: G-Code Question - G0 Z0.5
That is from the third party post. I dug through the code in their "_post.py" file and it's added as part of the "header" section before processing what FreeCAD has generated.
Haha, indeed! In most cases it's probably harmless though if you were to zero the Z-Axis off the build plate, then Z = 0.5mm is technically "under" the work piece which depending on where X and Y are, could crash. I'm going to remove it from the post processor however I wanted to verify if there was a valid reason you'd want the machine to perform this step even if it was a fringe case.
Code: Select all
if ($hungry) { eat(); } else { sleep(); }
Re: G-Code Question - G0 Z0.5
You need to make very sure that the coordinate origins are correctly set in FreeCAD to match your shop practice. If you want to set Z = 0.0 on the build plate then make sure the FreeCAD model is completely above zero.SaazyPants wrote: ↑Thu Jan 27, 2022 2:42 pm Haha, indeed! In most cases it's probably harmless though if you were to zero the Z-Axis off the build plate, then Z = 0.5mm is technically "under" the work piece which depending on where X and Y are, could crash. I'm going to remove it from the post processor however I wanted to verify if there was a valid reason you'd want the machine to perform this step even if it was a fringe case.
Anything else or adding "correction factors" in the post processor invites disaster.
Gene