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.
Solved! Go to Solution.
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.
Solved! Go to Solution.
Solved by aju_augustine. Go to 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:
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:
Please 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.
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:
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:
Please 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.
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?
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?
Can't find what you're looking for? Ask the community or share your knowledge.