- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I agree with Marco about using VS Code for general edits and tuning of the post processor but I think this may be a more direct answer to your question:
I would personally do these edits in Notepad++ with Javascript set as the language but this could equally be done in VS Code.
In the Fanuc Turning post processor you'll need to find the line:
function onCycleEnd() {
This defines what's put after each cycle based on cycle type. As a default only the thread-turning has specific end of cycle code. You'll have to edit your Post as follows:
function onCycleEnd() {
if (!cycleExpanded) {
switch (cycleType) {
case "thread-turning":
forceFeed();
xOutput.reset();
zOutput.reset();
g92ROutput.reset();
break;
case "tapping":
writeBlock(gCycleModal.format(80));
writeBlock(mFormat.format(128));
break;
default:
writeBlock(gCycleModal.format(80));
}
}
}
It's worth noting that this will only add that M-code to tapping. If you wanted to add that to other types of tapping you would have to add those too. To avoid typing the whole block out multiple times you can stack the cases like so:
function onCycleEnd() {
if (!cycleExpanded) {
switch (cycleType) {
case "thread-turning":
forceFeed();
xOutput.reset();
zOutput.reset();
g92ROutput.reset();
break;
case "tapping":
case "left-tapping":
case "right-tapping":
case "tapping-with-chip-breaking":
case "left-tapping-with-chip-breaking":
case "right-tapping-with-chip-breaking":
writeBlock(gCycleModal.format(80));
writeBlock(mFormat.format(128));
break;
default:
writeBlock(gCycleModal.format(80));
}
}
}
I hope this helps!
Fusion