Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

Raise Z height on close of machine program

smunzer8ZZFW
Enthusiast

Raise Z height on close of machine program

smunzer8ZZFW
Enthusiast
Enthusiast

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. 

0 Likes
Reply
Accepted solutions (1)
278 Views
3 Replies
Replies (3)

engineguy
Mentor
Mentor
Accepted solution

@smunzer8ZZFW 

 

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.

 

Comment out X-Y Retracts.jpg

 

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

Pass Through to raise Z.jpg

 

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 🙂

Pass through end of program.jpg

 

Are the changes described something like what you need ?? Modified PP attached for you to test (Carefully) 🙂

 

0 Likes

smunzer8ZZFW
Enthusiast
Enthusiast

@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. 

 

0 Likes

engineguy
Mentor
Mentor

@smunzer8ZZFW 

 

Yes, that is correct, you do have the option to select the G28 "Safe Retracts".

Forest Options.jpg

 

 

0 Likes