Post Processor Edit Help

Post Processor Edit Help

MattH_WY44R
Participant Participant
506 Views
4 Replies
Message 1 of 5

Post Processor Edit Help

MattH_WY44R
Participant
Participant

Hi Everyone,

 

I'm trying to make some basic changes to my post processor and need help. 

I'm using the generic FANUC post on a HYUNDAI KBN Horizontal Borer.

 

I want to tell the W axis (spindle in and out movement) to go to the set datum position after every tool change.

 

Line 14 is what I want it to generate automatically every time a program is created.

Post Processor Help 1.png

 

Would anyone be able to point me in the right direction? 

It would be much appreciated thanks!

0 Likes
Accepted solutions (1)
507 Views
4 Replies
Replies (4)
Message 2 of 5

AdamKunzo
Collaborator
Collaborator
Accepted solution

Hello,

if you open your post processor you can search for "setCoolant(tool.coolant)".

This function calls M8. So just above it you can insert:

if (insertToolCall) {
    writeBlock("W0.");  
}

 

AdamKunzo_0-1708697231113.png

 

If you want to have it more "professional" you can use this:

if (insertToolCall) {
    writeBlock(wFormat.format(0));  
 }
 
But first you need to definy wFormat at in var section:

var wFormat = createFormat({prefix:"W", width:2, forceDecimal:true, decimals:1});

---
If my post answer your question, please use Accept as Solution

 

0 Likes
Message 3 of 5

MattH_WY44R
Participant
Participant

Hello AdamKunzo,

 

Firstly, thank you for your help.  Your solution worked perfectly it's much appreciated.

 

I do however have one more question with the same post processor and machine.

When I create a program, it currently generates N20 G28 G91 Z0. and I'd like it to generate N20 G0 Z600. instead.

Is this possible? 

 

It's just a huge waste of time on this specific machine to have to home itself at the start of every program. 

 

Thanks,

Matt

 

Post Processor Help 2.png

0 Likes
Message 4 of 5

AdamKunzo
Collaborator
Collaborator

Hello Matt,

 

That might not be the smartest choice as the first movement of the machine would be different based on the workpiece origin (which is not even specified yet at this line of code).

 

I would recommend to replace Z0 in G28 G91 Z-XXX, where XXX is suitable value for your machine and part heights.


Anyway, you know your machine and production better, so I modified your post as per your request and removed G28 G91 Z0 at the top of the code.

 

Post processor still outputs G28 G91 Z0 before tool change (except the first operation). 

0 Likes
Message 5 of 5

MattH_WY44R
Participant
Participant

Hi Adam,

 

Yes, you make a very good point there and I understand the risk.  I'll definitely remain cautious and keep your suggestion in mind, but this should be perfect for what we are doing.

 

Your modified post is exactly what I was after.

Thanks mate, I really appreciate your help!

 

Regards 

Matt

 

 

 

0 Likes