Siemens 840 D mill/turn post processor tweak needed for tool change.

kuhnjst
Enthusiast
Enthusiast

Siemens 840 D mill/turn post processor tweak needed for tool change.

kuhnjst
Enthusiast
Enthusiast

Post I'm using is: siemens mill-turn.cps

Hi everyone! So when a tool change is commanded My control Wants the name of the tool and then the line after is TC(1).

I manually add this in with the tool call button in the editor on the control. I want to not have to do this :). 

So my question is, How do i edit the post to do this? I have the M06 line commented out (//). So do i have to declare a variable TC(1)? and then i can do a writeBlockTC(1)?  And what happens if I say running multiple tools in a live tooling head where i'm call multiple length offsets Like D1,2 and 3?

A little help please and thank you.

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

aju_augustine
Autodesk
Autodesk
Accepted solution

Hi, @kuhnjst ,

 

To change the tool call format from Tool number to Tool name, you can enable Tool as name with in post properties as shown below:

 

2.png

For removing M6 and adding TC(1) modify the post as shown below:

 

Original:

    writeToolBlock("T" + (getProperty("toolAsName") ? "="  + "\"" + (tool.description.toUpperCase()) + "\"" : toolFormat.format(tool.number)), dFormat.format(lengthOffset));
    writeBlock(mFormat.format(6));

 

Modified:

    writeToolBlock("T" + (getProperty("toolAsName") ? "=" + "\"" + (tool.description.toUpperCase()) + "\"" : toolFormat.format(tool.number)), dFormat.format(lengthOffset));
    // writeBlock(mFormat.format(6));
    writeBlock("TC(1)");

 

For Turning Tools, (D1,D2 etc) is changed as per the definition of compensation offset which is same as tool number, this is available in the post processor tab while selecting tool as shown below:

 

3.pngPlease note that for all milling tools it will output D1. 

if you need milling tools to output as per compensation offset number (i.e D1,D2, etc) , you will have to replace the post as shown below:

 

Original:

    var lengthOffset = tool.isTurningTool() ? tool.compensationOffset : 1; // optional, use tool.lengthOffset instead
    if (lengthOffset > 99) {
      error(localize("Length offset out of range."));
      return;
    }
    writeBlock(dOutput.format(lengthOffset));

 

Modified:

 

    var lengthOffset = tool.isTurningTool() ? tool.compensationOffset : 1; // optional, use tool.lengthOffset instead
    if (lengthOffset > 99) {
      error(localize("Length offset out of range."));
      return;
    }
    writeBlock(dOutput.format(compensationOffset));

 Hope this helps your problem.



Aju Augustine
Technology Consultant
0 Likes

kuhnjst
Enthusiast
Enthusiast

Absolutely beautiful!!! Thank you so very much!

0 Likes

kuhnjst
Enthusiast
Enthusiast

Ok so trying to use Cutter Comp. Wont post out. I have to comment out the D1 output. my machine faults when reading that. I use tool names not numbers Is that effecting it?

0 Likes