How to output a warning if an operation is not currently supported?

How to output a warning if an operation is not currently supported?

bernard5BABD
Advocate Advocate
407 Views
2 Replies
Message 1 of 3

How to output a warning if an operation is not currently supported?

bernard5BABD
Advocate
Advocate

I am working on a post-processor. For now, a few specific operations are not supported by the machine (they require an extension), like tapping, right-tapping, left-tapping, and all other tapping operations. I don't want to simply remove them, as the client might acquire this extension later on.

What would be the best way to send a message saying this is not supported, without triggering an error. 
I would like my post-processor to pass the benchmark (Milling_MM Postprocessor Benchmark V2), even if these operations are not yet supported. In the same time, I would like the user to be warned if he tries to create a toolpath with an unsupported strategy.

Thanks for your help, and best regards,

Bernard Grosperrin, Retired, Maker, and Autodesk Certified Instructor
Blog : Le Bear CNC | Forum : Le Bear CNC Forum | Addin : Airfoil Sketch from file
0 Likes
Accepted solutions (1)
408 Views
2 Replies
Replies (2)
Message 2 of 3

joseph.komenda
Autodesk
Autodesk
Accepted solution

Hi @bernard5BABD,

 

I think what you are looking for is something like the "warning()" function.  You can find a few examples of this in the Haas NGC post.  Something like 

 warning(localize("Tool number out of range."));

Should serve.  The other format I would suggest (depending on the behavior you are looking for) is the "error()" function.  Example,

error(localize("Spindle speed out of range."));

Put one of those in the cycles you want to warn about and test to see if the message created is behaving the way you are envisioning.

 

Regards,



Joseph Komenda
0 Likes
Message 3 of 3

bernard5BABD
Advocate
Advocate

have been using the error() function. I will test warning to see if it could be a better method. Thanks !

Bernard Grosperrin, Retired, Maker, and Autodesk Certified Instructor
Blog : Le Bear CNC | Forum : Le Bear CNC Forum | Addin : Airfoil Sketch from file
0 Likes