convert g92 to g76 thread cycle

convert g92 to g76 thread cycle

simonswb6
Contributor Contributor
600 Views
3 Replies
Message 1 of 4

convert g92 to g76 thread cycle

simonswb6
Contributor
Contributor

The current post processor i have is for a funuc control and for a threading cycle, it using a g92. My machine (mazak) does not use g92, but instead uses a g76.

i have the post process outputing the code correctly, however it keeps repeating. its calling the onCyclePoint until it reaches the min x value. anyway to stop this? i just need this line once...

N23 G76 X2.617 Z-0.435 K0.04 D4 F15.999999999999998
N24 G76 X2.609 Z-0.435 K0.04 D4 F15.999999999999998
N25 G76 X2.601 Z-0.435 K0.04 D4 F15.999999999999998
N26 G76 X2.593 Z-0.435 K0.04 D4 F15.999999999999998


-----------------
switch (cycleType)
{
case "thread-turning":
var minDepthCut = Math.ceil(getParameter("operation:threadDepth")*1000/(getParameter("operation:numberOfStepdowns")));
var threadPass = getParameter("operation:threadDepth") / 100;
var inverted = (toolingData.toolPost == REAR) ? 1 : -1;
//var r = -cycle.incrementalX * inverted; // positive if taper goes down - delta radius
var threadsPerInch = 1.0/cycle.pitch; // per mm for metric
//var f = 1/threadsPerInch;
xOutput.reset(); // at least one axis is required
zOutput.reset();
writeBlock(
gFormat.format(76),
xOutput.format(x),
zOutput.format(z),
"K" + getParameter("operation:threadDepth"),
"D" + minDepthCut,
"F" + getParameter("operation:threadPitch")
);

// break;
//debug("The value of x is " + x);
return;

}

0 Likes
Accepted solutions (1)
601 Views
3 Replies
Replies (3)
Message 2 of 4

boopathi.sivakumar
Autodesk
Autodesk

@simonswb6 

I think you are using the modified post could you please attach the post you are using

 

 


Boopathi Sivakumar
Senior Technology Consultant

0 Likes
Message 3 of 4

simonswb6
Contributor
Contributor
Accepted solution

there maybe better solutions, but this worked...  there is a method called isLastCyclePoint()...

 

case "thread-turning":
     // writeBlock(formatComment('made it'));
    var iThreadDepth = getParameter("operation:threadDepth");
    var iPasses = getParameter("operation:numberOfStepdowns");
    var iDepthOfCut = iThreadDepth/iPasses
    var threadsPerInch = 1.0/cycle.pitch// per mm for metric
    var useCycle = getParameter("operation:useCycle");
    
    if (isLastCyclePoint() && useCycle
    {
      writeBlock(formatComment(' x - bottom dia'));
      writeBlock(formatComment('z  - end point'));
      writeBlock(formatComment('a -  tool tip dia'));
      writeBlock(formatComment('F - thead lead'));
      writeBlock(formatComment('k - thread height'));
      writeBlock(formatComment('D = depth of cut'));
    
    
    xOutput.reset(); // at least one axis is required
    zOutput.reset();
    writeBlock(
      gFormat.format(76),
      xOutput.format(x),
       zOutput.format(z),
      "K" + getParameter("operation:threadDepth"),
      "D" + iDepthOfCut,
      "F" + threadsPerInch.toFixed(4)
      );
    }  
     // break;
     //debug("The value of x is " + x); 
      return;
  
  }

 

 

 

 

0 Likes
Message 4 of 4

Anonymous
Not applicable

Which Line do i replace those codes above with? for some reason it keeps failing and saying post processor failed. 

0 Likes