585,959 active members*
4,793 visitors online*
Register for free
Login
Results 1 to 5 of 5
  1. #1
    Join Date
    Aug 2004
    Posts
    36

    Question Fanuc bolt hole macro

    Hey guys,
    I tried this bolt hole macro (posted below) on my Fanuc OM.
    It sends the tool the correct positions, but doesn't move in Z axis.
    On the line G#3 X#110 Y#111 R#104 Z#105 F#9 in the macro,
    shouldn't it have a code to make it start drilling?
    That's the only thing I can come up with and I am new to Fanuc parametric
    so I don't know what it would be.
    Thanks in advance for the help,
    John

    O0008 (Main program)
    N005 G54 G90 S800 M03 T02 (Select coordinate system, absolute mode, start spindle, get next tool ready)
    N010 G00 X3.0 Y2.5 (Rapid to center of bolt hole pattern)
    N015 G43 H01 Z.1 (Instate tool length compensation, rapid up to workpiece)
    N020 G65 P1008 X3.0 Y2.5 Z0 R1.75 D0.75 A45.0 H8.0 C81. F5.0 (Machine entire bolt hole pattern with drilling cycle)
    N025. . . . . .


    X - Position in X for center of bolt hole pattern
    Y - Position in Y for center of bolt hole pattern
    Z - Surface in Z into which holes are machined
    R - Radius of bolt hole pattern
    D - Depth of holes
    A - Starting angle (0 is three o'clock position, plus is ccw)
    H - Number of holes
    C - Cycle type (81 is for drilling, 84 for tapping, etc.)
    F - Feedrate for machining
    Here's the actual custom macro (program O1008).

    O1008 (Custom macro to machine bolt hole circle)
    #101=1 (Initialize counter)
    #102=#1 (Initialize current angle to A)
    #103=360 / #11 (Constant for incremental angular distance between holes)
    #104=#26 + 0.1 (Constant for rapid approach plane)
    #105=#26 - #7 (Constant for Z bottom position of hole)
    N1 IF [#101 GT #11] GOTO 99 (Test if loop is finished)
    #110=#24 + COS[#102] * #18 (Calculate X position for current hole based on current angle)
    #111=#25 + SIN[#102] * #18 (Calculate Y position for current hole based on current angle)
    G#3 X#110 Y#111 R#104 Z#105 F#9 (Machine current hole)
    G80 (Cancel cycle)
    #101=#101 + 1 (Step counter)
    #102=#102 + #103 (Step current angle)
    GOTO 1 (Go back to test at loop beginning)
    N99 M99 (End of custom macro)

  2. #2
    Join Date
    Mar 2008
    Posts
    638
    I don't see where you defined #3. That's where I'd look first.

  3. #3
    Join Date
    Feb 2008
    Posts
    586
    #105=#26-#7 - Idon't see a "G" in your macro callup - that would be a zero for G, and zero minus zero is zero. No drill depth. Should that be #105=#25-#4?

  4. #4
    Join Date
    Mar 2008
    Posts
    638
    Sorry. I jumped the gun. I see where you defined #3 now. Next time I'll read more slowly. LOL.

  5. #5
    Join Date
    Aug 2004
    Posts
    36

    Smile Fanuc bolt hole macro

    Sorry guys.
    On the line
    N020 G65 P1008 X3.0 Y2.5 Z0 R1.75 D0.75 A45.0 H8.0 C81. F5.0
    I had left out the . after C81 when I put the data in the machine.
    To run a G73 in this macro, do you just add a Q value in the main program?
    Certainly appreciate the info.
    Also,does anybody have a macro for millling bolt hole counterbores (G02-G03)
    and single point thread milling on a bolt circle?
    Thanks a lot,
    John

Similar Threads

  1. Drilling Bolt Hole Patterns
    By TURNER in forum G-Code Programing
    Replies: 25
    Last Post: 09-17-2013, 04:13 AM
  2. bolt parttern around hole
    By Runner4404spd in forum Solidworks
    Replies: 2
    Last Post: 02-02-2008, 01:08 AM
  3. bolt hole circle
    By sanddrag in forum Employment Opportunity
    Replies: 5
    Last Post: 01-23-2007, 01:52 PM
  4. Bolt hole spacing on a flange
    By Bill Wann in forum Autodesk
    Replies: 4
    Last Post: 03-15-2006, 02:11 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
  •