Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.
freshhhhoi
193 Views, 1 Reply

Need help - Fagor 8055 post processor edit for 5axis router

Hello,

I've been tasked with editing a post processor for a fagor 8055 controlled 5axis router. I made a few modifications to the post which have worked well, but I'm struggling to figure out how to make this edit.

 

 

The post processor selects G17 as the workplane right after a TCP call. Then later in the code it calls G19 or G18, which causes issues as the tool wants to move into the part. However if we alter the G17 into a G19 or G18 manually this fixes the problem. 

 

If somebody could point me in the right direction that would be great.

Thanks

 

Relevant section of code:

 

 // control uses D-word for length offset also
  var lengthOffset = tool.lengthOffset;
  if (lengthOffset > 99) {
    error(localize("Length offset out of range."));
    return;
  }

  if (retracted) {
    if (getProperty("fifthAxis")) {
      writeBlock(dOutput.format(lengthOffset));
      writeBlock(gFormat.format(48), "S1"); // Enable TCP mode after Work Plane if G53 is used for retract
    }
  }

  forceXYZ();
  gMotionModal.reset();

  // set coolant after we have positioned at Z
  //***setCoolant(tool.coolant); turned of fbecause machine doesnt use coolant

  var initialPosition = getFramePosition(currentSection.getInitialPosition());
  if (!retracted && !insertToolCall) {
    if (getCurrentPosition().z < initialPosition.z) {
      writeBlock(gMotionModal.format(0), zOutput.format(initialPosition.z));
    }
  }

  if (insertToolCall || retracted) {
    gMotionModal.reset();
    currentPlane = undefined;
    if (getProperty("useG16")) {
      writeBlock(getG16("XY"));
    } else {
      writeBlock(gPlaneModal.format(17));
    }