585,883 active members*
5,022 visitors online*
Register for free
Login
Results 1 to 2 of 2
  1. #1
    VanDickie Guest

    Question macro loop help

    I want a short program that will peck drill a hole around the 4th axis. I have it to start at 45deg and do an 8 hole pattern then end at 360 or 0 deg. The goal is to have something that I can simply edit my #1 value to alter how many holes my pattern consists of. E.g. if I changed #1 to =30 I would get a 12 hole pattern still ending in the same location. This is my first crack at this type of program and is only an excersise so the depths, feeds, and speeds have no meaning. Will what I have work? Any input would be appreciated.

    O10080 (program name)
    #1=45 (local value)
    G54G90G40G80G20 (workzone,ABS,rad comp cancel,can cycle cancel,inch)
    M06T3 (call tool 3)
    M03S2800 (spin cw 2800rpm)
    GOOX1.Y1. (rapid to location)
    A45 (rotate 4th axis to 45 deg)
    G43Z.25H3M08 (height comp on,rapid Z start,offset 3,coolant on)
    WHILE[#1LE360]DO1 (macro condition)
    G99G73Z-.75R.1Q.085F4.0 (use R value,peck drill can cycle,max Z depth,clearance plane,peck depth,feed)
    X2. (position)
    X3. (position)
    Y2. (position)
    X2. (position)
    X1. (position)
    G80G00Z.25 (can cancel,rapid to Z start)
    #1=#1+#1 (rotate 45 deg past original rotation)
    END1 (end of loop)
    M05 (spin off)
    M09 (coolant off)
    G91G28Z0. (INC,home)
    G28Y0. (home)
    G90 (ABS)
    M30 (prog end)

  2. #2
    Join Date
    Jan 2005
    Posts
    304
    O10080 (program name)
    #1=45 (local value)
    #2=0(index position counter(************************)
    G54G90G40G80G20 (workzone,ABS,rad comp cancel,can cycle cancel,inch)
    M06T3 (call tool 3)
    M03S2800 (spin cw 2800rpm)
    GOOX1.Y1. (rapid to location)
    A45 (rotate 4th axis to 45 deg)
    G43Z.25H3M08 (height comp on,rapid Z start,offset 3,coolant on)
    WHILE[#2LE360]DO1 (macro condition)(***********************************)
    G0A[#2] (rotate 4th axis to## deg)(****************************)
    G99G73Z-.75R.1Q.085F4.0 (use R value,peck drill can cycle,max Z depth,clearance plane,peck depth,feed)
    X2. (position)
    X3. (position)
    Y2. (position)
    X2. (position)
    X1. (position)
    G80G00Z.25 (can cancel,rapid to Z start)
    #2=#2+#1 (rotate 45 deg past original rotation)(**********************************)
    END1 (end of loop)
    M05 (spin off)
    M09 (coolant off)
    G91G28Z0. (INC,home)
    G28Y0. (home)
    G90 (ABS)
    M30 (prog end)[/QUOTE]

Similar Threads

  1. Macro Loop
    By VanDickie in forum Fanuc
    Replies: 6
    Last Post: 03-06-2013, 10:12 PM
  2. macro question loop
    By modulus in forum G-Code Programing
    Replies: 13
    Last Post: 03-24-2009, 08:27 PM
  3. macro - motion pauses each loop
    By kendo in forum Haas Mills
    Replies: 2
    Last Post: 12-18-2008, 12:17 PM
  4. question on closed loop vs open loop (servo systems)
    By boonie in forum Servo Motors / Drives
    Replies: 20
    Last Post: 11-09-2007, 07:30 PM
  5. Macro WHILE DO END Loop (Lathe)
    By Jorge-D-Fuentes in forum G-Code Programing
    Replies: 18
    Last Post: 07-25-2007, 02:57 PM

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
  •