Sorry for long delay on update. Was learning how the Fusion360 post processor operates. Finally created a modified version that removes G17 entirely and throws error when G18 or G19 operations are processed. I think this is the correct logic as we do not want anyone expecting G18-19 to work.
Files:
maslowcnc_org.cps (35.8 KB) [Original]
maslowcnc_remove_g17-19.cps (34.3 KB) [Modified]
maslowcnc.cps.diff (6.0 KB) [Difference]
--- maslowcnc_org.cps 2018-12-09 14:10:02.000000000 -0800
+++ maslowcnc_remove_g17-19.cps 2018-12-09 14:07:53.000000000 -0800
@@ -301,7 +301,7 @@
}
// absolute coordinates and feed per min
- writeBlock(gFormat.format(0), gFormat.format(40), gAbsIncModal.format(90), gPlaneModal.format(17));
+ writeBlock(gFormat.format(0), gFormat.format(40), gAbsIncModal.format(90));
switch (unit) {
case IN:
@@ -606,7 +606,6 @@
}
gMotionModal.reset();
- writeBlock(gPlaneModal.format(17));
if (!machineConfiguration.isHeadConfiguration()) {
writeBlock(
@@ -682,20 +681,13 @@
if (d > 99) {
warning(localize("The diameter offset exceeds the maximum value."));
}
- writeBlock(gPlaneModal.format(17));
switch (radiusCompensation) {
case RADIUS_COMPENSATION_LEFT:
- error(localize("Cutter compensation with G41 is not supported by TinyG CNC control."));
+ error(localize("Cutter compensation with G41 is not supported by Maslow CNC control."));
return;
- //dOutput.reset();
- //writeBlock(gMotionModal.format(1), gFormat.format(41), x, y, z, dOutput.format(d), f);
- //break;
case RADIUS_COMPENSATION_RIGHT:
- error(localize("Cutter compensation with G42 is not supported by TinyG CNC control."));
+ error(localize("Cutter compensation with G42 is not supported by Maslow CNC control."));
return;
- //dOutput.reset();
- //writeBlock(gMotionModal.format(1), gFormat.format(42), x, y, z, dOutput.format(d), f);
- //break;
default:
writeBlock(gMotionModal.format(1), gFormat.format(40), x, y, z, f);
}
@@ -737,6 +729,7 @@
error(localize("Radius compensation cannot be activated/deactivated for 5-axis move."));
return;
}
+
var x = xOutput.format(_x);
var y = yOutput.format(_y);
var z = zOutput.format(_z);
@@ -761,36 +754,33 @@
return;
}
var start = getCurrentPosition();
+ var circularPlane = getCircularPlane();
if (isFullCircle()) {
if (properties.useRadius || isHelical()) { // radius mode does not support full arcs
linearize(tolerance);
return;
}
- switch (getCircularPlane()) {
+ switch (circularPlane) {
case PLANE_XY:
- writeBlock(gAbsIncModal.format(90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
+ writeBlock(gAbsIncModal.format(90), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
break;
case PLANE_ZX:
- writeBlock(gAbsIncModal.format(90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
- break;
case PLANE_YZ:
- writeBlock(gAbsIncModal.format(90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
- break;
+ error(localize("Work plane is not supported") + ": " + circularPlane);
+ return;
default:
linearize(tolerance);
}
} else if (!properties.useRadius) {
- switch (getCircularPlane()) {
+ switch (circularPlane) {
case PLANE_XY:
- writeBlock(gAbsIncModal.format(90), gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
+ writeBlock(gAbsIncModal.format(90), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), jOutput.format(cy - start.y, 0), feedOutput.format(feed));
break;
case PLANE_ZX:
- writeBlock(gAbsIncModal.format(90), gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), iOutput.format(cx - start.x, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
- break;
case PLANE_YZ:
- writeBlock(gAbsIncModal.format(90), gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), jOutput.format(cy - start.y, 0), kOutput.format(cz - start.z, 0), feedOutput.format(feed));
- break;
+ error(localize("Work plane is not supported") + ": " + circularPlane);
+ return;
default:
linearize(tolerance);
}
@@ -799,16 +789,14 @@
if (toDeg(getCircularSweep()) > (180 + 1e-9)) {
r = -r; // allow up to <360 deg arcs
}
- switch (getCircularPlane()) {
+ switch (circularPlane) {
case PLANE_XY:
- writeBlock(gPlaneModal.format(17), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), feedOutput.format(feed));
+ writeBlock(gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), feedOutput.format(feed));
break;
case PLANE_ZX:
- writeBlock(gPlaneModal.format(18), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), feedOutput.format(feed));
- break;
case PLANE_YZ:
- writeBlock(gPlaneModal.format(19), gMotionModal.format(clockwise ? 2 : 3), xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + rFormat.format(r), feedOutput.format(feed));
- break;
+ error(localize("Work plane is not supported") + ": " + circularPlane);
+ return;
default:
linearize(tolerance);
}
@@ -979,8 +967,6 @@
}
function onSectionEnd() {
- writeBlock(gPlaneModal.format(17));
-
if (((getCurrentSectionId() + 1) >= getNumberOfSections()) ||
(tool.number != getNextSection().getTool().number)) {
onCommand(COMMAND_BREAK_CONTROL);
The changes are only visible by the removal of G17 initialization command at beginning of gcode file.