haas custom drill cycle post edit

haas custom drill cycle post edit

KRoser_12
Advocate Advocate
1,498 Views
6 Replies
Message 1 of 7

haas custom drill cycle post edit

KRoser_12
Advocate
Advocate

Hello.

I desperately need edit my post to work with my custom drill macro for my next job. For deep drilling in stainlles steel is custom drill cycle key. I wrote and use my custom macro with success before. I just edited program manualy and thats really time consuming and potentially dangerous if you have a lot of holes.

So it would be nice to edit my post to output drill cycle format to work with custom macro call.

I tried to edit post myself but with my post editting knowledge i have no chance to get it work.

To the point of my wish for help.

 

Standard haas drill cycle example

T4 M06
S2686 M03
G58
G00 X-38.184 Y38.184
G43 Z15. H04
M08
G00 Z5.

G98 G83 X-38.184 Y38.184 Z-7.942 R-0.7 Q2.5 F269.
X38.184
Y-38.184
X-38.184
G80

Z15.
M30

This is what i need

When deep drill cycle with dwell before retract unckeck use standart drill cycle. When deep drill cycle with dwell before retract ckeck use custom maco

drill format.

Please ignore R I variables for now. i can update this for my needs. I just need implement that if dwell before retract statement and G65 P9100+XY location on every line format.

T15 M6
S1000 M3
G55
G0 X0. Y0.
G43 G0 Z15. H15 
G0 Z5.

(Insted of G98 G81 i need this bellow. Key is to have G95 P9100+XY hole location+variable for macro on every line)

G65 P9100 X0. Y0. Z-20 R0.5 I-5. F500 
G65 P9100 X10. Y10. Z-20 R0.5 I-5. F500  
G65 P9100 X15. Y15. Z-20 R0.5 I-5. F500 

Z15.
M30

I use InventorHSM.

I hope that i explained my problem well with my english knowledge.

Thanks for every help.

0 Likes
Accepted solutions (1)
1,499 Views
6 Replies
Replies (6)
Message 2 of 7

GeorgeRoberts
Autodesk
Autodesk

Hello,

 

Thanks for posting! It is possible to make these changes in the post processor. To do so, find this block in your post processor:

    case "deep-drilling":
      writeBlock(
        gRetractModal.format(98), gCycleModal.format(83),
        getCommonCycle(x, y, z, cycle.retract, cycle.clearance),
        (((cycle.incrementalDepthReduction > 0) ? "I" : "Q") + xyzFormat.format(cycle.incrementalDepth)),
        conditional(cycle.incrementalDepthReduction > 0, "J" + xyzFormat.format(cycle.incrementalDepthReduction)),
        conditional(cycle.incrementalDepthReduction > 0, "K" + xyzFormat.format(cycle.minimumIncrementalDepth)),
        conditional(P > 0, "P" + milliFormat.format(P)), // optional
        feedOutput.format(F)
      );
      break;

 

and replace it with this:

      case "deep-drilling":
        forceXYZ();
        writeBlock(gFormat.format(65), "P9100", xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + xyzFormat.format(cycle.dwell), "I" + xyzFormat.format(cycle.incrementalDepth), feedOutput.format(F));
      break;

 

