& Construction
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
& Manufacturing
Professional CAD/CAM tools built on Inventor and AutoCAD
Integrated BIM tools, including Revit, AutoCAD, and Civil 3D
Professional CAD/CAM tools built on Inventor and AutoCAD
The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.
Good Afternoon,
I have a post for a forest CNC router that attempts to do a t0 tool change at the end of every program. I commented out this function in the onClose. this had me thinking, how could I have the Gcode tell the machine to move to max z height to clear the bit of any obstruction and then end the program? I do not want it to seek g28 as that could run into some obstructions. i will attach the posts below.
Solved! Go to Solution.
The G28 G91 Z0 command is designed to do exactly what you are asking for, it will only move the Z axis, the X and Y axis can be commented out in onClose the same as you did with the Tool call, see image below.
This will only work when using the G28 option for the "Safe Retracts".
To get the G28 G91 Z0 command to work when using the "Clearance Height" you can use a "Manual NC" command using the "Pass Through" option, I have modified the PP to accept the "Pass Through" commands so all you need to do is type in the G28 G91 Z0 and a G90 as in the image below
to get the code as shown in the second image below, very easy to do and it gives you the option to set any Z height you like at the end of the program by just typing it into a Pass Through command. IMHO easier than making lots of changes to the PP 🙂
Are the changes described something like what you need ?? Modified PP attached for you to test (Carefully) 🙂
@engineguy This clears everything up thank you, there should be a way in the PP to automatically change the default preset of the "safe Retracts" option to G28 right? because then in that case I'm not setting manual z heights and it is just automatically going to that point unless you want to do something different.
How to buy
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © 2025 Autodesk Inc. All rights reserved
Type a product name