Deleting G80

Deleting G80

garrettcjantz
Explorer Explorer
433 Views
2 Replies
Message 1 of 3

Deleting G80

garrettcjantz
Explorer
Explorer

I need to have my post NOT output the G80 at the end of the thread turning cycle but I need to Keep the G80 at the end of all the other regular canned cycles. What is the proper way to do this? I am using Visual Studio Code to edit my post processors so I am familiar with doing my own post processor editing but this one has me stumped. 

0 Likes
434 Views
2 Replies
Replies (2)
Message 2 of 3

joseph.komenda
Autodesk
Autodesk

Hi @garrettcjantz,

 

I am not sure which post you are using, but I tested with doosan mill-turn fanuc.cps and saw the elimination of G80 when I built a logical around the G80 writeBlock in onCycleEnd.

 

My code ended up looking like

function onCycleEnd() {
  if (!cycleExpanded && !machineState.stockTransferIsActive) {
    if (cycleType != "thread-turning") {
      writeBlock(gCycleModal.format(80));
      gMotionModal.reset();
    }
  }
}

But I also see the haas st-10.cps post already eliminates G80 from their thread turning output.  You can review the onCycleEnd in that post as well.  

 

https://cam.autodesk.com/hsmposts?p=haas_st-10

 

function onCycleEnd() {
  if (!cycleExpanded && !machineState.stockTransferIsActive && (typeof isSubSpindleCycle == "function") && isSubSpindleCycle(cycleType)) {
    switch (cycleType) {
    case "thread-turning":
      forceFeed();
      xOutput.reset();
      zOutput.reset();
      g76IOutput.reset();
      break;
    default:
      writeBlock(gCycleModal.format(80));
      gMotionModal.reset();
    }
  }
}


Joseph Komenda
0 Likes
Message 3 of 3

garrettcjantz
Explorer
Explorer

Thank You, I will try this. 

0 Likes