587,132 active members*
3,071 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > G-Code Programing > Reaching a point with radiused tool on mill.
Page 1 of 3 123
Results 1 to 20 of 52
  1. #1
    Join Date
    Jul 2003
    Posts
    1220

    Question Reaching a point with radiused tool on mill.

    When using G41 or G42 Offset.
    I find my Fagor controller will run some tool paths and not others and haven't yet found what the criterion is.
    The code is all G01 (NO G02/03) and it refuses to go to a point.
    The point is usually very close (.01) to the adjacent points.
    I contend that a tool with a radius cannot reach a point between two other points (G01) where the angle of the three points is less than 180deg.
    As the controller processes most of the tool path, there must be a criterion where it rejects the code. eg four decimal places?
    Any others have the same problem?

  2. #2
    Join Date
    Sep 2006
    Posts
    5
    you might have to lie to your machine and change your R value, like if you have R.375 make it smaller R.373 . Is it for lathe, or mill?

  3. #3
    Join Date
    Jul 2003
    Posts
    1220
    cnc prog
    Forgot to say this condition is when using G41 or G42.
    This is on a Mill but, I think the same may be for a lathe.
    I do already lie to my machine in some cases. eg: If I'm using a 10mm tool and need to cut a internal 5mm radius I enter 4.999mm.
    I am hoping someone can enlighten me when a round cutter can reach a point between two other points, when the angle between the two outer point from the centre point is less than 180deg.

  4. #4
    Join Date
    Mar 2003
    Posts
    4826
    The control must create its tool radius offset path in the form of an arc between two lines which meet at an intersection. When the tool must travel through an arc that is greater than 180 degrees, the arc will always have a real, positive value for its radius. The endpoints of the commanded intersecting lines are valid destinations,even when offset and the control has 'space' to insert the new arc that it creates to perform radius compensation.

    When the angle between the two intersecting lines is less than 180 degrees, the control creates two offset lines and trims them together to create an arc of zero radius. I suspect if this 'internal offset' results in a trim that deletes the entire entity, then the control returns an error because it already travelled farther than it should have, even if it is parked at the beginning position of the line which has since vanished through the trim operation.

    That is my theory.

    For foolproof execution of a path on which you intend to run full radius machine compensation on, you might as well fillet every internal corner (less than 180 degrees) to match the tool radius, because that is what the control is going to have to do for you. The benefit is, if there are any entities which vanish in carrying out this operation, you will have forseen them, and can take steps to trim and fillet the geometry to the entity before or the entity after the disappearing intersection.

    This is one advantage of using a good CAM system to create offset geometry, with the tool center following the new geometry. Hopefully, the CAM is capable of performing perfect trimming of the new path. This would be an advantage of using offset part geomety in conjunction with only wear compensation to adjust for perfect part size. Since wear compensation is only going to be a few thousandths, it represents a very small radius tool which will have a better chance of negotiating the turns between very short entities.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  5. #5
    Join Date
    Jul 2003
    Posts
    1220
    Hu
    That sounds like a plausible explanation.
    But that means the tool has not machined the profile correctly.
    Is that what happens on all profiles with less than 180deg points when using G41/G42?

  6. #6
    Join Date
    Mar 2003
    Posts
    4826
    Technically, yes. The tool cannot fit inside a sharp intersection of less than 180 degrees and reach the apex of the angle. So, some rounding has to take place. When the original arcs have been interpolated to create linear segment geometry, a tolerance has already been assigned and you have agreed that the path is not going to be perfect. No path can have an internal corner smaller than the tool radius used to cut it.

    G41/G42 does not create this problem with deviation from perfection, nor does it exaggerate any error. The designer of the geometry only need recognise the limitations of using round tools to machine sharp internal corners. He should technically model the geometry with internal fillets that match the tool to be used. Then he will know that what he is looking at is what he will get off the machine.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  7. #7
    Join Date
    Jul 2003
    Posts
    1220
    Hu
    I accept these variations are/should-be know when drawn by a draught person.
    The problems I've encounted is when the tool path is generated from a solid model (no consideration for the machining) and the CAM program created tool path made up with only straight lines G01 (no G02/G03).
    These arcs are much larger than the tool radius but made up of short straight movements.

  8. #8
    Join Date
    Apr 2006
    Posts
    402
    At the moment I am programming this can of worms. The moves on the lowest resolution, as X+1, Y+1, X+1, Y+1, would generate 180+, 180-, 180+, 180-. The radius of millradius+1 when doing 180+, leads probably to rounding errors. My guess is that the risk of an error is the greatest in the above sequence (45 degrees).

  9. #9
    Join Date
    Mar 2003
    Posts
    4826
    Kwi,
    I do not believe an interpolated path such as you describe is suitable for use with tool radius compensation. An intermediate step to optimize the interpolated path back into arcs would probably help.
    First you get good, then you get fast. Then grouchiness sets in.

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  10. #10
    Join Date
    Jul 2003
    Posts
    1220
    fkaCarel
    You are away ahead of me with your math for me to grasp your explantion. Sorry.

    Hu
    This is all part of the learning for me.
    I'm generating the code with a CAM program (2D) using G41/42.
    Set the radius on the controller a little larger than actual tool radius, do the number of passes to get the full depth (Z). Then reset the radius to the correct figure and do a finishing pass. This is why I preferred to use G41/42 which gives me this option.
    It's while running the code that the machine stalled and complained about the figures. Not every time, just enough to a annoyance.
    I would look at writing a macro to check the code if I knew what the criterion is and check before sending to the machine.

  11. #11
    Join Date
    Apr 2006
    Posts
    402
    G01 X/Y moves generate 90 degree moves. The radius compensation program will solve for example, an Y+1 with an 90 degree circle, where the X+1 is solved with compensation of the half-angle. A steady X+1, Y+1 G01 instruction sequence (45 degrees) can only be solved with a steady sequence of internal circular interpolation anticlockwise 180 270 1.414 radius. The Y+1, X+1 sequence, following the X+1, Y+1 can lead to the conclusion "I'm already there or there is a rounding overshoot error". So the system orientation is better of with small linear interpolation commands. Hope I make myself clearer this way.

  12. #12
    Join Date
    Jul 2003
    Posts
    1220
    I've drawn a spiral tool path with a G41 offset and ran to see were the controller stalled.

    Here is part of the code with the stall point marked:
    N0140 G41 X6.169 Y3.78 Z0
    N0141 G41 X5.85 Y3.951 Z0
    N0142 G41 X5.525 Y4.103 Z0
    N0143 G41 X5.194 Y4.235 Z0
    N0144 G41 X4.859 Y4.348 Z0
    N0145 G41 X4.542 Y4.434 Z0
    N0146 G41 X4.222 Y4.502 Z0
    N0147 G41 X3.902 Y4.551 Z0
    N0148 G41 X3.583 Y4.581 Z0
    N0149 G41 X3.265 Y4.593 Z0
    N0150 G41 X2.951 Y4.585 Z0
    N0151 G41 X2.641 Y4.558 Z0 ;<<<<<<<<<<<<<<<<<<
    N0152 G41 X2.336 Y4.511 Z0
    N0153 G41 X2.061 Y4.45 Z0
    N0154 G41 X1.792 Y4.373 Z0
    N0155 G41 X1.531 Y4.279 Z0
    N0156 G41 X1.279 Y4.17 Z0
    N0157 G41 X1.037 Y4.045 Z0
    N0158 G41 X0.806 Y3.906 Z0
    N0159 G41 X0.38 Y3.583 Z0
    N0160 G41 X0.203 Y3.416 Z0

    Also pic showing the 10mm tool on path and point of stall.
    Attached Thumbnails Attached Thumbnails SpiralG41TEST.jpg  

  13. #13
    Join Date
    Jul 2003
    Posts
    1220
    fkaCarel
    Sorry but still unable to follow your explanation. Any chance of a picture.

    I have since drawn the curve where the controller stalls and can see the tool path (centre of the cutter) gets crossed over, but not sure how a algorithm can be written to test the code to find this condition.

  14. #14
    Join Date
    Apr 2006
    Posts
    402
    Kiwi, I have, just to keep the (old) mind sharp, recalculated your program and it never makes a negative move, it can compensate running the same direction as your program. However, I miss in your program the last move (X-positive), which off course is the sharpest.
    The Algorithm in VB (and Dutch), this is a development program for my computer, I had to reverse X and Y for your data:

    Private Sub Command1_Click()
    OldHoek = Val(Text1)
    NewHoek = Val(Text2)
    SnijLijn = OldHoek + NewHoek
    SnijLijn = SnijLijn / 2
    Do
    If SnijLijn > 90 Then
    SnijLijn = SnijLijn - 90
    Else
    Exit Do
    End If
    Loop
    Text3 = Str(SnijLijn)
    RHoek = OldHoek - NewHoek
    If RHoek < 0 Then
    RHoek = 0 - RHoek
    End If
    If RHoek > 180 Then
    RHoek = RHoek - 180
    End If
    RHoek = RHoek / 2
    Text4.Text = Str(RHoek)
    Schuine = RHoek
    Schuine = GraRad(Schuine) 'conversion to radians
    Schuine = Cos(Schuine)
    Text5.Text = Str(Schuine)

    X_Comp = GraRad(SnijLijn)
    X_Comp = Cos(X_Comp)
    X_Comp = X_Comp / Schuine
    X_Comp = X_Comp * 5 '5 = mill radius
    If X_Comp < 0.005 Then
    X_Comp = 0
    End If
    Text6.Text = Str(X_Comp)

    Y_Comp = GraRad(SnijLijn)
    Y_Comp = Sin(Y_Comp)
    Y_Comp = Y_Comp / Schuine
    Y_Comp = Y_Comp * 5 '5 = mill radius
    If Y_Comp < 0.005 Then
    Y_Comp = 0
    End If
    Text7.Text = Str(Y_Comp)

    End Sub

    Function GraRad(Graden As Single) As Single
    GraRad = Graden * PI / 180
    End Function

  15. #15
    Join Date
    Apr 2006
    Posts
    402
    As pictures say more than words, here are two. One is the underlying fundamentals of the program, the other the expected reaction of X+Y+X+Y+ moves (90 degree sequence).
    Attached Thumbnails Attached Thumbnails Comp.JPG   Step.JPG  

  16. #16
    Join Date
    Jul 2003
    Posts
    1220
    fkaCarel
    If I'm understanding your program correctly you are testing each set (point with two adjacent points) with radius to determine if positive or negative. Which tells us the tool radius is too long and/or the path entities too short.
    This being the first test, I also think the tool-centre point is relavant as this can be between the adjacent centre-point and the radius cutting point, which will create an undercut in the part.
    Pic showing where cutter moving into adjacent 'set'. Not to scale.

    Here is the end part of the tool path. Posted previously but got lost somewhere in the system.
    N0160 X0.203 Y3.416 Z0
    N0161 X0.039 Y3.239 Z0
    N0162 X-0.11 Y3.052 Z0
    N0163 X-0.242 Y2.857 Z0
    N0164 X-0.356 Y2.655 Z0
    N0165 X-0.449 Y2.447 Z0
    N0166 X-0.522 Y2.233 Z0
    N0167 X-0.571 Y2.017 Z0
    N0168 X-0.596 Y1.785 Z0
    N0169 X-0.594 Y1.55 Z0
    N0170 X-0.565 Y1.311 Z0
    N0171 X-0.511 Y1.068 Z0
    N0172 X-0.432 Y0.821 Z0
    N0173 X-0.327 Y0.569 Z0
    N0174 X-0.199 Y0.311 Z0
    N0175 X-0.048 Y0.048 Z0

    BTW... I saw your GraRad and thought this was a function that I didn't know about. Also I set Pi = Atn(1) *4
    Attached Thumbnails Attached Thumbnails SprialG41Test2.jpg  

  17. #17
    Join Date
    Apr 2006
    Posts
    402
    The program does'nt test, it creates the toolpath. So if you are at point A, you look at the interconnect at point B, calculate the Comp_X and Comp_Y, add or subtract these from the point B coordinates and go there. So it is for a one step look-ahead. So, to mention the picture, you translate for every programmed point a compensated point, which is the real center-mill path. The line through the circle is exactly what it avoids.

  18. #18
    Join Date
    Jul 2003
    Posts
    1220
    fkaCarel
    What I was hoping to do was to check my code before it went to the machine to prevent delays. Even when I find an error I don't have a simple fix. The best solution for the ones with errors, looks like making a offset path but this doesn't give me the the same options when machining. The annoying thing is that not every path has these errors and it would be good to run the error free ones with G41/42.
    I'll need to work on this, but first I have to get my head arround how to identify the symptoms.
    Thanks for your help. I believe I have a better understanding of the problem.

  19. #19
    Join Date
    Apr 2006
    Posts
    402
    I saw you generated your code with increments of 4 degree. If you integrate the compensation, you can create an error when the path moves forward, but the toolpath moves backward. This is what your controller sees happening.
    Attached Thumbnails Attached Thumbnails 149_4937.JPG  

  20. #20
    Join Date
    Jul 2003
    Posts
    1220
    When I generated the spiral I just created the shape of no particular specification only to suit the 10mm cutter which I believed would stall the controller.
    I can see the tool path move backwards on my CAD drawing but my level of math dosen't include intergration to calculate this so I'll need to do some study.

Page 1 of 3 123

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •