Change feed for drills and taps to inches per rev for lathe

Change feed for drills and taps to inches per rev for lathe

Anonymous
Not applicable
1,932 Views
13 Replies
Message 1 of 14

Change feed for drills and taps to inches per rev for lathe

Anonymous
Not applicable
What changes do I need to make to the fanuc lathe  post to change the feed for the drill cycles and tap cycles to inches per revolution.
1,933 Views
13 Replies
Replies (13)
Message 2 of 14

skidsolo
Alumni
Alumni
You should try changing the property useG95: false to true in the post dialog box. You might have to scroll down a bit into the property's to see it.
Andrew W. Software engineer (CAM Post Processors)
0 Likes
Message 3 of 14

Anonymous
Not applicable
I looked for what you suggested but could not find it so I am attaching the post. Please show me where this is.
0 Likes
Message 4 of 14

skidsolo
Alumni
Alumni
Its inside generic Fanuc milling post:

// user-defined properties
properties = {
  writeMachine: true, // write machine
  writeTools: true, // writes the tools
  preloadTool: true, // preloads next tool on tool change if any
  showSequenceNumbers: true, // show sequence numbers
  sequenceNumberStart: 10, // first sequence number
  sequenceNumberIncrement: 5, // increment for sequence numbers
  optionalStop: true, // optional stop
  o8: false, // specifies 8-digit program number
  separateWordsWithSpace: true, // specifies that the words should be separated with a white space
  allow3DArcs: false, // specifies that 3D circular arcs are allowed
  useRadius: false, // specifies that arcs should be output using the radius (R word) instead of the I, J, and K words
  useParametricFeed: false, // specifies that feed should be output using Q values
  showNotes: false, // specifies that operation notes should be output
  useSmoothing: false, // specifies if smoothing should be used or not
  usePitchForTapping: false, // enable to use pitch instead of feed for the F-word for canned tapping cycles - note that your CNC control must be setup for pitch mode!
  useG95: false // use IPR/MPR instead of IPM/MPM
};

And then inside onCyclePoint

    var F = cycle.feedrate;
    if (properties.useG95) {
      F = F/spindleSpeed;
    }
    var P = (cycle.dwell == 0) ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds

Then look for properties.useG95 and copy and paste what you need from one to the other.
Andrew W. Software engineer (CAM Post Processors)
0 Likes
Message 5 of 14

LibertyMachine
Mentor
Mentor

I realize this is an old thread, but I was looking to modify a post similar to what the OP was asking. The solution that has been posted is not correct, as it is for a MILL, whereas the OP was asking about a LATHE. The code that is being referenced does not exist, and simply adding it in does not end with good results.


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
Message 6 of 14

Laurens-3DTechDraw
Mentor
Mentor

What have you tried and what didn't work?

Laurens Wijnschenk
3DTechDraw

AutoDesk CAM user & Post editor.
RenƩ for Legend.


0 Likes
Message 7 of 14

LibertyMachine
Mentor
Mentor

With my limited knowelege of the post language, I thought I could just add the following:

 

usePitchForTapping: false, // enable to use pitch instead of feed for the F-word for canned tapping cycles - note that your CNC control must be setup for // pitch mode!
  useG95: false // use IPR/MPR instead of IPM/MPM

 

That resulted in an error, as you might imagine. Basically I was just guessing at the possible answer..

 

 


Seth Madore
Owner, Liberty Machine, Inc.
Good. Fast. Cheap. Pick two.
0 Likes
Message 8 of 14

Steinwerks
Mentor
Mentor

Bringing this one back as I'm trying to get a simple (Read: VERY simple) 2-axis turning post working for our Amera Seiki lathe. It's been interesting as we don't use a WCS at the machine, no G17/18/19 planes, etc. However we do use FPR for drilling operations. As such I modified the "useG95" code to work and had to make a few changes. I called it "useG99" of course as that's the format on the lathe.

 

User properties defaulted to true:

 

useG99: true // use IPR/MPR instead of IPM/MPM

 

