Community
Fusion Manufacture
Talk shop with the Fusion (formerly Fusion 360) Manufacture Community. Share tool strategies, tips, get advice and solve problems together with the best minds in the industry.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Generic WinCNC Code Edit - G53

1 REPLY 1
SOLVED
Reply
Message 1 of 2
rlengert
190 Views, 1 Reply

Generic WinCNC Code Edit - G53

Looking for assistance in editing a Generic WinCNC 3-axis router PP. 

Currently, my G-Code ends with the following:

X-0.7911 Y-1.2131 Z-1.5024
X-0.7921 Y-1.2124 Z-1.4947
Z0.5906
M5
G53

 I need this corrected to:

X-0.7911 Y-1.2131 Z-1.5024
X-0.7921 Y-1.2124 Z-1.4947
Z0.5906
M5
G53 G00 Z0
G53 X0 Y0
1 REPLY 1
Message 2 of 2
aju_augustine
in reply to: rlengert

Hi @rlengert ,

 

You will have to first enable home retract in X, Y by modifying the lines in the post as shown below:

 

3.png

 

Original:

homeXY: { onIndexing: false, onToolChange: false, onProgramEnd: false } // Specifies when the machine should be homed in X/Y. Sample: onIndexing:{axes:[X, Y], singleLine:false}

 

Modified:

homeXY: { onIndexing: false, onToolChange: false, onProgramEnd: { axes: [X, Y] } } // Specifies when the machine should be homed in X/Y. Sample: onIndexing:{axes:[X, Y], singleLine:false}

 

Then search for function writeRetract()  and replace it with the codes given below:

 

Original:

function writeRetract() {
  var retract = getRetractParameters.apply(this, arguments);
  if (retract && retract.words.length > 0) {
    if (typeof gRotationModal != "undefined" && gRotationModal.getCurrent() == 68 && settings.retract.cancelRotationOnRetracting) { // cancel rotation before retracting
      cancelWorkPlane(true);
    }
    for (var i in retract.words) {
      var words = retract.singleLine ? retract.words : retract.words[i];
      if (retract.retractAxes[2]) {
        writeBlock(gFormat.format(53)); // retract
      } else {
        gMotionModal.reset();
        writeBlock(gAbsIncModal.format(90), gMotionModal.format(0), words); // retract
      }
      if (retract.singleLine) {
        break;
      }
    }
  }
}

 

Modified:

 

function writeRetract() {
  var retract = getRetractParameters.apply(this, arguments);
  if (retract && retract.words.length > 0) {
    if (typeof gRotationModal != "undefined" && gRotationModal.getCurrent() == 68 && settings.retract.cancelRotationOnRetracting) { // cancel rotation before retracting
      cancelWorkPlane(true);
    }
    for (var i in retract.words) {
      var words = retract.singleLine ? retract.words : retract.words[i];
      if (retract.retractAxes[2]) {
        forceModals(gMotionModal);
        writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), words);
      } else {
        gMotionModal.reset();
        writeBlock(gAbsIncModal.format(90), gFormat.format(53), gMotionModal.format(0), words); // retract
      }
      if (retract.singleLine) {
        break;
      }
    }
  }
}

 

Output should look like the screenshot below:

 

4.png

 



Aju Augustine
Technology Consultant

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report