Post Processor: Replacing A Toolpath Section with A Custom Section
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Working with the current DN/Doosan Fanuc MillTurn post.
Long story short, I am trying to replace an entire section of the output code with some custom code. I have the custom code figured out. I am running into issues with tail ends of code from onSection() and onSectionEnd() still being output.
For example, lets say I want to output something like this and have my custom code overwrite a parting operation:
N1(Turn)
XZblahblah
M5
M9
G0 G28 U0V0W0
M1
Custom Code Here
N3(Turn)
...
But I keep Ending Up with
N1(Turn)
XZblahblah
M5
M9
G0 G28 U0V0W0
M1
M5 <<<"duplicate" (from "end" of skipped section / start of onSection or from onSectionEnd)
M9
G0 G28 U0V0W0
M1
Custom Code Here
N3(Turn)
...
I have tried strategies like: if(getParameter("operation-strategy") == "turningPart") { skipRemainingSection();}
and also trying to get rid of code after the fact such as: if(!isFirstSection() && getPreviousSection().getParameter("operation-strategy) == "turningPart" )
but nothing has quite worked so far.
Edit to add: I did notice that the note for skipRemainingSection() doesnt work on onSectionEnd(), so I tried getting around that section with if statements. Still not quite working for me.
I realize I am asking this in vague terms, but I am looking for suggestions on strategies to accomplish this, not necessarily someone to write the exact code for me.
Thanks