586,106 active members*
3,064 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 25
  1. #1
    Join Date
    Jul 2008
    Posts
    6

    Peck drilling on a 16/18i?

    I am wondering if it's possible to write a macro of sorts for more efficient peck drilling on a Fanuc pro 3 controller 16i I believe. The control defines all of it z steps (pecks) as one value of Q. I am used to a peck drill cycle defined with I,J and K values. Any way to make this happen? Thanks for your time and attention.

  2. #2
    Join Date
    Sep 2006
    Posts
    14
    If you have the Macro B option then I would say yes you can probably write a fairly simple yet flexible variable peck drilling routine to increase efficiency. Otherwise it would have to be all linear Z moves and will be a very lengthy program. If you have several holes though, it could be run as a sub program.

  3. #3
    Join Date
    Jun 2008
    Posts
    1511
    What do you mean more efficient peck drilling cycle??? Do you mean that you are just use to using I,J,K for a pick size and do not want to use the Q value?

    I have macros that I wrote for single holes, multiple holes X,Y cord or multiple holes rotary axis. It is possible to set up the pick value in the macro to be variable I,J,orK so when you write your main program it is called I,J,or K and the macro uses the Q of your I,J,K value.

    Is this what you need for more "efficient" peck drilling or am I missing something? Let me know if you want me to post any of the macros. These macros are very short and easy to understand.

    Stevo

  4. #4
    Join Date
    Sep 2006
    Posts
    14
    I could be wrong but I think he wants to use varied peck depths in one cycle, eg: first peck 3x drill dia, second peck 2x drill dia... etc.
    Some controls do this automatically, some have built in provisions, Every fanuc I've ever seen only had one peck increment defined by the Q word.

  5. #5
    Join Date
    May 2007
    Posts
    1003
    If Metalcutter is correct in his assumption, then yes you can write a more efficient drilling cycle if the machine has Macro B. Macro B would allow you to use I, J & K for three of the variables.

    Using a variable drill depth is definitely faster than having to use the same increment value for every peck.

  6. #6
    Join Date
    Jul 2008
    Posts
    6
    Quote Originally Posted by Metalcutter View Post
    I could be wrong but I think he wants to use varied peck depths in one cycle, eg: first peck 3x drill dia, second peck 2x drill dia... etc.
    Some controls do this automatically, some have built in provisions, Every fanuc I've ever seen only had one peck increment defined by the Q word.
    Bingo! That is exactly what I am looking for. This macro would be needed for a large amount of holes all at variable depths. Where do I go from here?

  7. #7
    Join Date
    May 2007
    Posts
    1003
    Quote Originally Posted by TheMoose View Post
    Bingo! That is exactly what I am looking for. This macro would be needed for a large amount of holes all at variable depths. Where do I go from here?
    Find out if you have Macro B. In MDI type in #100=5 EOB, hit cycle start. Did it alarm or put 5. in #100 macro?

  8. #8
    Join Date
    Jul 2008
    Posts
    1
    We have a Fanuc 18-t control on our lathe and the control came with a macro called "VARIABLE DEPTH INCREMENT AUTO CYCLE" to give more flexibility over the old G74 peck drill.
    It was a manufacture addition. So I am not sure if it is universal with all Fanucs.

    In the program it is a standard macro call out of G65.
    Here is a sample from a program after the tool call.
    Insert this in the program:

    G0X0.Z0.05
    G65 P9136 K-.430 B.03 F.001 W.05 C.02 A.3
    G0Z.5

    Variables for reference:

    K= FINAL DEPTH
    B=START INCREMENT
    F=FEEDRATE
    W=DEPTH FIRST PECK
    C=MINIMUN PECK INCREMENT
    A=DWELL (in seconds at retract)

    This program #O9136 is stored in the program library.
    Save this as its own program:

    :9136(DEEP DRILL)
    IF[#6GE0]GOTO70
    G00W0.
    #4=#5002
    #3=ABS[#3]
    #2=ABS[#2]
    IF[#19EQ98]GOTO1
    #19=99
    N1G#19F#9
    #27=ABS[#23]
    #28=ABS[#6]-ABS[#26]
    #29=ABS[#26]
    DO1
    IF[#27LE#3]GOTO2
    GOTO3
    N2#27=#3
    N3IF[#27GE#28]GOTO4
    G00Z[#2-#29]
    G1Z-[#29+#27]
    G00Z#4
    G4U#1
    #28=#28-#27
    #29=#29+#27
    #27=#27*.5
    END1
    N4G00Z[#2-#29]
    G1Z#6F#9
    G00Z#4
    M99
    N70#3000=1(K MUST BE NEGATIVE)

    Hope that this helps.

    Will

  9. #9
    Join Date
    May 2007
    Posts
    1003
    Will, that is the same program that came with our Hardinges with 18T controls. Before that it was slightly different program, G65P9135K-.8B.02F.005J.2C.15A.5 on the Hardinges with OT controls. Not quite as useful. Hardinge calls them DEEP DRILL CYCLE.

    However, none of the Daewoos with 18T or 21i controls had this program. I have an idea it is specific to the machine manufacturer whether or not you get the program.

    That is the program I was going to suggest if Moose has Macro B.

  10. #10
    Join Date
    Jul 2008
    Posts
    6
    Quote Originally Posted by g-codeguy View Post
    Find out if you have Macro B. In MDI type in #100=5 EOB, hit cycle start. Did it alarm or put 5. in #100 macro?
    I typed it in and no alarms. I entered the text without any spaces but when I hit EOB and Insert it shows as #100 =5, and when I hit cycle start the code dissapears

  11. #11
    Join Date
    May 2007
    Posts
    1003
    Quote Originally Posted by TheMoose View Post
    I typed it in and no alarms. I entered the text without any spaces but when I hit EOB and Insert it shows as #100 =5, and when I hit cycle start the code dissapears
    Sounds like you have Macro B. If you had gone to the Offset page and hit the far right hard key until "MACRO" came up, and then hit the soft key under Macro, you should have seen 0005.0000 in the 100 macro.

    Load the 9136 program Will posted. Give it a shot. In case it isn't clear, B is the incremental distance the drill rapids to from the previous drill depth. So if it is W.5B.02A.2 the first peck will drill to Z-.5, rapid back to the approach location you programmed, dwell .2 second, and rapid to Z-.48 and feed again.

    I didn't compare the 9136 Will posted to the one I use, but am going to assume for the time being that it is the same. I can check it out tomorrow to be sure. I mention this because there is a value missing from his G65 call example. You can also define a Z value.

    This can be very handy if you are drilling a casting that has a counter bore cast in at say -.5 depth. If you were facing .05 off the face, you would program say Z-.45 (or a little less to be safe) at the end of the G65 call, and it would rapid to Z-.43 (for B.02), and then start feeding. Works the same way if you drill with two different size drills. Drill with the larger one, program Z for that depth in the G65 Macro call, and the smaller drill rapids to the specified clearance point.

    I've been using this subprogram for around 20 years with excellent results.

    EDIT: BTW, Z0 is understood if there is no Z value in the macro.

  12. #12
    Join Date
    Jul 2008
    Posts
    6
    Thanks for the info thus far! Is there any way for a macro to drill an array of holes all at varying depths? As in not having the macro define the depth of the hole(s) just the pecking depths?

    If that makes any sense at all. Here is a sample of what I am doing with I, J and k's in another controller (Fadal) Note the z depths are all different, but the pecking is the same.

    N13G83G99X-2.2403Y.6331Z-1.6875R0.1I.85J.6K.15F35.
    N15G80
    N17G83G99X-3.6688Y-.276Z-1.56R0.1I.85J.6K.15F35.
    N19G80
    N21G83G99X-1.461Y-.0731Z-.875R0.1I.85J.6K.15F35.
    N23G80
    N25G83G99X-.5925Y.2679Z-.5625R0.1I.85J.6K.15F35.
    N27G80
    N29G83G99X-3.1818Y-1.2581Z-2.125R0.1I.85J.6K.15F35.
    N31G80
    N33G83G99X-2.4269Y-.9334Z-3.8125R0.1I.85J.6K.15F35.
    N35G80
    N37G83G99X-1.3149Y-.9903Z-2.75R0.1I.85J.6K.15F35.
    N39G80
    N41G83G99X-.5601Y-1.3393Z-1.4375R0.1I.85J.6K.15F35.
    N43G80
    N45G83G99X-3.4497Y-1.9075Z-.45R0.1I.85J.6K.15F35.
    N47G80
    N49G83G99X-1.2581Y-2.2646Z-2.0625R0.1I.85J.6K.15F35.
    N51G80
    N53G83G99X-2.3214Y-1.7289Z-1.5R0.1I.85J.6K.15F35.

  13. #13
    Join Date
    May 2007
    Posts
    1003
    Not that I am aware of, but there are plenty of guys out there with a lot more experience with macros than I. I don't know what I, J, K, or R represent in your program as I program lathes, not mills. Nor have I ever run a Fadal. I would have to look in a Fanuc manual to see what code it uses for a G83. I can guess that R is retract and K might be the peck increment, but I am lost after that. To me I & J represent legs of an arc.

    If the hole depths had a set pattern, then a macro could be written to handle it, but they appear to be random depths to me.

    You could put the G65 in a sub program with Z depth being a variable. Program would be longer than the one you show, but would run with everything else being the same.

    O123 (Drill Sub)
    G99
    G65P9136K-#100B.1F35.W.6C.15
    M99
    %

    Main Program
    N13X-2.2403Y.6331
    #100=1.6875
    M98P123
    N17X-3.6688Y-.276
    #100=1.56
    M98P123
    N21X-1.461Y-.0731
    #100=.875
    M98P123
    N25X-.5925Y.2679
    #100=.5625
    M98P123
    N29X-3.1818Y-1.2581
    #100=2.125
    M98P123
    N33X-2.4269Y-.9334
    #100=3.8125
    M98P123
    N37X-1.3149Y-.9903
    #100=2.75
    M98P123
    N41X-.5601Y-1.3393
    #100=1.4375
    M98P123
    N45X-3.4497Y-1.9075
    #100=.45
    M98P123
    N49X-1.2581Y-2.2646
    #100=2.0625
    M98P123
    N53X-2.3214Y-1.7289
    #100=1.5
    M98P123

    More blocks, but at a glance I would say less memory used. If you needed to change peck depth or clearance, it only needs to be changed in one place instead of the 11 necessary in your sample program.

  14. #14
    Join Date
    Jul 2008
    Posts
    6
    Thanks again for your help g-codeguy. The I is the first step, J is the reducing value and k is the minimum/final pecks in th g83 cycle. The sample program I posted is a very small portion of a program with 250+ holes at varied depths. Some programs have less and others have much more, so it could turn into a headache real fast.

  15. #15
    Join Date
    May 2007
    Posts
    1003
    Sorry I couldn't be more help. I just don't see a way around not programming every drill depth. To use a macro for it would require some kind of definable pattern. Your drill depths are all over the place.

  16. #16
    Join Date
    Dec 2006
    Posts
    24
    Based on what I remember with the 160M and may be true with the 18I, if you select the order of R values from shallow to deeper or in this case they stay the same and the control should remember the parameters this could save you some time; But be sure and check it out first on a couple first to verify. It works on the other G8X cycles.

    N13G83G99X-2.2403Y.6331Z-1.6875R0.1I.85J.6K.15F35.
    N17X-3.6688Y-.276Z-1.56
    N21X-1.461Y-.0731Z-.875
    N25X-.5925Y.2679Z-.562
    N29X-3.1818Y-1.2581Z-2.125
    N31G80

    We always programmed the motions except for rigid tapping with G1/ G0 for cycle time savings.

  17. #17
    Join Date
    Feb 2007
    Posts
    314
    If i undertand you want to use 3 different peck increment (I J K). I wrote a macro doing that. First peck is defined by I second peck by J and the others are defined by K. I test it on a O-MD controller and it works fine. But i don't put any security so if an argument is not define i don't know what happen. Because you seem to be familiar with G83 X Y Z R I J K, i suggest you to use G code calling macro, this way, when there is a g 83 in your program, it will call peck drilling macro. If you need more info about g code calling macro or have some question about my macro, let me know. It will be a pleasure to help you.

    Here is my macro:

    :O9010 (MULTIPLE PECK INCREMENT)
    #103=[#5043-#[2200+#4111]] (MEMORIZE Z START POINT)
    G0 X#24 Y#25 (RAPID TO X Y HOLE COORDINATE)
    Z#18 (RAPID TO RETRACT)
    #102=4 (SELECT PECK)
    #101=#18
    N5 #101=#101-#[#102] (Z TO REACH)
    IF[#101 LE #26] GOTO15 (IF LESS THAN ONE PECK)
    G01 Z#101 F#9 (DRILL)
    G0 Z#18 (RAPID TO RETRACT)
    Z[#101+.01] (RAPID .01'' ABOVE LAST CUT)
    IF[#102 LT 6] GOTO10 (IF PECK IS NOT ''K'' YET)
    GOTO5
    N10 #102=[#102+1] (CHANGE PECK INCREMENT)
    GOTO5
    N15 G01 Z#26 F#9 (FINAL CUT)
    IF [#4010 EQ 98] GOTO20 (IF YOU USE G98)
    G0 Z#18 (RAPID TO RETRACT)
    M99
    N20 G0 Z#103 (RAPID TO START POINT)
    M99

  18. #18
    Join Date
    Jul 2008
    Posts
    6
    Samu, since I really don't understand much about macros yours really confuses me, But it seems I need something along what you have posted. Are my x,y and z depths defined by this macro or in my nc program?

  19. #19
    Join Date
    Feb 2008
    Posts
    586
    I might be wrong, so bear with me a sec...

    G83 is modal, yes?

    So, you could start with G83,
    On the next line, change a parameter with X and Y, like the Q or R or even Z
    to your hearts content.

    Ont the other hand, if you were to have a macro instead, you would use a G66 to start said macro, (which makes the macro modal)
    and in the next line use a different parameter like X and Y and maybe Q, R and even Z

    It's late, so being cohesive is not my requirement here, just trying to make some possible points...

  20. #20
    Join Date
    May 2007
    Posts
    1003
    Think I have a better understanding now of what you are looking for.

    1) aa8vs example program would be the easiest way to go EXCEPT Fanuc uses Q for the peck depth, and has no options for IJK in its G83 cycle.

    2) There is no way to write a macro so you wouldn't have to define each Z coordinate. As I've already said, it has to be a definable pattern. Nor do the XY coordinates have a definable pattern that I could see.

    3) I think your best bet is going to be a combination of Samu's macro, but called with a G66 as beege suggests, which should allow you to write it in the format aa8vs gave.

    I've never had the need to use a G66, so I am not familiar with how they work. Nor do I have a manual at home to check it out. However, it appears that beege has used them, and that they can be written as aa8vs posted.

    Seems to me this would require the least amount of typing, and a program that is easy to understand.

Page 1 of 2 12

Similar Threads

  1. Peck Drilling Help
    By soonervols in forum G-Code Programing
    Replies: 15
    Last Post: 06-09-2008, 12:26 PM
  2. v22 peck drilling
    By 68sixspeed in forum BobCad-Cam
    Replies: 7
    Last Post: 04-03-2008, 10:17 PM
  3. Peck Drilling
    By RBrandes in forum Haas Mills
    Replies: 10
    Last Post: 06-19-2007, 01:03 AM
  4. peck drilling at an angle...
    By metalmansteve in forum G-Code Programing
    Replies: 3
    Last Post: 10-27-2006, 09:13 AM
  5. Peck drilling
    By LarryMiran in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 1
    Last Post: 10-23-2004, 11:12 PM

Posting Permissions

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