Siemens Turning Drilling with G95 instead of G94

Siemens Turning Drilling with G95 instead of G94

Anonymous
Not applicable
2,822 Views
15 Replies
Message 1 of 16

Siemens Turning Drilling with G95 instead of G94

Anonymous
Not applicable

Can any one please suggest how do I modify the post processor of Siemens turning so that the feeds in the program are in feed/rev instead of feed/min? My CNC turning Center does not take G94 and I crashed a drill using G94 . Can i change something in post processor so that the drilling program contains G95 and Feed as feed/rev of the drill parameters? 

0 Likes
2,823 Views
15 Replies
Replies (15)
Message 2 of 16

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

 

Change the unit as an Inches and You will get G95 output. But if you want G95 only in a particular strategy then we need to change a few codes inside the post.

 

Unit.jpg

 

Thanks,

 



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 3 of 16

Anonymous
Not applicable
Well we use metric system here. I can change the codes in the post
processor if u tell me what needs to be changed.

0 Likes
Message 4 of 16

Anonymous
Not applicable

I tried changing the units to inches. But for drilling it still has the feed with G94 as shown as attached.

Screenshot 2020-08-17 at 9.36.10 PM.png

0 Likes
Message 5 of 16

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

 I will check and give an update.

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 6 of 16

KrupalVala
Autodesk
Autodesk

Hi @Anonymous ,

 

To get a G95 code only in drilling, Open your post in any editor. Search below codes and set it from

gFeedModeModal.reset();
  if (currentSection.feedMode == FEED_PER_REVOLUTION) {
    writeBlock(getCode("FEED_MODE_UNIT_REV"));
  } else {
    writeBlock(getCode("FEED_MODE_UNIT_MIN"));
  }

to

gFeedModeModal.reset();
  if (currentSection.feedMode == 0 && getParameter("operation-strategy") == "drill") {
    writeBlock(getCode("FEED_MODE_UNIT_REV"));
  } else {
    writeBlock(getCode("FEED_MODE_UNIT_MIN"));
  }

 

Now save the post and test it carefully.

Thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 7 of 16

Anonymous
Not applicable
Thanks for your effort. Really appreciate it. The program now gets the G95
instead of G94 but the feed parameters are the same as with G94. Picture
of the program with the edited post processor attached for your reference.

[image: Screenshot 2020-08-17 at 10.58.16 PM.png]
0 Likes
Message 8 of 16

Anonymous
Not applicable

unnamed.png

 The program with suggested edits.

0 Likes
Message 9 of 16

KrupalVala
Autodesk
Autodesk

Hi @Anonymous,

 

Sorry for that, Search function onCycle() { in your post and update the codes as shown below,

 

function onCycle() {
  
  expandCurrentCycle = false;

  if ((cycleType != "tapping") &&
      (cycleType != "right-tapping") &&
      (cycleType != "left-tapping") &&
      (cycleType != "turning-canned-rough")) {
        if ((cycleType == "drilling")){
//Replace above dondition with below, to get feed/rev in holemaking cycles 
//if (getParameter("operation-strategy") == "drill"){ 

    writeBlock(feedOutput.format(getParameter("operation:tool_feedPerRevolution")));
        }else{
          writeBlock(feedOutput.format(cycle.feedrate));
        }
      }

 

If you are doing drilling (Drilling - Rapid out) operation then only you will get Feed/Rev. Based on your requirement, you can add other option and modify the post as shown in above comment(//).

 

Thanks, 



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 10 of 16

j.floyd.fusion360
Contributor
Contributor

When I search this, I get that first line of code the

function onCycle() {

but nothing else matches.

I am using a FANUC generic post and it seems whenever deep drilling is selected it enables the G98 instead of G99 for feed.

I used the first part you mentioned to fix the G98 section, but I also have a full IPM given on the posted code.

What more do you need from me to help fix this?

 

0 Likes
Message 11 of 16

KrupalVala
Autodesk
Autodesk

Hi @j.floyd.fusion360 ,

 

In you case, You need to change G98 to G99 manually And to get IPR/MPR instead of IPM/MPM, set useG95true, in the post properties.

 

thanks,  



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
0 Likes
Message 12 of 16

KrupalVala
Autodesk
Autodesk

Hi @j.floyd.fusion360 ,

 

Please consider this solution if you are using Fanuc Turning post,

 

Open your post in any editor. Search below code and change the if condition as shown below,

gFeedModeModal.reset();
 //if (currentSection.feedMode == FEED_PER_REVOLUTION) { 
 if (currentSection.feedMode == 0 && getParameter("operation-strategy") == "drill") {
    writeBlock(getCode("FEED_MODE_UNIT_REV"));
  } else {
    writeBlock(getCode("FEED_MODE_UNIT_MIN"));
  }

Now Define var F as shown below,

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

    //var F = cycle.feedrate;
    var F = (gFeedModeModal.getCurrent() == 99 ? cycle.feedrate/spindleSpeed : cycle.feedrate);
    var P = !cycle.dwell ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds

 

 and For the case of Tapping add If condition,

case "tapping":
      if (!F) {
        F = tool.getTappingFeedrate();
      }
      // F = tool.getThreadPitch() * rpmFormat.getResultingValue(spindleSpeed);
      if (properties.useRigidTapping != "no") {
        startSpindle(true, false);
      }

 

Now save the post and test the code carefully. It will give you a desired NC output.

 

Thanks,

 



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
Message 13 of 16

KrupalVala
Autodesk
Autodesk

Hi @j.floyd.fusion360  && @Anonymous ,

 

One correction in the below Code,

if (currentSection.feedMode == FEED_PER_REVOLUTION || getParameter("operation-strategy") == "drill") {

 

It will give you G99 With Feed Per Revolution in a Drilling as well as Turning Operation.

 

Thanks, 

 



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
Message 14 of 16

j.floyd.fusion360
Contributor
Contributor

This solves almost all the problem.

Now everything has G99 except grooving cycles.

Those still populate a G98.

What may I do to fix this?

0 Likes
Message 15 of 16

KrupalVala
Autodesk
Autodesk

Hi @j.floyd.fusion360 ,

 

You need to select use feed Per revolution in Toolpath.

 

KrupalVala_0-1603518681791.png

 

thanks,



Krupal Vala
Senior Technology Consultant - Post Processor & Machine Simulation
Message 16 of 16

j.floyd.fusion360
Contributor
Contributor

Aaah Yes, Simple overlooked mistake. Thank you.

0 Likes