There are times when I forget to set cutter comp. to LEFT in the NC Program settings when post processing for Corner Pencil toolpaths. I want to create a warning dialog to say something like cutter comp is not set for this toolpath.
I am wondering if it is possible and how.
I am thinking of creating an if statement like if the toolpath Corner pencil exists and if Cutter Comp is set to None then to pop up a warning when posting.
Solved! Go to Solution.
Solved by Jonathan.Artiss-DSI. Go to Solution.
Solved by Sean571. Go to Solution.
Solved by Jonathan.Artiss-DSI. Go to Solution.
Hey Andre
See the attached post, I added some logic to the toolpath end, and a switch to the cutter comp off and toolpath start. This is the only way I can see this working unless you create a script to scan and capture the cutter comp setting and throw a warning.
Jonathan Artiss
Senior Applications Engineer | DSI
I tried what you had in the provided post but it never popped an error message if the cutter comp was set to off. So I just created a script and it seems to work as intended *fingers crossed*
I am trying to run the same script for Drilling toolpaths using Helical but it's not working. Do I have the correct expression for that type of toolpath or am I missing something?
I tried
and
No, still doesn't work
That's not working either
The problem here is that your trap is only going to run if compensation is turned on. Cutter compensation isn't an easy thing to trap. This was why I built a switch into my sample posted above with the trap at the toolpath end.
Jonathan Artiss
Senior Applications Engineer | DSI
I suggest that you move your warning or error trap to toolpath end. Inside cutter comp on, create a new trap to check for "Left" and have it set a user parameter "switch" from 0 to 1. Then inside your toolpath end trap, if the switch is set to 1, trip your message.
Jonathan Artiss
Senior Applications Engineer | DSI
Ok, your way worked in this application but didn't work for Corner Pencil 😕
@Jonathan.Artiss-DSI is correct. I believe you can also put something like this in toolpath start and it should still work:
Just don't put your check inside Cutter comp on.
Is having %p(Toolpath Type)% == "DRILLING" optional or not needed?
@Jonathan.Artiss-DSI wrote:Add a text block into each trap. Where does it fail?
I went back to troubleshoot your original suggestion but now it works 🙃
But I like Sean's solution better to just add this to toolpath start, it's less work lol and more straightforward
Good Day,
I've have his throw up an error within the posted programs, but how do I configure the post to not post if the comp condition hasn't been met?
Can't find what you're looking for? Ask the community or share your knowledge.