Z retract when switching work offsets in program

Z retract when switching work offsets in program

jeff2HS8X
Advocate Advocate
840 Views
4 Replies
Message 1 of 5

Z retract when switching work offsets in program

jeff2HS8X
Advocate
Advocate

I am hoping someone who has some skills in editing post processors can help me out with an "issue" I am having. I have tried to edit myself but am not having any luck.... when I post a program to use multiple WCS, the program will do a full Z retract from G54 TO G55 for example (on my okuma G15 H01 TO G15 H02). this is totally unnecessary for me, and just wastes time and motion especially when we are doing a large production job. We standardize everything to where we use the same vises, parallels, and operation in multiple stations so even clearing an inch or so would never cause a crash... I am actually more likely to cause a crash because of the fact that I have been hand editing every program to do my own desired retract when switching offsets and one of these days I am going to goof up and the machinist on the floor may miss my mistake...  I am attaching an .F3D file along with the post processor I am using and a sample "target program" for reference. In my target program I just put a Z5.0 clearance when switching WCS which should be safe and efficient enough... In my .F3D file, I am using the "OP20" setup in the manufacturing workspace. I have multiple other posts that I need to do this to, and I am hoping if someone can fix this post I can kind of figure it out for my other ones... 

It would be awesome if fusion gave us the option to set our own Z retract height when switching WCS and also when working on a 4 axis indexing job.... (Z also does a full retract when indexing an axis which 99% of the time in my case is totally unnecessary) I can see that maybe Autodesk is concerned of causing crashes, but the way I see it this is just another parameter that the programmer is responsible for to create a safe program just like everything else we have to decide when creating one.... 

 

Any help anyone can offer would be GREATLY APPRECIATED as this is something I have been trying to address for almost 2 years (it's been on the backburner, however)

 

Thanks,

Jeff

0 Likes
841 Views
4 Replies
Replies (4)
Message 2 of 5

DarthBane55
Advisor
Advisor

I can tell you 2 things:

1-probably better luck on this forum: https://forums.autodesk.com/t5/hsm-post-processor-forum/bd-p/218  just because it is dedicated to post processors.

2-What you want it completely doable, I wish I could help you with it, but it takes a while to edit, it would take me way to long to transfer what I did to my posts, to yours.  But I can try to guide you.

I created 2 functions to do exactly what you are after, using Manual NC.  The 1st function is a simple Action manual NC called "Z".  When there is a retract, or an index move, and you can find this section in your post by searching for the retract moves, you create an IF section, that if there is a Action manual NC present with a Z value, it will do that section of code instead of the go home section of code.  So if I put "Z1.0", it will output that instead of go home.  So I would put this everywhere I need it.

The 2nd function is more automated.  I have a Action Manual NC at the very beginning of the program called "auto-index", with a value.  So it would look like "Auto-Index 2.0" for example.  I calculate the stock size, and add 2" to the biggest dimension of the stock.  You can do whatever fits your needs here, but basically, every time there would be a retract to home, it now instead retract by that safe value.  Need to be careful with this one, because if you have a 5-axis machine and the pallet is tilted, then the tool goes for an operation when the pallet is not tilted, the retract in that case would not be enough, so for those situation I then add the 1st manual NC described above.  I do have a full g-code simulator, so this is not a worry for me, I will catch that in the simulation if I forget.  But if I did not have the sim, I would probably not use this.  I try to do all the work when not tilted 1st, but this is not always possible.

 

You can adapt this "auto-Index" to anything you want, even a hard value of "1.0" if you just have 3 axis and always feel that this would be safe.  But a bit of flexibility would not hurt here in case you have a taller operation one day.

So find the section that is responsible for the go home moves in your post, and add some If sections to it.  Start by just outputting a work, like "TEST", and you will see if you are able to replace the go home with that text.  Once you figured out that step, you can expand on it, by adding the manual NC function, or if you feel you dont even need the manual NC and feel that you NEVER need to retract more than 1.0", you can just replace the go home with that, but I would be careful hard coding anything in a post.

 

I hope it helps a bit, because this change is not a quick thing to do in 2 minutes unfortunately, so for me I cannot do it for you.  Maybe someone else can, but I hope what I wrote can guide you to get started at least.  Always edit a copied version of your post, because you can lose it rather fast with a wrong edit.

0 Likes
Message 3 of 5

jeff2HS8X
Advocate
Advocate

Thanks for the quick response. I am going to give this a shot and see what I can come up with. I appreciate your help and suggestions. I will follow up with you if I am successful or not

 

Thanks,
Jeff

Message 4 of 5

programming2C78B
Mentor
Mentor

Im no post editor, but I imagine there should be a way to add a toggle window on the posting-out window for "Add Safe Retracts?" and make it yes/no. It's something that is being called up somewhere when there is a tool or WCS change. 

Please click "Accept Solution" if what I wrote solved your issue!
0 Likes
Message 5 of 5

Don.Cyr
Collaborator
Collaborator

I truly wish Autodesk would allow this in the posts as do some other software packages for a retract amount between WCS but the general idea is that it isn't safe as it could cause a crash.. @DarthBane55 Has some good ideas, I haven't tried those. Been working on something for a while with some help and have it where it works pretty good for a Haas NGC control. Still a few things I would like to get dialed in. 

DonCyr_0-1705595343891.png

 

Please click "Accept Solution" if I helped with your question or issue.