585,762 active members*
4,134 visitors online*
Register for free
Login
Page 1 of 3 123
Results 1 to 20 of 42
  1. #1
    Join Date
    Aug 2007
    Posts
    3

    Multipart programming

    Not being much of a lathe guy I find myself suddenly in charge of programming multi-part runs on a TL-1. I've written a good program for a simple washer. Now I need to find out how to do a Z shift (canned cycle)of Z-.125 for each part to maintain proper dimension. To produce say 10 parts at time. Then reset program and bring down work stop to adjust the bar to begin the cycle allover. I know it's probably a setting in the setting page. Any help would be greatly appreciated.
    Maddog

  2. #2
    Join Date
    Jul 2005
    Posts
    12177
    Use G10 to move your Z work offset forward; we do this all the time.

    Leave G54 at Z0.0, turn your program into nested subroutines and write a small program that calls the subroutine after changing the work offset something like this for a part that is 0.5" thick including a parting and facing allowance.

    Some stuff is missing from this example I am just putting in the G10 stuff to move the offset and call the subroutine.

    O00000
    G10 L2 G90 P1 Z0.0 (Make sure G54 is at zero)
    G10 L2 G90 P2 Z-0.5 (Set G55 forward one part thickness)
    G10 L2 G90 P3 Z-1.0 (Set G56 forward two part thicknesses)
    G10 L2 G90 P4 Z-1.5 (Set G57 forward three part thicknesses)
    G10 L2 G90 P5 Z-2.0 (Set G58 forward four part thicknesses)

    M97 P100 L20 (The L is how many times you can advance the bar)

    M30

    N100 G54
    M97 P1000
    G55
    M97 P1000
    G56
    M97 P1000
    G57
    M97 P1000
    G58
    M97 P1000
    G54
    All the stuff for feeding the bar to a stop
    M99

    N1000 Your program


    M99

    You start with a new bar brought out to your stop.
    Go to N100 and using G54 go to your part program at N1000
    Return, set G55 then go to your part program.
    etc.

    Feed the bar to the stop, return and go through all the work offsets again.

    Run it in Graphics it is perfectly clear.

    G10 is the 'enter offsets command', L2 identifies work offsets P1 is G54, P2 G55, etc.

    Dead simple, very powerful.

    I hope I got everything correct I did this very fast; ask it it does not seem to make sense.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  3. #3
    Join Date
    Aug 2007
    Posts
    3
    Thanks Geof...I'll give it a go. BTW I talk a designer out of using glass filled delrin for a project after reading a reply to a post you made in '06 concerning machining glass filled nylon. So thanks again.
    Maddog

  4. #4
    Join Date
    Feb 2006
    Posts
    992
    Quote Originally Posted by Maddog Machine View Post
    Not being much of a lathe guy I find myself suddenly in charge of programming multi-part runs on a TL-1. I've written a good program for a simple washer. Now I need to find out how to do a Z shift (canned cycle)of Z-.125 for each part to maintain proper dimension. To produce say 10 parts at time. Then reset program and bring down work stop to adjust the bar to begin the cycle allover. I know it's probably a setting in the setting page. Any help would be greatly appreciated.
    I think you can get a part puller and use program for single part........ ect
    The best way to learn is trial error.

  5. #5
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by newtexas2006 View Post
    I think you can get a part puller and use program for single part........ ect
    Yes you can but when the part is very thin like a washer but the material has a decent diameter so you can have a couple of inches or more sticking out of the chuck it is more efficient to part of half a dozen pieces for each time you pull the bar. This is where using the different work zeroes comes in; you step your way down the length of bar then pull out another length and step your way down again. Pulling, or feeding with a bar pusher, is a slow operation so you want to maximize the number of parts per pull.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  6. #6
    Join Date
    Nov 2007
    Posts
    20
    We use a simple looping program with incremental movements to accomplish this.


    M97 P100 L5

    G28 X0
    G28

    M99


    M00


    N100
    W-0.206
    G01 X0.2 F0.005
    G00 W0.05
    X0.7
    W-0.05
    M99


    The biggest problem we have is the burr on the part off.

  7. #7
    Join Date
    Sep 2007
    Posts
    116
    Since all of my previous attempts at asking folks have been utterly futile, I'll ask again.
    What is the advantage of using G10 on a machinetool - ANY MACHINETOOL - that has multiple workoffset capability?
    What does G10 accomplish that G54, 55, 56 etc does not????

    Incremental programming... well I'm sorry but does not belong in cutting motions.

  8. #8
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by SeymourDumore View Post
    ......What is the advantage of using G10 on a machinetool - ANY MACHINETOOL - that has multiple workoffset capability?
    What does G10 accomplish that G54, 55, 56 etc does not????

    Incremental programming... well I'm sorry but does not belong in cutting motions.
    G10 can enter your G54, etc work offsets.

    If you have dedicated setups with a base that remains in place and
    fixtures that dowel into place which hold multiple parts you can have all the part locations as G10 commands that enter the work zero locations from the program. It just saves having to enter them all from a list of numbers; less error prone.

    Of course then the question becomes 'why not use G52 commands within the program?' and the answer to this is; depending on your programming style the G52s may be spread throughout the program while the G10s are clustered near the top; easier for editing if/when needed such as if the base is removed and replaced in a slightly different position.

    EDIT: Also remembered on a lathe doing bar work when it is feasible to part-off several parts per bar advance you can use G10 to shift the Z work zero forward to step along the bar.

    Again this is possible with G52; I think I pointed out in another thread that G52 requires fewer keystrokes when writing the original program.



    Regarding incremental how do I do helical interpolation using a single line command without using incremental?

    G91 G03 I J Z L
    An open mind is a virtue...so long as all the common sense has not leaked out.

  9. #9
    Join Date
    Sep 2007
    Posts
    116
    Geof

    The point is, I like to restrict my part program to actually cut the part, while setup should include the setup of tools an fixtures.
    If there is any discrepancy in the setup from one time to another, I do not want to edit the program itself.
    G52 is useful, but I restrict it's use to within one fixture offset. Example, multiple identical pockets within one part. Each pocket is defined using a localized o coordinate, and G52 is used to shift the coordinate there.
    The useage of G10 requires the editing of the part program in case of a location variation. I don't like it. The program should cut the part and not set it's location. The dedicated work coords are designed and well suited for that.
    Of course, I'm not against a call-once-explicitly subprogram within the body of the part program that uses G10 to pick and set up the workoffsets. But that section need not be called any more than once during setup.

    As far as incremental, I remain rigid about NEVER to use G91 for any reason.

  10. #10
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by SeymourDumore View Post
    Geof
    .....Of course, I'm not against a call-once-explicitly subprogram within the body of the part program that uses G10 to pick and set up the workoffsets. But that section need not be called any more than once during setup.....
    We do it more or less the reverse; our part programs are mostly subroutines and the G10 commands are at the head of the main program. Sometimes the G10 commands are in a separate program that is run just to enter the offsets.

    We find this very convenient for changing from part to part because the operator does not need to worry about entering work offsets.


    Quote Originally Posted by SeymourDumore View Post
    ...As far as incremental, I remain rigid about NEVER to use G91 for any reason.
    You didn't answer my question; how do I do a single line command for helical interpolation without using G91?

    Do you mean you program an absolute Z position for each turn of the helix? In other words if you are thread milling 20 tpi one inch deep you have 20 lines of code to describe the move?
    An open mind is a virtue...so long as all the common sense has not leaked out.

  11. #11
    Join Date
    Sep 2007
    Posts
    116
    Duhhhh on the threadmilling part.
    Not that it is the only way, but is certainly more convenient, in fact I use it too.
    Sorry 'bout that.

    As far as helical on a Haas, this will do a helical without G91

    G00 X0 Y1. Z1.
    G01 Z.01 F10.
    G02 I0 J-.5 Z-.5
    G02 I0 J-.5
    G01 X0 Y0
    G01 Z1. F200.
    BLAHBLAHBLAH

  12. #12
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by SeymourDumore View Post
    Duhhhh on the threadmilling part.
    Not that it is the only way, but is certainly more convenient, in fact I use it too.
    Sorry 'bout that.

    As far as helical on a Haas, this will do a helical without G91

    G00 X0 Y1. Z1.
    G01 Z.01 F10.
    G02 I0 J-.5 Z-.5
    G02 I0 J-.5
    G01 X0 Y0
    G01 Z1. F200.
    BLAHBLAHBLAH
    Yes if you are only going down to Z-.5 and can do that in a single circuit; ie big hole and big cutter so you have plenty of room for chips. Try going through 2" with a 7/8"hole in a single circuit; I know you can bang an insert drill through but then to open the hole up to 0.880" the easiest way is to interpolate and to get an acceptable finish it is necessary to limit the Z feed per circle and do several circles.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  13. #13
    Join Date
    Sep 2007
    Posts
    116
    You may have a point about your own programming style, as long as you remain anal about making sure the G91 does not "stick".
    I OTOH prefer writing that out longhand specifying each pass with it's own explicit Z-depth.
    I did used to use G91 similar to you, but have all but abondaned it. I still have a semifunctional Kurt vise to explain the reason.
    The endmill and the ER32 holder unfortunately did not survive the endeavor.:nono:

  14. #14
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by SeymourDumore View Post
    ....I did used to use G91 similar to you, but have all but abondaned it. I still have a semifunctional Kurt vise to explain the reason.
    The endmill and the ER32 holder unfortunately did not survive the endeavor.:nono:
    Ah, I understand.

    I often use this sequence or something like it:

    G41 D01 G00 Y0.5, Z0.02
    G91 G03 I0. J-.5 Z-.2 F100. L10
    G90 G03 I0. J-.5 Z-2.0 F100. L2

    Frequently I just copy the G91 line and change the G91 to a G90 with an absolute Z location; on occasion I have changed the Z but missed the G91 with the results you describe. Maybe not quite the results; so far I have only destroyed parts and severely maimed holders.

    My luckiest one was years ago when I was doing a hole in a part clamped on top of a piece of 1" aluminum plate; I don't like putting things directly on the table. I went 0.95" into the plate and was very glad that I don't clamp directly onto the table.

    But the usefullness of G91 is so good that I use it very often particularly with production programs that are thoroughly proved out before being put into regular use. My catastrophes have occurred on my prototype/tooling machines and most times I can hush them up.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  15. #15
    Join Date
    Nov 2007
    Posts
    20
    OK GUYS, Admittedly, I am only a newby at programming....why is my style ie. incremental programming wrong? It's fast, it's accurate, it's easy.
    Am I missing something?

  16. #16
    Join Date
    Jul 2005
    Posts
    12177
    Absolutely nothing wrong with incremental but when you mix incremental and absolute in the same program you introduce a large potential error factor; you just have to try and remember your mental check list to make sure you are in the correct mode at the correct place.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  17. #17
    Join Date
    Sep 2007
    Posts
    116
    As Geof said about the potential error.
    IOW if you miss something, you'll know it.

    Additionally, since every move depends on the previous, there is very little you can do about accuracy.
    If you notice Geof's example, it is using G91 for a very specific circumstance for a very specific purpose. It spirals down to open a hole. I'm willing to bet that the very same hole is finished using absolute with real coordinates.
    I have seen people making pockets and bosses using incremental, which makes my cringe and break out in sweats in the middle of the night.

  18. #18
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by SeymourDumore View Post
    .....Additionally, since every move depends on the previous, there is very little you can do about accuracy.
    If you notice Geof's example, it is using G91 for a very specific circumstance for a very specific purpose. It spirals down to open a hole. I'm willing to bet that the very same hole is finished using absolute with real coordinates....
    Yes it is; the final G90 G03 does an absolute Z position and as I explain this is where an error potential arises. If I forget the G90 it tries to increment down 2 inches on the final circuit. Sometimes it will give a Z overtravel alarm other times it generates any of, or all; Spindle Following Error, Spindle Overload, Z Axis Following Error, Z Axis Overload.

    Incidentally my example runs on a Haas and I believe not all machines will allow the addition of a Z incremental move in G03 or G02. Then you have to crunch out each circuit or get technical and write a macro.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  19. #19
    Join Date
    May 2007
    Posts
    1003
    Quote Originally Posted by SeymourDumore View Post
    Since all of my previous attempts at asking folks have been utterly futile, I'll ask again.
    What is the advantage of using G10 on a machinetool - ANY MACHINETOOL - that has multiple workoffset capability?
    What does G10 accomplish that G54, 55, 56 etc does not????

    Incremental programming... well I'm sorry but does not belong in cutting motions.

    Can't speak for anything but a lathe, but I guess "Nothing" would have to be my answer, yet I still prefer to use G10.

    We also make a lot of washers. This is more a 'How to" example for Maddog.


    :5982 (EWA-10490-REV.NONE MAIN)

    #143=0 (3=CARBIDE 4=HSS DRILL)

    N100G10P0Z-7.53 (BARSTOP)
    G65P9018X.86F.01S900M4000T202
    M1

    N900M91 (DRILL)
    IF[#143EQ3]GOTO23
    IF[#143EQ4]GOTO24
    #3000=2 (SET #143)
    N23T0909S2350M63 (CARBIDE DRILL)
    X0Z.5
    Z.05
    G1Z-.765F.005
    GOTO29
    N24T0909S517M63 (HSS DRILL)
    X0Z.5
    Z.05
    G1Z-.5F.005
    G0Z.5
    G4U.5
    Z-.48
    G1Z-.775
    N29M92
    M1

    N200M91 (ROUGH TURN)
    T0202S3951M63
    X.87Z.005
    G50S4500
    G96S900
    G1X.33F.01
    X.28F.015
    G0X.698Z.02
    G4U.02
    G1U#510Z-.69F.012
    U.03
    M92
    M1

    N1M98P2844 (RUN 1ST PART)
    G10P0W.135
    M54 (PART COUNTER)
    M1

    N2M98P2844 (RUN 2ND PART)
    G10P0W.135
    M54 (PART COUNTER)
    M1

    N3M98P2844 (RUN 3RD PART)
    G10P0W.135
    M54 (PART COUNTER)
    M1

    N4M98P2844 (RUN 4TH PART)
    G10P0W.135
    M54 (PART COUNTER)
    M1

    N5M98P2844 (RUN 5TH PART)
    /M54 (PART COUNTER)
    /M99
    M30

    :2844 (EWA-10490 SUBPROGRAM)

    N300M91 (FINISH TURN)
    T0303S4500M63
    X.73Z0
    G1X.36W#500F.0035
    Z.01F.015
    X.6386
    Z0F.002
    G3U.0268Z-.0056R.019
    G1U.0114W-.0057
    G3U.0112W-.0134R.019 (X.6878)
    G1Z-.0458F.003
    G3U-.0112W-.0134R.019F.002
    G1U-.02W-.01
    G97X.72F.008
    M92
    M1

    N400M91 (BORE)
    T0404S3000M63
    X.4538Z.5
    Z.02
    G1X.415Z-.0333F.001
    Z.05F.02
    X.5Z.03
    X.4681Z.01
    Z0F.002
    G2X.4436Z-.0086R.013
    G1X.4236Z-.0361
    G2X.4225Z-.0392R.009
    G1Z-.1F.0032
    X.41F.015
    M92
    M1

    N600M91 (BACK CHAMFER I.D.)
    T0606S2000M63
    X.38Z.5
    Z.02
    G1X.4Z-.0742F.015
    X.4225F.003
    G2U.003W-.0035R.005F.001
    G1U.011W-.0055
    X.38F.015
    M92
    M1

    N1200 (CUT-OFF)
    G65P9019X.75Z-.13F.002A.406B.428E#501S300M3500T1212
    M99
    %


    Seymour, as you can see I not only control the increment between parts, but also the workshift. Of course it can be run with G54-G59 offsets, but I don't know how to set the G54-G59. I've tried the G10L2P_ shown in Peter Smid's book on Fanuc custom macros, but it doesn't work on our lathes. Parameter change? It appears to take a G10P0Z_ command (MDI), but nothing changes in the workshift.

    I specify the shifts in the header, but that requires faith in the set-up person. Well placed most times, but....

    Nice thing about lathes is I don't need to use G90/G91 on most of them. So no worry.

    EDIT: Normally the bore is also programmed with incremental moves on the chamfer. Bore size gets changed, change one word. Done. Chamfer sizes are the same size on a lot of parts. Making a new program, cut & paste, change one word. Modify Z depth if necessary. Done. Pretty sure I can manually program many of our parts faster than the other programmer does using Mastercam. And he is good with it.

  20. #20
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by g-codeguy View Post
    ....Nice thing about lathes is I don't need to use G90/G91 on most of them. So no worry.
    When I read this I realised I am guilty of swiching tracks midstream. This thread started on lathes but answering Seymour I segued over to mills.

    Sorry about that.

    Incremental on a lathe? I think you have to be out of your mind.
    An open mind is a virtue...so long as all the common sense has not leaked out.

Page 1 of 3 123

Similar Threads

  1. programming
    By rajanvadakkepat in forum Fanuc
    Replies: 6
    Last Post: 10-10-2009, 03:22 PM
  2. CAM programming
    By mallinathan in forum Diemaking / Diecutting
    Replies: 0
    Last Post: 10-19-2008, 06:08 AM
  3. PLC PROGRAMMING
    By jp41558 in forum CNC Machine Related Electronics
    Replies: 5
    Last Post: 07-31-2008, 07:17 PM
  4. CNC Programming
    By mikemill in forum Uncategorised MetalWorking Machines
    Replies: 5
    Last Post: 12-30-2007, 09:05 AM
  5. API Programming Anyone
    By Al_The_Man in forum Computers / Desktops / Networking
    Replies: 3
    Last Post: 02-15-2005, 03:31 AM

Posting Permissions

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