Replace G83 with a custom Macro

j.floyd.fusion360
Contributor
Contributor

Replace G83 with a custom Macro

j.floyd.fusion360
Contributor
Contributor

So we have an older Wasino machine in our shop, and I've volunteered to try and modify/create a post for Fusion so we can save on our programming time. I am not having the best of luck in trying to replace the G83 cycles that fusion standard puts out. I would like it to call up G65 instead with the P9111 attached to the line. We have the sub program saved in the machine and have the variables to match what is typically asked.

 

basically fusion puts out

G83 X0. Z-1. R.1 Q.2 F.0015

 

I would like it to output

G65 P9111 Z-1. R.1 D.2 F.0015

 

The furthest I got was to get the G83 switched to G65, but how do I included the P9111 every time it calls up that drilling cycle?

Machine doesn't do canned cycles, this is why.

 

*Note, I do note have anything in front of me, I am home on quarantine and doing this all from memory. I can ask coworker to get me info, but may be a slight delay on responses.

0 Likes
Reply
Accepted solutions (1)
518 Views
1 Reply
Reply (1)

KrupalVala
Autodesk
Autodesk
Accepted solution

Hi @j.floyd.fusion360 ,

 

For that you need to define a new variable and add that variable in the Homemaking cycle  as show,

 

Define a variable, 

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

    var F = cycle.feedrate;
    var P = !cycle.dwell ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds
    var KV = "P9111"; // new variable

add the variable 

case "deep-drilling":
      if (P > 0) {
        expandCyclePoint(z);
      } else {
        writeBlock(
          (properties.type == "A") ? "" : gRetractModal.format(98), conditional(properties.type != "A", gAbsIncModal.format(90)), gCycleModal.format(65),
          KV,getCommonCycle(x, y, z, cycle.retract),

 

 Now save the post and test it.

 

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes