I want to add support for the "Display Message" command in my post processor config file.
My end goal is to output this message as a line of G-code like this:
(MSG, Message goes here)
I don't want to use the PassThrough command, since there is no validation of code there, I'd rather prefer to make use of the built in "Display Message" command, and only allow it to output text, similar to what the "Comment" function does.
I have tried adding this:
function onDisplay(message) {
writeDisplay(message);
}
Solved! Go to Solution.
Solved by johannesJGAKQ. Go to Solution.
Depending on how you want it there are a few ways to add a message to a Gcode with its post using a straight out write message for a permanent message or doing a variable.
The goal was to take advantage of the Manual NC command "Display Message", so that I could type whatever message I wanted, and have it be displayed on the CNC control.
After doing some tests, I actually need it to be prefixed with an M0 command as well.
So the output I'm looking to achieve is this:
M0 (MSG, My message goes here)
But with the ability to change the content of the message each time I use it.
Thus, I was hoping to figure out how to make the "Display Message" show up in my post.
Kind regards
Johannes
I found this post, which helped me get to the solution.
// Process Manual NC Command Display Message
function onManualNC(command, value) {
switch (command) {
case COMMAND_DISPLAY_MESSAGE: // prepend ‘MSG,’ to operator messages
writeBlock("M0 " + "(MSG, " + value + ")");
break;
default:
expandManualNC(command, value); // normal processing of Manual NC command
}
}
Can't find what you're looking for? Ask the community or share your knowledge.