in the ForceAny section I changed this section:

 

  gFeedModeModal.reset();
  if (currentSection.feedMode == FEED_PER_REVOLUTION || properties.useG99) {
    writeBlock(gFeedModeModal.format((properties.type == "A") ? 99 : 95));
  } else {
    writeBlock(gFeedModeModal.format((properties.type == "A") ? 98 : 94));
  }

And about a page down from OnCycle:

 

    var F = cycle.feedrate;
	if (properties.useG99){
		F = F/tool.spindleRPM;
	};
    var P = (cycle.dwell == 0) ? 0 : clamp(1, cycle.dwell * 1000, 99999999); // in milliseconds

 

In some initial testing this seems to work as desired.

 

There is a variable for distance per revolution output in the dump file:

 

1502: onParameter('operation:tool_feedPerRevolution', 0.01)

 

But I couldn't seem to have it pull from that value. Any ideas on this front would be great. Maybe using tool.feedPerRevolution instead of F/tool.spindleRPM ? I'll have to keep experimenting.

 

Edit: tool.feedPerRevolution gives this post error:

 

Error: Error: Mismatching arguments for invocation of 'string VariableImpl.format(Number)' (Value is not a number.).
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Stack dump:
("Mismatching arguments for invocation of 'string VariableImpl.format(Number)' (Value is not a number.).")@:0
onCyclePoint(0,0,-0.09999999849815068)@***.cps:873

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 9 of 14

HughesTooling
Consultant
Consultant

I haven't tried this but does this get what you're after?

getParameter("operation:tool_feedPerRevolution"))

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 10 of 14

Steinwerks
Mentor
Mentor

No go. Put in this:

 

F = getParameter("operation:tool_feedPerRevolution");

And got this:

 

N121 G84 X0. Z-1.05 R0.05 P0 F8.33333

 

(tap is a 9/16-12 UNC)

 

I'm also screwing with the tapping code (which I'm going to start a new thread on I think) so this might be affecting things. But I don't see how yet. The F/tool.spindleRPM outputs correctly (so far) if useG99 is set to Yes in the PP.

 

Edit: sorry, it does work for the drilling operation, but as the tap has no tool_feedPerRevolution value, it fails.

Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 11 of 14

HughesTooling
Consultant
Consultant

I have a fanuc post that outputs a G76 cycle for threading, it uses getParameter("operation:threadPitch") to get the pitch, is that available for for taps?

 

Mark

Mark Hughes
Owner, Hughes Tooling
Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.

EESignature


0 Likes
Message 12 of 14

Steinwerks
Mentor
Mentor
The parameter I'd choose to pull is

onParameter('operation:tool_threadPitch', 0.08333333333333298)

but honestly I might just run with what I've got. It seems to work fine and it keeps the post clean. The more pressing issue is either eliminating the M03 for the spindle in tapping or changing it to an M103 for live tooling (taps under .38" in diameter). Thanks for the help though @HughesTooling , good insight as usual!
Neal Stein

New to Fusion 360 CAM? Click here for an introduction to 2D Milling, here for 2D Turning.

Find me on:
Instagram and YouTube
0 Likes
Message 13 of 14

ctscsmith
Contributor
Contributor

Could this be done from inside the cam software? seems like a lot of work to get a  really basic common code to output in a conventional manner.  How would one implement this on another post (Samsung)?

0 Likes
Message 14 of 14

jackwsmach
Explorer
Explorer

How about if you know how to fix this, you just make the change and put the post out as Fanuc Lathe - IPR drill?  Nobody I know ever uses IPM on a 2 axis lathe except for a bar pull or something else that doesn't have the spindle turning.  Wouldn't everybody be better off if you made this simple fix and make your software work the way the customer expects it to rather than having so many customers try to fix it and possibly have crashes because of it?  I understand that it does work with IPM, but it makes it so much harder to prove out a part, for example, I know my 1/2-13 tap should feed at .0769 IPR off the top of my head, but that same tap in IPM at 180 RPM I would need a calculator.  Drills similarly I know I would feed them at .0035, but again I would need a calculator when you post them in IPM.  I know you want people to blindly trust your software, but it's not just that.  If the one pushing the buttons isn't the one who programmed it, it's a little harder to have absolute faith in the posted file.  I'm sorry if I went on too long about the reasons why we would like it to be in IPR, but I don't want you to think we are asking for no reason.