586,030 active members*
2,856 visitors online*
Register for free
Login

Thread: g41 error ?

Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2015
    Posts
    24

    g41 error ?

    i was doing a simple job making some t-nut and i had drawn them in capsmill and run a tool path simulation and all looked fine but when the machine went to do the finish pass on the step it headed of in the wrong direction. it was supposed to go from x 127mm to x 0 but instead it went almost 400mm in the wrong direction. on the next line it tried to go almost 400mm on the y axis.the code looks like this.
    G43 H09 Z3.000
    S717
    X127.500
    G43 H09 Z-13.500
    F50.2
    G01 Z-14.000
    F71.7
    X0.000 (this is the final full depth pass that worked fine)
    G00
    G43 H09 Z3.000
    X127.500 Y-32.375
    F50.2
    G01 Z-14.000
    F71.7
    G41 X136.375 H09 (heres where it lost the plot on the x axis)
    G03 X127.500 Y-23.500 I-8.875 J0.000
    G01 X0.000 H09
    G03 X-8.875 Y-32.375 I0.000 J-8.875
    G01 G40 X0.000
    G00
    G43 H09 Z3.000
    the first question is a g code one , why did the cam program use G03 ? it a straight cut. the other question is why did the controller react like this to a G41 tool offset . is there a way to check the tool offset in older fanuc om controllers. i can find the length offsets but not the diameter. aslo it didnt rapid there like it was a tool positioning move it drove there at the feed rate. i dont think it is a G54 cancellation problem because it doesnt add up my offsets were X-187, Y-132, so a 127mm move cannot add up to 400mm. is this a post processor issue or a controller error? thanks

  2. #2
    Join Date
    Feb 2015
    Posts
    174

    Re: g41 error ?

    Messy code, that aside. I don't see any radius register offset call. To say G41 and not tell the machine where the radial sizes are located is like telling it nothing related to G41.

    G41 X136.375 H09 (heres where it lost the plot on the x axis)
    G03 X127.500 Y-23.500 I-8.875 J0.000
    G01 X0.000 H09
    G03 X-8.875 Y-32.375 I0.000 J-8.875
    G01 G40 X0.000
    G00
    G43 H09 Z3.000

    I don't see where you have called a register for tool compensation. G41 X136.375 H09? G01 X136.375 G41 D9 F1. (feed whatever)
    G01 G40 X0.000 (G40 says turn off cutter comp, there was none there to begin with that I see)

    The code is loose and scattered. Could you post the whole section of code so I can go through it? It needs to be tighter and less bulky, way too much redundant modal calls missing key points. I write code for Fanuc controllers daily and I am confused by this. I'm interested.

  3. #3
    Join Date
    Dec 2008
    Posts
    3109

    Re: g41 error ?

    You need to know what each piece of code is telling the machine what to do.
    It is not a G54 problem

    - t does your machine have Wear & Geometry offset pages ?..... Yes ? then you cannot use the same offset number that holds a length offset, you have to use a different method
    - I use the number of the tool to hold the tool length, add 30 to hold the diameter value ie T2 uses the Geometry offset #2 for length & the Geometry offset #32 for the diameter ....I don't use the wear pages ever
    so for your T9, G#9 holds the length, G#39 for the tool radius....... H is needed with G43 & D is needed with a G41/G42 ....
    the value in Wear is added to the Geometry for the total offset ie G#2 has 175.000 & W#2 has 3.100, then the value when called is a 178.100 adjustment, so a H2 call is 178.1 & is the same as a D2 call


    G43 H09 Z3.000 ( rapid to Z3 adding the value in H9 to the spindle nose position )
    S717
    X127.500 ( goto X position......missing Y value, unless the Y position was called in the last Y movement )
    G43 H09 Z-13.500 ( rapid to Z-13.5 adding the value in H9 to the spindle nose position (suggest a G01 feed move when going below the top of part))....G43 & H09 not required
    F50.2
    G01 Z-14.000 ( feed to Z-14. )
    F71.7
    X0.000 (this is the final full depth pass that worked fine)
    G00
    G43 H09 Z3.000 (rapid to Z3 adding the value in H9 to the spindle nose position ) ... G43 & H09 not required
    X127.500 Y-32.375
    F50.2
    G01 Z-14.000
    F71.7
    G41 X136.375 H09 (cutter comp LEFT, D# is required, last D stated is assumed )...H09 is incorrect, Y position needed(Y-23.5)
    G03 X127.500 Y-23.500 I-8.875 J0.000
    G01 X0.000 H09 ( H09 not required)
    G03 X-8.875 Y-32.375 I0.000 J-8.875
    G01 G40 X0.000 ( cancel comp while moving back to X0....suggest adding Y value (Y-23.5))
    G00 (delete)
    G43 H09 Z3.000 (delete)
    G00 Z3.

  4. #4
    Join Date
    Feb 2015
    Posts
    174

    Re: g41 error ?

    OK, its what Superman said. I was too tired to explain in this depth. Yes! Nailed it.

    "The code is loose and scattered. Could you post the whole section of code so I can go through it? It needs to be tighter and less bulky, way too much redundant modal calls missing key points. I write code for Fanuc controllers daily and I am confused by this."

    What he said. ^

    I wanna party with that dude!

    redundant modal calls too much useless code

    Edit: Kick it out here anyway, when you see how small your code will get, easy to read, machines not ignoring what it knows to be already in place. Trust me, when you can read the code as the machine does, things get a lot easier.

  5. #5
    Join Date
    Feb 2015
    Posts
    24

    Re: g41 error ?

    the code was produced by the capsmill program so at least i dont have to take responsibility for that. the software came with the machine but i have my doubts about it. heres the whole code.
    %
    O0002* ()
    *()
    *()
    *(04-03-2015)
    N1G17G21G40G54G80G94
    G91G30 Z0.000
    G30X0.000 Y0.000
    *()
    T12M06* (14.00 MM. DIA. TWIST DRILL)
    T09* (14.00 MM. DIA. TWIST DRILL)
    S636M03
    M08
    (DRILL)
    G90 G00 G54 X15.000 Y-15.000
    G43 H12 Z100.000
    G43 H12 Z3.000
    G98 G81 Z-30.206 R3. F63.662
    X47.500
    X80.000
    X112.500
    G0 G80
    M05
    M09
    G43 H12 Z100.000
    G80
    G91G30Z0.000
    G30 X0.000Y0.000
    M01
    *()
    N2G91G30Z0.000
    G30 X0.000Y0.000
    T09M06* (18.00 MM. DIA. END MILL-FINISH-2 FLUTE)
    T12* (18.00 MM. DIA. END MILL-FINISH-2 FLUTE)
    S627M03
    M08
    (SIDE MILLING)
    G90 G00 G54 X127.500 Y-32.575
    G43 H09 Z100.000
    G43 H09 Z3.000
    F70.3
    G01 Z-4.000
    F100.4
    X0.000
    G00
    G43 H09 Z3.000
    X127.500
    F70.3
    G43 H09 Z-3.500
    G01 Z-8.000
    F100.4
    X0.000
    G00
    G43 H09 Z3.000
    X127.500
    F70.3
    G43 H09 Z-7.500
    G01 Z-12.000
    F100.4
    X0.000
    G00
    G43 H09 Z3.000
    X127.500
    F70.3
    G43 H09 Z-11.500
    G01 Z-13.800
    F100.4
    X0.000
    G00
    G43 H09 Z3.000
    S717
    X127.500
    G43 H09 Z-13.500
    F50.2
    G01 Z-14.000
    F71.7
    X0.000
    G00
    G43 H09 Z3.000
    X127.500 Y-32.375
    F50.2
    G01 Z-14.000
    F71.7
    G41 X136.375 H09
    G03 X127.500 Y-23.500 I-8.875 J0.000
    G01 X0.000 H09
    G03 X-8.875 Y-32.375 I0.000 J-8.875
    G01 G40 X0.000
    G00
    G43 H09 Z3.000
    (SIDE MILLING)
    S627
    Y2.575
    F70.3
    G01 Z-4.000
    F100.4
    X127.500
    G00
    G43 H09 Z3.000
    X0.000
    F70.3
    G43 H09 Z-3.500
    G01 Z-8.000
    F100.4
    X127.500
    G00
    G43 H09 Z3.000
    X0.000
    F70.3
    G43 H09 Z-7.500
    G01 Z-12.000
    F100.4
    X127.500
    G00
    G43 H09 Z3.000
    X0.000
    F70.3
    G43 H09 Z-11.500
    G01 Z-13.800
    F100.4
    X127.500
    G00
    G43 H09 Z3.000
    S717
    X0.000
    G43 H09 Z-13.500
    F50.2
    G01 Z-14.000
    F71.7
    X127.500
    G00
    G43 H09 Z3.000
    X0.000 Y2.375
    F50.2
    G01 Z-14.000
    F71.7
    G41 X-8.875 H09
    G03 X0.000 Y-6.500 I8.875 J0.000
    G01 X127.500 H09
    G03 X136.375 Y2.375 I0.000 J8.875
    G01 G40 X127.500
    G00
    G43 H09 Z3.000
    M05
    M09
    G43 H09 Z100.000
    G80
    G91G30Z0.000
    G30X0.000Y0.000
    M30
    %

  6. #6
    Join Date
    Feb 2015
    Posts
    24

    Re: g41 error ?

    the odd thing is there are no curves in the workpiece it a straight strip with holes in it.

  7. #7
    Join Date
    Feb 2015
    Posts
    174

    Re: g41 error ?

    I'm going to do the first tool before bed. This is what the post generated.

    %
    O0002* ()
    *()
    *()
    *(04-03-2015)
    N1G17G21G40G54G80G94
    G91G30 Z0.000
    G30X0.000 Y0.000
    *()
    T12M06* (14.00 MM. DIA. TWIST DRILL)
    T09* (14.00 MM. DIA. TWIST DRILL)
    S636M03
    M08
    (DRILL)
    G90 G00 G54 X15.000 Y-15.000
    G43 H12 Z100.000
    G43 H12 Z3.000
    G98 G81 Z-30.206 R3. F63.662
    X47.500
    X80.000
    X112.500
    G0 G80
    M05
    M09
    G43 H12 Z100.000
    G80
    G91G30Z0.000
    G30 X0.000Y0.000
    M01
    *()
    N2G91G30Z0.000
    G30 X0.000Y0.000

    Here is it cleaned up. I am assuming the axial positions are correct.

    %
    O0002* (PUT SOMETHING RELATED TO JOB HERE)
    T12 M06* (14.00 MM. DIA. TWIST DRILL)
    N1 M1
    G54 X15.000 Y-15.000 S636 M03 T9
    G43 H12 Z100.000 M8
    G81 Z-30.206 R3. F63.662
    X47.500
    X80.000
    X112.500
    G80 M9
    M6
    N2 M1

    That's the same code to the machine, I can tighten it even more but i'm old and tired.Leading /trailing zero's, depending on exact controller, machine build, crashes I don't know about, etc...

    See how small and easy the code got? Look into adjusting your post processor, get some of this under control. I promise you positive outcome. I can't give that too you but in little pieces, lean in, get it done.

    Luck.

    OH! feel free to follow up in this thread. It's not over yet! lol. night.

    Crap, can't sleep until I say, don't use G54 as a standard work offset unless you NEED to. I'll explain tomorrow night. sleeeeeeeeeep...

    RATS! no sleep.

    %
    O0002* (PUT SOMETHING RELATED TO JOB HERE)
    T12 M6* (14.00 MM. DIA. TWIST DRILL)
    N1 M1
    G54 X15.Y-15 S636 M3 T9
    G43 H12 Z100. M8
    G81 Z-30.206 R3. F63.662
    X47.5
    X80.
    X112.5
    G80 M9
    M6
    N2 M1

    There! ya happy now? kidding I cant sleep. Sucks.

  8. #8
    Join Date
    Dec 2008
    Posts
    3109

    Re: g41 error ?

    I think stucapco may have chopped it a little too far,
    you may need to modify the "capsmill" post to have it output in a similar format
    - but this is my take on the NC code, ( I currently work a Fanuc OM control mill )
    - maximum (1) M-code on any line

    Code:
    %
    O0002 ( ABC-OP1)     ( comment on O line shows up on program list page of the machine )
    (DATE-DDMMYY) (04-03-2015)
    
    (setup info here)
    (tool list here)
    ( T12 = 14.00 MM. DIA. TWIST DRILL )
    (       H2 , D42 )
    ( T9 = 18.00 MM. DIA. END MILL-FINISH-2 FLUTE)
    (       H9 , D39 )
    ()
    G21 ( inch/metric code check) ( if machine is set to other code, program stops)
    G0 G17 G40 G80 G94 M5 ( safety codes)
    G91 G28 Z0. ( retract vertical to Z home position )
    G90
    ()
    N1
    T12 M6 (14.00 MM. DIA. TWIST DRILL) ( load tool )
    T9 ( pre-select next tool, only needed if machine has toolchange arm ) 
    ()
    N11
    (DRILL)
    G54   ( co-ordinate system selection, always define at the start of each tool operation, reset may change it back to G54 by parameter default )
    G0 G90 X15. Y-15.
    S636 M3
    G43 H12 Z100. M8 ( take up length offset, point to Z100, coolant ON )
    G98 G81 Z-30.206 R3. F63.662 ( G98=Retract to R-plane, G99= retract to Z level before canned cycle( in this case Z100. for jumps over clamps etc)
    X47.5 G99 ( retract to Z100, before moving to next position
    X80. (G98 retract to Z3 ( R value in canned cycle))
    X112.5
    ()
    G80 G94 ( cancel canned cycle, units per minute ( in case G95 gets used for any operation )-safety codes)
    M5
    M9
    G91 G28 Z0.
    G90 ( always leave it in absolute mode)
    M1 ( optional stop here for checking previous machining before swapping tool out)
    ()
    N2
    T9 M6 (18.00 MM. DIA. END MILL-FINISH-2 FLUTE)
    T12
    ()
    N22
    (SIDE MILLING)
    G54
    G0 G90 X127.500 Y-32.575 
    S627 M3
    G43 H9 Z100. M8
    Z3.
    G1 Z-4. F70.3
    X0. F100.4
    G0 Z3.
    X127.5
    Z-3.5
    G1 Z-8. F70.3
    X0. F100.4
    G0 Z3.
    X127.5
    Z-7.5
    G1 Z-12. F70.3
    X0. F100.4
    G0 Z3.
    X127.5
    Z-11.5
    G1 Z-13.8 F70.3
    X0.F100.4
    G0 Z3.
    S717 M3
    X127.5
    Z-13.5
    G1 Z-14. F50.2
    X0. F71.7
    G0  Z3.
    X127.5 Y-32.375
    G1 Z-14. F50.2
    G41 D39 X136.375 F71.7 
    G3 X127.5 Y-23.5 I-8.875 J0.
    G1 X0. 
    G3 X-8.875 Y-32.375 I0. J-8.875
    G1 G40 X0.
    G0 Z3.
    ( SIDE MILLING )
    S627 M3
    Y2.575
    G1 Z-4. F70.3
    X127.5 F100.4
    G0 Z3.
    X0.
    Z-3.5
    G1 Z-8. F70.3
    X127.5 F100.4
    G0 Z3.
    X0.
    Z-7.5
    G1 Z-12. F70.3
    X127.5 F100.4
    G0 Z3.
    X0.
    Z-11.5
    G1 Z-13.8 F70.3
    F100.4
    X127.5
    G0 Z3.
    S717 M3
    X0.
    Z-13.5
    G1 Z-14. F50.2
    F71.7
    X127.5
    G0 Z3.
    X0. Y2.375
    G1 Z-14. F50.2
    G41 D39 X-8.875 F71.7
    G3 X0. Y-6.5 I8.875 J0.
    G1 X127.5
    G3 X136.375 Y2.375 I0. J8.875
    G1 G40 X127.5
    G0 Z3.
    ()
    G80 G94
    M5
    M9
    G91 G28 Z0.
    G91 G28 X0. Y0.
    G90
    M30
    %
    See how this goes in your machine ( lowercase letters will need to be removed )

    The arcs in the finishing paths are the "lead in & lead outs that the CAM system had set,
    - you need to understand that function in CAM.
    Do not allow the cutter to plunge down while against a finished edge, it will leave gouges

    Remember this....cutter comp MUST be taken up ( or cancelled )on a linear move, it cannot be done on an arc

  9. #9
    Join Date
    Feb 2015
    Posts
    174

    Re: g41 error ?

    Well, code "groups" can be nested (do a bunch of crap on one line), never combine the same group in the same block. It's a bit much to comprehend all at once however the rules hold true. I (me and only me) would run my posted code without worry of conflict. Be comfortable with the code you generate or write, if it works for you, IT WORKS!

    Luck.

    I forgot, general code groups: Modal Codes

    Not all codes are modal, that is to say: there's no way to turn them off or effect them once executed. G04 (time is not negotiable), G92 (it's changed not turned off), etc.

    I hope i'm helping here.

    Edit: I neglected to mention machine parameters and options play a huge part in this. As a fanuc OP, including several different models, I use these rules and don't force my will upon them. We get along just fine.

    Edit2: If I do something continuously, I write a macro and assign a misc. function, subconsciously protecting it in the #9000 range easily for future use. Example: M6, tool change right? Yeah, lets expand on that, shut off the damn coolant, move to safe point or out the way... Here is what happens on my Mori Seiki MVB when i say M6.

    %
    O9001(TOOL CHANGE MACRO)
    M09
    M05
    G0G94G40G90G80G28G49Z0
    G91G30
    M6
    G0G90
    M99
    %

    Simple yet effective and negotiable! Need some more space (long as$ tool, whatever). Toss it up there till I tell it not to. Ever worked with parametrics? OH boy, this goes even deeper! Enjoy.

Similar Threads

  1. Replies: 8
    Last Post: 02-06-2015, 03:56 PM
  2. Fixed BMDC Error, now have overactive feed error. Help needed.
    By victorgallas in forum Bridgeport / Romi Lathes
    Replies: 3
    Last Post: 11-01-2014, 11:22 PM
  3. Replies: 0
    Last Post: 07-17-2014, 04:12 PM
  4. Replies: 0
    Last Post: 05-05-2013, 05:40 AM
  5. Yaskawa Servopack error: A.D1. Motor Load Position Excess Error
    By Syphonics in forum Servo Motors / Drives
    Replies: 0
    Last Post: 04-26-2012, 07:53 AM

Tags for this Thread

Posting Permissions

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