586,103 active members*
3,959 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Fanuc Macro and G-Code Programming
Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2005
    Posts
    1

    Fanuc Macro and G-Code Programming

    Hello to all,

    I just joined and hope to get a dialog going concerning the afore mentioned topics.

    I've been doing this for awhile, however, I've been out of the "hands on" shop work for the past several years.

    Now I'm back in the trenches getting some "trigger time" again and, due to some recent machine purchases, find a need to dust off the old programs.

    Below is an example of the type I'm used to, mainly for OKK, Makino, and Kuraki VMc's and B/Mills using various late model Fanuc controllers i.e. 15m, 16m, 160, etc.

    There's a lot I do not know as I'm basically self-taught. However, any information or exchange is welcome. I was just beginning to really get into it when I stopped.

    Oh, I also used macro variables along with G10's to create some interesting programs.

    Hope to hear from you all soon.

    Take care and Happy Holidays,
    KG59

    %
    O0069(DEEPHOLE MACRO OKK)
    (T H)
    ( IN. DIA. DRILL - IN. FLT.)
    (SUB PROGRAM P1069.)
    ()
    (Q = PECK AMOUNT POSITIVE NUMBER.)
    (Z = FINISHED DRILL DEPTH.)
    (C = PREVIOUS DRILL DEPTH.)
    (R = RETACT LEVEL R.1)
    (V = AMOUNT TO RAPID ABOVE EXISTING HOLE.)
    ()
    G28G91Z.0
    T
    M06
    T
    G00G54G90XY
    G43Z2.H
    SM03F
    /M08 (OR /M50)
    G66P1069 Q Z- C- R V L0
    XY
    XY
    G67
    G00G90Z2.
    M09
    G28G91Z.0Y.0
    M30

    O1069(SUB - DEEPHOLE MACRO OKK)
    IF[#17LE0]GOTO999
    IF[#22LE0]GOTO999
    IF[#3GT0]GOTO998
    IF[#18GT0]GOTO998
    IF[#23GT0]GOTO998
    IF[#3LT#23]GOTO997
    IF[#3GT#18]GOTO997
    IF[#18LE#23]GOTO997
    G00G90Z.0Z.0
    #105=#3+#22
    Z#105
    GOTO2
    N1#105=#105-#17
    G00G90Z#105
    N2#104=#105-#17-#22
    IF[#104GT#23]GOTO100
    IF[#104EQ#23]GOTO898
    IF[#104LT#23]GOTO200
    N100G01Z#104
    G00G90Z#18
    GOTO1
    N898#104=#105+#17+#22
    G01Z#104
    G00G90Z#18
    GOTO900
    N200#104=#104+#17+#22
    G00Z#104
    G01Z#23
    N900G00G90Z.0Z.0
    M99
    N997#3000=100(DEPTHS ARE WRONG..)
    N998#3000=101(ALL DEPTHS MUST BE NEGATIVE..)
    N999#3000=102(Q & V AMOUNT MUST BE POSITIVE..)
    M99
    %

  2. #2
    Join Date
    Jun 2005
    Posts
    17
    I do not do any of these programming on the machine. I normally use CAD/CAM system to generate the tool paths. I like to start learning them! Do you have any example for probing?

  3. #3
    Join Date
    Mar 2006
    Posts
    1013
    Hi,

    I was looking at your Fanuc Macro and I was wondering exactly what that macro is supposed to do? Looks like it does a hole in a previous hole.

    I want to write a macro to do a reduced peck for deep holes.

    i.e. 4" depth .75 for the first peck .05 peck reduction per peck (second peck .7 third peck .650 etc.)

    until it gets to the final depth, or the peck becomes the same value as the reduction amount.

    Have you ever seen anythin like that?

    Mike Mattera
    Tips For Manufacturing Training CD's, DVD's for Mastercam, SolidWorks, Inventor, G-Code Training & More
    http://www.tipsforcadcam.com

  4. #4
    Join Date
    Nov 2006
    Posts
    382
    Is it possible to write a M98 on a 160mc (dos version on an Okada) that goes lower in the program M98 P0010 L01 and then returns back to the line below the loop. I swear I have done it but it has been years ago. I don't want to load 2 programs, one in the 9000 area. Should be able to get it all in one program with out a macro b going on?

Posting Permissions

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