Following that, find this code:

  if (forceCycle || isFirstCyclePoint()) {
    repositionToCycleClearance(cycle, x, y, z);

 

and replace it with this:

  if (cycleType == "deep-drilling") {
    forceCycle = true;
  }
  
  if (forceCycle || isFirstCyclePoint()) {
    repositionToCycleClearance(cycle, x, y, z);

 

 

You will see that I used the dwell time for your 'R' value and the cycles incremental depth for the 'I' value.. Replace these with whatever is needed.

 

Please verify that this works as expected.

 

Hope this helps!

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
0 Likes
Message 3 of 7

KRoser_12
Advocate
Advocate

Awesome, thank you so much for quick help.

 

This is what i get.

G0 X30. Y-52.
G43 Z15. H8
G0 Z5.

G65 P9100 X30. Y-52. Z-25.292 R0. I4.3 F454.01
G1 X-30. Z5. F16500. (******This location moves i need delete)
G65 P9100 X-30. Y-52. Z-25.292 R0. I4.3 F454.01
Y52. Z5. F16500. (******This location moves i need delete)
G65 P9100 X-30. Y52. Z-25.292 R0. I4.3 F454.01
X30. Z5. F16500. (******This location moves i need delete)
G65 P9100 X30. Y52. Z-25.292 R0. I4.3 F454.01
G80 (******this comand for end drill cycle need to be deleted to)
G0 Z15.
0 Likes
Message 4 of 7

GeorgeRoberts
Autodesk
Autodesk

Hello,

 

Thanks for the reply. To remove the positions between each move, change this:

  if (cycleType == "deep-drilling") {
    forceCycle = true;
  }
  
  if (forceCycle || isFirstCyclePoint()) {
    repositionToCycleClearance(cycle, x, y, z);

To this:

  if (cycleType == "deep-drilling") {
    forceCycle = true;
  }
  
  if (forceCycle || isFirstCyclePoint()) {
    if (cycleType != "deep-drilling") {
      repositionToCycleClearance(cycle, x, y, z);
    }

And finally, to remove G80, change this:

    if (!cycleExpanded) {
      writeBlock(gCycleModal.format(80), conditional(properties.useG95forTapping, gFeedModeModal.format(94)));
      gMotionModal.reset();
    }

to this:

    if (!cycleExpanded && cycleType != "deep-drilling") {
      writeBlock(gCycleModal.format(80), conditional(properties.useG95forTapping, gFeedModeModal.format(94)));
      gMotionModal.reset();
    }

Hope this helps!

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
0 Likes
Message 5 of 7

KRoser_12
Advocate
Advocate

Thank you George for help really appreciate it.

Looks good so far. Format is exatly what i need, but I need last piece of puzzle.

 

I need to have two cycle format under deep-drilling operation.

when cycle.incrementalDepthReduction > 0 then i need to use my custom drill macro G65 P9100 format with all of those statement that you add

G65 P9100 X30. Y-52. Z-25.292 R0. I4.3 F454.01
G65 P9100 X-30. Y-52. Z-25.292 R0. I4.3 F454.01
*all variables on every line
*without  repositioning moves between lines
*no G80

 when cycle.incrementalDepthReduction = 0 then i need get original fanuc drill cycle without that statements that were true above

 

G00 X-100. Y58.961
G98 G83 X-100. Y58.961 Z-30.2 R-13.7 Q16. F1000.
X-81.704 Y31.777
X-84.34 Y-53.761
G80
*with repositioning moves
*not all variable on every line
*with G80

here is my attempt of deep-drilling cycle

case "deep-drilling":
      if ((cycle.incrementalDepthReduction > 0)) {
        forceXYZ();
          writeBlock(
          gFormat.format(65), "P9100",
          getCommonCycle(x, y, z, cycle.retract),
          "I" + xyzFormat.format(cycle.dwell),
          "J" + xyzFormat.format(cycle.incrementalDepth),
          feedOutput.format(F)
        );
        forceFeed();
      } else {
        writeBlock(
          gRetractModal.format(98), gCycleModal.format(83),
          getCommonCycle(x, y, z, cycle.retract, cycle.clearance),
          "Q" + xyzFormat.format(cycle.incrementalDepth),
          // conditional(P > 0, "P" + milliFormat.format(P)),
          feedOutput.format(F)
        );
      }
*that works good but i´m not able to add that format changes to G65 P9100 only when deep-drilling cycle and
cycle.incrementalDepthReduction > 0 is true

and the same format thing all over again with counter-boring cycle only with if cycle dwell is more then 0 then use G65 9101

case "counter-boring":
      if (P > 0) {
        forceXYZ();
          writeBlock(
          gFormat.format(65), "P9101",
          getCommonCycle(x, y, z, cycle.retract),
          "I" + xyzFormat.format(cycle.dwell),
          feedOutput.format(F)
        );
        forceFeed();
      } else {
        writeBlock(
          gRetractModal.format(98), gCycleModal.format(81),
          getCommonCycle(x, y, z, cycle.retract, cycle.clearance),
          feedOutput.format(F)
        );
      }
break;

Hope this all make sense still trying to learn basic of java.

 

Again thank you much for help.

 

Message 6 of 7

GeorgeRoberts
Autodesk
Autodesk
Accepted solution

Hello,

 

Thanks for the reply. To get this to work only if the inc depth reduction > 0, follow these steps:

 

First, change where forceCycle is being set (which we done earlier) to look like this:

 

  if (cycleType == "deep-drilling" && cycle.incrementalDepthReduction > 0) {
    forceCycle = true;
  }

this will check to make sure the inc depth reduction is greater than 0 before setting it.

 

 

you will then want to add a small check to the repositionToCycleClearance like below:

 

  if (forceCycle || isFirstCyclePoint()) {
    if (cycleType != "deep-drilling" || cycle.incrementalDepthReduction == 0) {
      repositionToCycleClearance(cycle, x, y, z);
    }

 

 

now set your deep-drilling block to look like this:

 

      case "deep-drilling":
        if (cycle.incrementalDepthReduction > 0) {
          forceXYZ();
          writeBlock(gFormat.format(65), "P9100", xOutput.format(x), yOutput.format(y), zOutput.format(z), "R" + xyzFormat.format(cycle.dwell), "I" + xyzFormat.format(cycle.incrementalDepth), feedOutput.format(F));
        } else {
          writeBlock(
            gRetractModal.format(98), gCycleModal.format(83),
            getCommonCycle(x, y, z, cycle.retract, cycle.clearance),
            (((cycle.incrementalDepthReduction > 0) ? "I" : "Q") + xyzFormat.format(cycle.incrementalDepth)),
            conditional(cycle.incrementalDepthReduction > 0, "J" + xyzFormat.format(cycle.incrementalDepthReduction)),
            conditional(cycle.incrementalDepthReduction > 0, "K" + xyzFormat.format(cycle.minimumIncrementalDepth)),
            conditional(P > 0, "P" + milliFormat.format(P)), // optional
            feedOutput.format(F)
          );
        }   
      break;

 

 

 

then finally update the G80 block to this:

 

    if (!cycleExpanded && (cycleType != "deep-drilling" || cycle.incrementalDepthReduction == 0)) {
      writeBlock(gCycleModal.format(80), conditional(properties.useG95forTapping, gFeedModeModal.format(94)));
      gMotionModal.reset();
    }

 

hope this helps!

 

-

George Roberts

Manufacturing Product manager
If you'd like to provide feedback and discuss how you would like things to be in the future, Email Me and we can arrange a virtual meeting!
Message 7 of 7

KRoser_12
Advocate
Advocate

Thank You so much for help. Works good so far. I can drill some stainlles steel now. 🙂