Create Post Processor warning dialog for a particular toolpath

Create Post Processor warning dialog for a particular toolpath

iamcdn79
Mentor Mentor
4,345 Views
42 Replies
Message 1 of 43

Create Post Processor warning dialog for a particular toolpath

iamcdn79
Mentor
Mentor

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.


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Accepted solutions (3)
4,346 Views
42 Replies
Replies (42)
Message 21 of 43

evo80
Collaborator
Collaborator

Ok, Figured it out.

0 Likes
Message 22 of 43

Jonathan.Artiss-DSI
Advisor
Advisor

You call me, and I do it for you 😉 

 

Build a trap to filter the unwanted behavior, create a new user command, and at it to your trap, set the user command to Dissalow, this will cause the post to stop writing and throw a message. You can also set a custom message to the properties of the user command to display in the post information window. 

JonathanArtissDSI_0-1699451675212.png

JonathanArtissDSI_1-1699451839517.png

 

 

Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

0 Likes
Message 23 of 43

evo80
Collaborator
Collaborator

I'm trying to use the same for thread milling, but this fails every time.

I've tried all manner of different subtype names but nothing seems to fire.

 

0 Likes
Message 24 of 43

Jonathan.Artiss-DSI
Advisor
Advisor

Your subtype is wrong. Use this - %p(Toolpath Strategy Subtype)%=="Thread_Mill"

Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

0 Likes
Message 25 of 43

iamcdn79
Mentor
Mentor

Are you getting all the subtype commands from the Powermill help parameters documentation? 

iamcdn79_0-1699454196027.png

 


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Message 26 of 43

evo80
Collaborator
Collaborator

Wow, I'm sure I tried that configuration, anyhow I copied and pasted yours and it works, I must've been missing something. So Thanks for that!

Regards

0 Likes
Message 27 of 43

Jonathan.Artiss-DSI
Advisor
Advisor

It's case-sensitive, and you had some training words that would also cause it to fail. 

Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

0 Likes
Message 28 of 43

Sean571
Advocate
Advocate

I get the sub type from debug view in the post 

Sean571_0-1699456968893.png

 

Sean571_1-1699457189437.png

Sean571_2-1699457444450.png

 

Sean Wroblewski
Applications Engineer

Message 29 of 43

evo80
Collaborator
Collaborator

@Sean571 

Hi Sean, How is this implemented into the Post Processor?

0 Likes
Message 30 of 43

iamcdn79
Mentor
Mentor

I love the "Process as Debug" feature, it helps a lot. I never knew about the Debug View though.


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Message 31 of 43

evo80
Collaborator
Collaborator

I Agree!

That is proper handy.

0 Likes
Message 32 of 43

evo80
Collaborator
Collaborator

evo80wejay_com_0-1699467968068.png

Is this the correct syntax to check if an incorrect tool radius has been entered into the Tool Radius Comp Value?

0 Likes
Message 33 of 43

evo80
Collaborator
Collaborator

Screenshot (6).png

 I also tried this, but doesn't seem to work either.

The disabled code does work, but i'd really like to check that the correct tool radius has been entered.

 

0 Likes
Message 34 of 43

evo80
Collaborator
Collaborator

Screenshot (7).png

 I couldn't get the Tool Radius check to work so I decided on another route and have the post fill in the tool radius for the helical and threadmilling canned cycles at the tool load stage.

0 Likes
Message 35 of 43

Jonathan.Artiss-DSI
Advisor
Advisor

I'm unsure of what you're trying to test for, but if you have it working, then it's correct 😉 

Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

0 Likes
Message 36 of 43

Jonathan.Artiss-DSI
Advisor
Advisor

I think I see what you're testing now. This is how I went about doing it. 

Do your math inside a user parameter, then test it in your logic. 

JonathanArtissDSI_0-1699557870060.png

 

Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

0 Likes
Message 37 of 43

evo80
Collaborator
Collaborator

Ah, I see how you've done it. But anyhow by having the post automatically fill in the tool radius I don't need the check.

Still, learned a lot about checking conditions so thanks to all concerned.

Best Regards Jon K

0 Likes
Message 38 of 43

iamcdn79
Mentor
Mentor

@Sean571 or @Jonathan.Artiss-DSI do you know what the if statement would be to check if the drilling canned cycle is turned on? I want to add that to my if toolpath strategy subtype = helical statement.

 

I tried looking in the option settings in the debug view but couldn't find anything drilling cycle or canned cycle

 

iamcdn79_1-1715622066949.png

 

 

iamcdn79_0-1715622041549.png

 


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes
Message 39 of 43

Jonathan.Artiss-DSI
Advisor
Advisor
Accepted solution

@iamcdn79 

 

You're looking for "Drilling Expanded Cycle Mode" On and Off are the checks. 

Jonathan Artiss
Senior Applications Engineer | DSI

Autodesk Expert Elite member
DSI, Design and Software International Autodesk Gold Partner

0 Likes
Message 40 of 43

iamcdn79
Mentor
Mentor

I tried using that but in the debugger it is showing it as off when clicking on the first cycle def  when it should be on for a toolpath that was posted with drilling cycle output set to on

 

iamcdn79_0-1715631152613.png

 


Intel Core i9 13900KF CPU
128 GB Kingston Beast DDR4 SDRAM
PNY RTX A2000 6GB Video Card
WD 1 TB SSD Hard Drive
Windows 11 Pro

0 Likes