
Is there a tool like intercon to help create macros and debug them? I know that Mach3 had a tool that did this. Or is the CNC11 programmer's manual the best resource to learn?
Thanks,
Clint
Moderator: cnckeith
Not that I am aware of Clint.
Code: Select all
M225 #106 "#)Please change tool to tool #%.0f\nPress Cycle Start to continue" #4120
Code: Select all
:T7 D=0.25 CR=0. - ZMIN=0. - flat end mill
Code: Select all
#300 = "T7 D=0.25 CR=0. - ZMIN=0. - flat end mill"
; ...
M225 #106 "#)Please change tool to tool #%s\nPress Cycle Start to continue" #300
Code: Select all
#307 = "T7 D=0.25 CR=0. - ZMIN=0. - flat end mill"
; ...
M225 #106 "#)Please change tool to tool #%s\nPress Cycle Start to continue" #[300+#4120]
Code: Select all
var tools = getToolTable();
if (tools.getNumberOfTools() > 0) {
for (var i = 0; i < tools.getNumberOfTools(); ++i) {
var tool = tools.getTool(i);
var comment = "T" + toolFormat.format(tool.number) + " " +
"D=" + xyzFormat.format(tool.diameter) + " " +
localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
comment += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
}
if (zRanges[tool.number]) {
comment += " - " + localize("ZMIN") + "=" + xyzFormat.format(zRanges[tool.number].getMinimum());
}
comment += " - " + getToolTypeName(tool.type);
writeComment(comment);
}
}
}
Code: Select all
var toolinfo = "#300 = "
toolinfo += "\"T" + toolFormat.format(tool.number) + " " +
"D=" + xyzFormat.format(tool.diameter) + " " +
localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
toolinfo += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
}
toolinfo += " - " + getToolTypeName(tool.type) + "\"";
writeln(toolinfo);
Add the following command into your mfunc6.mac file:N10 G90 G94 G17
N15 G21
N20 G28 G91 Z0.
N25 G90
:Face1
#300 = "T1 D=50. CR=0. - face mill"
N30 T1 M6
Code: Select all
M225 #106 "#)Insert Tool #%.0f\n%s\nD:%.3f H:%.3f\n\nPress Cycle Start to continue" #4120 #300 #[11000 + #4120] #[10000 + #4120]
fyi...I submitted this as a feature request to be added to future release of cnc12.
Code: Select all
if (properties.writeTools) {
var toolinfo = "#300 = "
toolinfo += "\"T" + toolFormat.format(tool.number) + " " +
"D=" + xyzFormat.format(tool.diameter) + " " +
localize("CR") + "=" + xyzFormat.format(tool.cornerRadius);
if ((tool.taperAngle > 0) && (tool.taperAngle < Math.PI)) {
toolinfo += " " + localize("TAPER") + "=" + taperFormat.format(tool.taperAngle) + localize("deg");
}
toolinfo += " - " + getToolTypeName(tool.type) + "\"";
writeBlock(toolinfo);
}