G71

More
24 May 2019 18:03 #134835 by automata
Replied by automata on topic G71
github.com/LinuxCNC/linuxcnc/blob/andypu...python/remap.py#L165

This is the line that reads in the gcode within the o sub / o endsub suboutine.
It uses regex to find the subroutine and read it into the array gcode
-automata

Please Log in or Create an account to join the conversation.

More
24 May 2019 18:24 #134839 by andypugh
Replied by andypugh on topic G71

a It appears Python source code is using o-codes for start and end finish coordinates. .


Yes. it uses a numbered O-sub as a container for the G-code that defines the profile.
One subtle advantage of this is that it means that the finish pass literally just needs to call the sub.

Please Log in or Create an account to join the conversation.

More
24 May 2019 19:36 - 24 May 2019 20:09 #134842 by smplc
Replied by smplc on topic G71
automata,

It appears it's a pathname. I suppose if a main program it could recover o-code from file.

I'd probably use P_ and Q_ for starting and ending finish coordinates. Such case make them a recoverable program. Prefer not to make a separate program and perhaps scan if configurable. Idea is writing main program containing multiple blocks, some including G71 finish coordinates and 1st operation.
Last edit: 24 May 2019 20:09 by smplc.

Please Log in or Create an account to join the conversation.

More
24 May 2019 19:43 #134843 by smplc
Replied by smplc on topic G71
andypugh,

Okay, reminds me of a G70.

Please Log in or Create an account to join the conversation.

More
25 May 2019 11:36 #134888 by automata
Replied by automata on topic G71
Hi Andy and Patrik T,
I think I have understood the algorithm for offsetting the curve by different values in X and Z axes.
Assumptions:
1. Profile is monotonic (increasing or decreasing) in Z axis.
2. Profile may or may not be monotonic in X

First apply Tool diameter compensation (like in milling) to the current profile using the cutter compensation by a value of K*2. This compensation is NOT similar to the turning tool nose radius compensation where the tool origin(tool control point) is also shifted. This offset is like the milling offset where, the tool control point is assumed to be at the center of a round tool.
Now the new profile is always K distance from the actual profile.

After this apply a linear offset of value I-K to the K-compensated profile. This will ensure that the flat portions of the original profile will have an offset of I from the new cut profile.

Further if Tool nose radius compensation is ON (G41,G42), then apply the tool nose radius compensation to the final shifted profile.

Same algorithm can be followed for G73 (pattern shifted profile).

Does this sound correct?

I will be doing a few mock-ups and trials in python for the roughing finishing pass before writing C code for it. Any suggestions are appreciated.

Regards
-automata

Please Log in or Create an account to join the conversation.

More
25 May 2019 12:33 #134890 by andypugh
Replied by andypugh on topic G71
I am a little confused here.

I thought that the problem actually was lathe-tool radius compensation.

My Python algorithm already handles the X and Z offsets of the roughing pass.

Note that you might want to abstract X and Z (as my code does) to handle the G72 casw where the profile is monotonic in X but not necessarily in Z.

There might be an argument that lathe tool compensation isn't 100% necessary during the roughing phase, if enough material is left on for the finishing phase which can be run using existing code.

Why bother with a Python mockup when there already is an extensively checked one?

Please Log in or Create an account to join the conversation.

More
25 May 2019 13:57 #134894 by automata
Replied by automata on topic G71
Hi Andy,
In the current cycle implementation you have programmed, with high depth of cut D, we are left with high amount of material on the horizontal sections if the Depth of cut is not an exact multiple of the radius of the flat sections.

The material left over is high enough not to allow a uniform finish pass.

For eliminating this high leftover material on horizontal parts of the profile, most professional controllers offer a roughing finish pass which is offset by I and K from the programmed surface.
This is same as a G73 pattern cutting pass with I and K offsets.
So we need to run

I agree with you that there is an argument to be made for not having TNRC (tool nose radius compensation) during roughing.

However, I did add nose radius compensation to your current implementation by 2 methods
1. using self.execute("") in the python code. This will call TNRC if it is active in the code preceeding the G71 call
2. explicitly computing the G41/42 offsets in the individual cuts made and then use emccanon.* functions instead of self.execute("G1 Zzzz")

The I and K offsets are required by the roughing finishing pass at the end of G71 and also required by G73.

Point taken about making the axes computation generic to be able to reuse code in G72.

The reason for python mockup is ease of testing everything in python before pushing it to C.

-automata

Please Log in or Create an account to join the conversation.

More
25 May 2019 18:38 #134913 by Patrik T
Replied by Patrik T on topic G71
Sounds good, I did the I - K thing you mentioned.

Please Log in or Create an account to join the conversation.

More
07 Jun 2019 14:19 #136204 by r.lol
Replied by r.lol on topic G71
Hi !

I've trying to get basic G71/G72 working and to get a kick start, I tried this branch . But Whiel running sample codes I received an error
G71: The programmed profile has an exit ramp angle of 232.871519507 and can not be cut with the active tool frontangle of 87.0
.

And similar error was encountered in three out of four files present in nc_files folder:
  • G71test2.ngc
  • G72test1.ngc
  • G71test1.ngc

There would be high probability of something being wrong in my setup but I'm not able to pin-point it.

I cloned the project, checkout the branch, compiled it and ran the sim-axis-g71-lathe configuration.

Please Log in or Create an account to join the conversation.

More
07 Jun 2019 14:28 #136206 by andypugh
Replied by andypugh on topic G71
This is a problem with the tool shapes in the tool table.
Though it seems a bit odd, as the tool table is part of the sim fileset normally.

With the tool selected, does the profile _look_ like it could be machined with the selected tool?

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum