Fusion360 Post processor - Unsupported G17, Remove gplanemodal.format(17)?

Using Fusion 360 with the Malsow CNC prost processor and seeing errors in Ground Control that G17 operation is not supported.
https://cam.autodesk.com/hsmposts?p=maslowcnc

Notice the Gcode has G17 in the ‘safety commands’ at top of file but I have not seen it anywhere else.

(MyProject)
(T1  D=0.25 CR=0 - ZMIN=-0.75 - FLAT END MILL)
G0 G40 G90 G17

Is this simply a case of removing " writeBlock(gPlaneModal.format(17)" from the post processor config?

G17 just switches the machine to operate in the XY plane which is where we normally operate all the time so you should be safe to ignore it. Really what should happen is that we should remove the warning from the firmware because a G17 command doesn’t require any action from the machine so ignoring it really is handling it correctly

1 Like

@bar,

G17 just switches the machine to operate in the XY plane which is where we normally operate all the time so you should be safe to ignore it

Right: Understand that this G code switches to XY plane which is default on Maslow and therefor not necessary to be set. Problem is cosmetic, because G17 code does not do anything on Maslow and causes error when included. Is it safe to remove all reference to G17 code in Fusion 360 Post Processor which will remove the errors?

I can test and make these changes, that remove G17, to post processor, so long as they are not required, and G17 is not converted to other G code operations that I do not understand in the post processor.

If translation of G17 to other G operations takes place please let me know.

Removing those lines from the gcode file will eliminate the error messages, and not alter how the file runs on the Maslow.

1 Like

Still, GC should be made to recognize more G-codes

(and in this instance: stop with an error in the event of some more incompatible G-code coordinate mode is invoked, proceed w/o if all is well)

1 Like

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.

1 Like

Anyone know when the Post Processor on Autodesk’s site is not released?

ATTENTION: THIS POST HAS NOT BEEN RELEASED, WONT WORK FOR ANY PARTICULAR PURPOSE, AND SHOULD NOT BE SHARED WITH THE COMMUNITY.

Also the post processor is not on github in GroundControl or Firmware repos. Perhaps it should be included for version control?