Hi I've been using a newer post for the Anderson line of CNC machines. I'm having an issue where the posted code will have an M12 code to retract the spindle when it's supposed to use the same tool for the next op. The machine then continues to cut in air above the part because the spindle doesn't go back down. I can manually remove the M12 and run the file fine, but it's getting annoying.
I've attached a test file with some similar operations that I would do, and the outputted code. You can see the extra M12 at the end of Outer Contour 2. It's also confusing that it doesn't do it for every op. Thanks for any and all help.
Solved! Go to Solution.
Solved by boopathi.sivakumar. Go to Solution.
Hi @boopathi.sivakumar can you please take a look at this when you have a chance? I believe this started happening in January when the post was updated then.
Made a ticket to resolve it
meanwhile you can fix this issue by changing the code. edit the post and find for this code
if (insertToolCall && !isFirstSection()) {
onCommand(COMMAND_STOP_SPINDLE); // stop spindle before retract during tool change
}
writeBlock(mFormat.format(getCurrentSpindle() * 10 + 2)); // spindle up
writeRetract(Z); // retract
and change it to like this
if (insertToolCall && !isFirstSection()) {
onCommand(COMMAND_STOP_SPINDLE); // stop spindle before retract during tool change
writeBlock(mFormat.format(getCurrentSpindle() * 10 + 2)); // spindle up
}
writeRetract(Z); // retract
Can't find what you're looking for? Ask the community or share your knowledge.