515,351 active members
6,022 visitors online
Register for free
Login
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    Dec 2014
    Posts
    129

    nesting error?

    I can't figure out what is wrong with my code, with one it works fine, the only difference i made was changing tools, the x and y coordinates have been changed but the rest of the subroutine programming is identical, unless im missing something, the code with the 3/4 end mill runs through fine but when it changes tools and begins second subroutine it follows tool 1's toolpath, please help! here is code snippets for both

    (working version)
    (1/2" ENDMILL)
    N2L100
    N3G8
    N4G90G0X0Y0
    N5X1.1536Y-0.4
    N6Z0.5
    N7Z0.12
    N8G1Z0F90.
    N9G41D1X-1.1536
    N10G0Z0.5
    N11X1.1536Y-0.05
    N12Z0.12
    N13G1Z0
    N14X-1.1536
    N15G0Z0.5
    N16X1.1536Y0.3
    N17Z0.12
    N18G1Z0
    N19X-1.1536
    N20G0Z0.5
    N21X1.1536Y-0.4
    N22G0Z0.5

    N23(ROUGH PART)
    N24X0.96Y0.7371
    N25Z0.12
    N26G1Z-0.225F90.
    N27Y0.2871
    N28Y-0.2871
    N29G40Y-0.7371
    N30G0Z0.5
    N31X0.61Y0.7371
    N32Z0.12
    N33Z-0.225
    N34G41G1D1Y0.2871
    N35Y-0.2871
    N36G40Y-0.7371
    N37G0Z0.5
    N38X0.96Y0.7371
    N39Z-0.175
    N40Z-0.52
    N41G41G1D1Y0.2871
    N42Y-0.2871
    N43G40Y-0.7371

    N44G0Z0.5
    N45X0.61Y0.7371
    N46Z-0.175
    N47Z-0.52
    N48G41G1D1Y0.2871
    N49Y-0.2871
    N50G40Y-0.7371
    N51G0Z0.5
    N52X-0.96
    N53Z0.12
    N54Z-0.225
    N55G41G1D1Y-0.2871
    N56Y0.2871
    N57G40Y0.7371
    N58G0Z0.5
    N59X-0.61Y-0.7371

    N60Z0.12
    N61Z-0.225
    N62G41G1D1Y-0.2871
    N63Y0.2871
    N64G40Y0.7371
    N65G0Z0.5
    N66X-0.96Y-0.7371
    N67Z-0.175
    N68Z-0.52
    N69G41G1D1Y-0.2871
    N70Y0.2871
    N71G40Y0.7371
    N72G0Z0.5
    N73X-0.61Y-0.7371
    N74Z-0.175
    N75Z-0.52
    N76G41G1D1Y-0.2871
    N77Y0.2871
    N78G40Y0.7371

    N79G0Z0.5
    N80X-0.72Y-0.6955
    N81Z0.12
    N82Z-0.64
    N83G41G1D1Y-0.2455
    N84Y0.2455
    N85G40Y0.6955

    N86G0Z0.5
    N87X0.72
    N88Z0.12
    N89Z-0.64
    N90G41G1D1Y0.2455
    N91Y-0.2455
    N92G40Y-0.6955
    N93G0Z0.5
    N94X0Y0
    N95M17


    N96L200(1/2" BULLNOSE E.M.)
    N97G90G0X0Y0
    N98X1.405Y0.1321



    N330(1/2 FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - .5)
    N331(FACE TOP)
    N332G8
    N333T1M6
    N334M3S6000
    N335G90G0X0Y0E1
    N336Z1.H1M8
    N337Z0.5
    N338L101
    N339G90G0X0Y0E2
    N340L101
    N341G90G0X0Y0E3
    N342L101
    N343G90G0X0Y0E4
    N344L101
    N345G90G0X0Y0M9
    N346M5
    N347M1


    (non working)

    N2L100
    N3G8
    N4G90G0X0Y0
    N210 X1.1536 Y-.2768
    N6Z0.5
    N7Z0.12
    N8G1Z0F50.
    N240 G1 Z0. F20.
    N250 G41 D1 X-1.1536 F26.
    N260 G0 Z.5
    N270 X1.1536 Y.175
    N280 Z.05
    N290 G1 Z0. F50.
    N300 X-1.1536 F26.
    N310 G0 Z.5
    N320 ( ROUGH PART )
    X.735 Y.9621
    N230 Z.05
    N240 G1 Z-.52 F50.
    N250 G41 D1 Y.2871 F19.
    N260 Y-.2871
    N270 G40 Y-.9621

    N280 G0 Z.5
    N290 X-.735 Y-.9621
    N300 Z.05
    N310 G1 Z-.52 F50.
    N320 G41 D1 Y-.2871 F19.
    N330 Y.2871
    N340 G40 Y.9621

    N350 G0 Z.5
    N370 X-.845 Y.9205
    N380 Z.12
    N390 G1 Z-.64 F50.
    N400 G41 D1 Y.2455 F26.
    N410 Y-.2455
    N420 G40 Y-.9205

    N430 G0 Z.5
    N440 X.845 Y-.9205
    N450 Z.12
    N460 G1 Z-.64 F50.
    N470 G41 D1 Y-.2455 F26.
    N480 Y.2455
    N490 G40 Y.9205

    N93G0Z0.5
    N94X0Y0
    M17

    N96L200(1/2" BULLNOSE E.M.)
    N97G90G0X0Y0
    N98X1.405Y0.1321


    N330(3/4 FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - .75)
    N331(FACE TOP)
    N332G8
    N333T1M6
    N334M3S2500
    N335G90G0X0Y0E1
    N336Z1.H1M8
    N337Z0.5
    N338L101
    N339G90G0X0Y0E2
    N340L101
    N341G90G0X0Y0E3
    N342L101
    N343G90G0X0Y0E4
    N344L101
    N345G90G0X0Y0M9
    N346M5
    N347M1

  2. #2
    Junior Member
    Join Date
    Dec 2014
    Posts
    129
    Is it maybe a cutter comp cancelling error? the part is 1" wide and part offset is center, it should have plenty of room but I guess I can try moving y further away from the part and see if that fixes it. i just dont get why it would repeat tool 1's path on tool 2

  3. #3
    Registered
    Join Date
    Feb 2015
    Posts
    174

    Re: nesting error?

    First of all, lose the line numbering, its confusing. What I see is your calling the same dia offset register for both tools. Copy/paste here.

    N9 G41 D1 X-1.1536

    (not working)

    N250 G41 D1 X-1.1536 F26.

    3/4 and 1 inch tools if I read this right.

    I suggest (just looking down this quickly) you should keep movement code in subs and command the individual cutter code in mains.

    O001;
    N1 M1;
    G54 X0 Y0 S500 M3;
    G43 H1 Z.05 M8;
    G01 Z-.5 F1.;
    M98 P3 D1 F1.; (L, whatever)
    G0 Z1. M9;
    T2 M6;
    N2 M1;
    G54 X0 Y0 S500 M3;
    G43 H2 Z.05 M8;
    G01 Z-.5 F1.;
    M98 P3 D2 F1.;
    G0 Z1. M9;
    G49 G54 Y0 Z0;
    M30;

    The sub here is then ordered follow the instruction of modal misc. functions from the main.

    O0003;
    G01 X-1. G41; (NOTE, I have set the feed and dia offset form the main)
    G02 I1.;
    G01 X0 G40;
    M99;

    DO NOT USE THIS CODE!
    It is an example of the topic. 1/2 inch deep, 2 inch circle, using the main and 2 different cutters following the same sub routine. Assumes correct height/dia offsets in the corresponding registers.

    WOW! I hope I'm helping!

    I tend to downsize code whenever possible, easier on all aspects, programmer, post (debugging, back plotting, etc), operator. The machine is ignoring much of your code (modal, not needed).

    This off the top of my head.

  4. #4
    Junior Member
    Join Date
    Dec 2014
    Posts
    129

    Re: nesting error?

    They have the same diameter offset because i replaced the 1/2 in flat end mill with a 3/4 trying to speed up the op, getting pushed to speed things up. I will definitely try your suggestions, thanks a bunch! Ill update in a bit after i try it.

  5. #5
    Junior Member
    Join Date
    Dec 2014
    Posts
    129

    Re: nesting error?

    the 1-DIA is just saying which tool the diameter belongs to, it says 1/2 right after

  6. #6
    Junior Member
    Join Date
    Dec 2014
    Posts
    129

    Re: nesting error?

    I changed it to "movement code in subs and command the individual cutter code in mains" works great, thank you very much, saved me just over a minute an op changing to that cutter! still weird that is the only tool i had to do it with, the other 6 tools are programmed like i originally had this one and they run fine.

  7. #7
    Junior Member
    Join Date
    Dec 2014
    Posts
    129

    Re: nesting error?

    heres what it looks like now


    L100
    G8
    G90G0X0Y0M3S4000
    X1.1536 Y-.2768
    H1 Z.5 M8
    Z0.12
    G1Z0F50.
    G1 Z0. F90.
    G41 D1 X-1.1536 F66.
    G0 Z.5
    X1.1536 Y.175
    Z.05
    G1 Z0. F90.
    X-1.1536 F66.
    G0 Z.5
    ( ROUGH PART )
    X.735 Y.9621
    Z.05
    G1 Z-.52 F90.
    G41 D1 Y.2871 F66.
    Y-.2871
    G40 Y-.9621

    G0 Z.5
    X-.735 Y-.9621
    Z.05
    G1 Z-.52 F90.
    G41 D1 Y-.2871 F66.
    Y.2871
    G40 Y.9621

    G0 Z.5
    X-.845 Y.9205
    Z.12
    G1 Z-.64 F90.
    G41 D1 Y.2455 F66.
    Y-.2455
    G40 Y-.9205

    G0 Z.5
    X.845 Y-.9205
    Z.12
    G1 Z-.64 F90.
    G41 D1 Y-.2455 F66.
    Y.2455
    G40 Y1.3

    G0Z0.5
    X0Y0
    M17

    and...

    T1M6(3/4 FLAT ENDMILL TOOL - 1 DIA. OFF. - 1 LEN. - 1 DIA. - .75)
    G90G0X0Y0E1
    Z0.5
    L101
    G90G0X0Y0E2
    Z0.5
    L101
    G90G0X0Y0E3
    Z0.5
    L101
    G90G0X0Y0E4
    Z0.5
    L101
    G90G0X0Y0M9
    M5
    M1

  8. #8
    Registered
    Join Date
    Feb 2015
    Posts
    174

    Re: nesting error?

    YES! I can't believe I actually helped, my post was some dry reading. Another tool in the arsenal.

Posting Permissions

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