Added Display Message from Fusion 360 Post Processor via ManualNC

More
2 years 6 months ago #298072 by Ritterchen
Hi together,
as I use LinuxCNC with Fusion 360 as Post Processor for professional use I have some setups that require some special attention.
In Fusion 360 you can add ManualNC operations such Display Messages (as well as Stops, Tool Break Control and various other Operations).
I used it to display a warning message at the beginning of each operation to check if the fixture is correctly setup.

 

Attachment not found



Here a short snippet of code that was needed in the Post Processor of Fusion to enable the output to LinuxCNC

Added below: "function writeBlock() {"
Code:
// Process Manual NC commands   executeManualNC();


Added somewhere:
Code:
/**   Buffer Manual NC commands for processing later */ var manualNC = ; function onManualNC(command, value) {   manualNC.push({command:command, value:value}); } /**   Processes the Manual NC commands   Pass the desired command to process or leave argument list blank to process all buffered commands */ function executeManualNC(command) {   for (var i = 0; i < manualNC.length; ++i) {     if (!command || (command == manualNC.command)) {       switch(manualNC.command) {         case COMMAND_DISPLAY_MESSAGE: // sample on explicit execution of Manual NC command         writeComment("debug, " + manualNC.value);         break;       default:         expandManualNC(manualNC.command, manualNC.value);       }     }   }   for (var i = 0; i < manualNC.length; ++i) {     if (!command || (command == manualNC.command)) {       manualNC.splice(i, 1);     }   } }


The full list of options can be created as case-statements as shown here: cam.autodesk.com/posts/posts/guides/Post...Training%20Guide.pdf
Page:  6-198 

Credits by:  forums.autodesk.com/t5/hsm-post-processo...ommands/td-p/8904847

Hope this eases up some of your processes with posting from Fusion 360!

Please Log in to join the conversation.

More
2 years 6 months ago #298708 by andypugh
I tried fixing the word wrap in the code block, but couldn't work it out.

Please Log in to join the conversation.

More
2 years 6 months ago #298817 by Ritterchen
Hi Andy, the word-wrap is handled for me via Gmoccapy (2.9) that moves it into readable blocks. Did you implement it on Axis?

Please Log in to join the conversation.

Time to create page: 1.144 seconds
Powered by Kunena Forum