588,648 active members*
6,378 visitors online*
Register for free
Login
Page 1 of 2 12
Results 1 to 20 of 25
  1. #1
    Join Date
    May 2005
    Posts
    90

    Fanuc parts counter

    I have a miyano lathe with a Ge series Fanuc O-T controller
    i want to add into my program if possible
    a way to when it runs lets say 50 parts the machine will stop
    and wait for the operator to either hit cycle start again
    or clear the count then hit cycle start
    something to have them run only a certain number of parts
    to remove from the machine check the last one of that bactch
    then start back up again..i dont do macro programming
    so is there a way to do it in standard G-code.

    thanks
    Nick

  2. #2
    Join Date
    May 2006
    Posts
    265
    Do your controll have the macro B option?
    Otherwise you could use a subprogram and call the machining prg 50 times.

    EX.
    %
    O1000
    M98 P2000 L50
    M30

    O2000
    Prog..

  3. #3
    Join Date
    May 2005
    Posts
    90
    im not sure about the B marco option

    i was tryin to stay away from the subprogram deal
    i was hoping there was a way for me to just specify a line of code
    near the end of the program

  4. #4
    Join Date
    May 2006
    Posts
    265
    I ve got the Part counter option, Just define number of parts at Mdi/settings and use M54 in program to count..

  5. #5
    Join Date
    May 2006
    Posts
    265
    #100=0
    N10
    MACHINING
    #100=#100+1
    If[#100EQ50]goto500
    goto10
    N50M30


    Mabe this will work

  6. #6
    Join Date
    May 2005
    Posts
    90
    Lets Say This Is My Program
    And I Want It To Stop At 50 Parts
    Would U Mind Showing Me Where In This Program To Place
    What You Are Referrign To With The M54


    67a7519ho1 7/7/2006)
    T0606m05(bar Stop)
    G00x0.1z0.0
    M12
    G00x2.z3.
    T0600
    M01
    N001 G50 S3000
    N002 T0100
    N003 G00 G96 S249 M03 T0101
    N004 M08
    N005 G00 X0.7 Z2.
    N006 G00 Z2.1
    N007 X0.5988
    N008 Z0.1
    N009 G01 Z0 F0.007
    N010 X-0.0312
    N011 G00 Z2.1
    N012 X0.7
    N013 Z2.
    (cnmg .015)
    N014 X0.9
    N015 Z0.0094
    N016 X0.6452
    N017 G01 X0.4452 S250
    N018 Z-0.154
    N019 X0.5938
    N020 G03 X0.645 Z-0.1796 I0 K-0.0256
    N021 G01 Z-0.2596
    N022 G00 X0.845
    N023 Z0.0094
    N024 X0.595
    N025 G01 X0.395
    N026 Z-0.154
    N027 X0.4452
    N028 G00 X0.9
    N029 Z0.0094
    N030 X0.575
    N031 G01 X0.375
    N032 Z-0.164
    N033 X0.5938
    N034 G03 X0.625 Z-0.1796 I0 K-0.0156
    N035 G01 Z-0.2596
    N036 G00 X0.9
    N037 Z2.
    N038 X0.7
    (.25 Drill)
    N039 G00 Z2. M09
    N040 T0100
    N041 M01
    N042 T0200
    N043 G00 G97 S1528 M03 T0202
    N044 M08
    N045 G00 X0.7 Z2.
    N046 G00 X0 Z1.
    N047 Z0.1
    N048 G01 Z-0.15 F0.003
    N049 G00 Z0.1
    N050 Z-0.1
    N051 G01 Z-0.3
    N052 G00 Z0.1
    N053 Z-0.25
    N054 G01 Z-0.45
    N055 G00 Z0.1
    N056 Z-0.4
    N057 G01 Z-0.5751
    N058 G00 Z1.
    N059 X0.7 Z2.
    (.125 Wide Part Off Tool)
    N060 G00 Z2. M09
    N061 T0200
    N062 M01
    N063 T0500
    N064 G00 G96 S250 M03 T0505
    N065 M08
    N066 G00 X0.7 Z2.
    N067 G00 X0.9
    N068 Z-0.3199
    N069 X0.8574
    N070 G01 X0.6574 F0.02
    N071 X0.6092 Z-0.344 F0.003
    N072 X0.14
    N073 G00 X0.9
    N074 Z2.
    N075 X0.7
    N076 G00 X0.64 Z2. M09
    N077 T0500
    N078 M30

  7. #7
    Join Date
    May 2006
    Posts
    265
    If you got the M54 option for part count, then you could put out your code just before M30 and change M30 to M99 to repeat prog.. The number of parts must be sett manually in Mdi mode on the system/setting screen. (I think it is called so)..
    But if you dont got this option you got to use a macro and if you dont have the Macro B option you must use sub prog.

  8. #8
    Join Date
    May 2006
    Posts
    265
    67a7519ho1 7/7/2006)
    #100=0
    #101=50 -- 50 = part numbers
    N500
    T0606m05(bar Stop)
    G00x0.1z0.0
    M12
    G00x2.z3.
    T0600
    M01
    N001 G50 S3000
    N002 T0100
    N003 G00 G96 S249 M03 T0101
    N004 M08
    N005 G00 X0.7 Z2.
    N006 G00 Z2.1
    N007 X0.5988
    N008 Z0.1
    N009 G01 Z0 F0.007
    N010 X-0.0312
    N011 G00 Z2.1
    N012 X0.7
    N013 Z2.
    (cnmg .015)
    N014 X0.9
    N015 Z0.0094
    N016 X0.6452
    N017 G01 X0.4452 S250
    N018 Z-0.154
    N019 X0.5938
    N020 G03 X0.645 Z-0.1796 I0 K-0.0256
    N021 G01 Z-0.2596
    N022 G00 X0.845
    N023 Z0.0094
    N024 X0.595
    N025 G01 X0.395
    N026 Z-0.154
    N027 X0.4452
    N028 G00 X0.9
    N029 Z0.0094
    N030 X0.575
    N031 G01 X0.375
    N032 Z-0.164
    N033 X0.5938
    N034 G03 X0.625 Z-0.1796 I0 K-0.0156
    N035 G01 Z-0.2596
    N036 G00 X0.9
    N037 Z2.
    N038 X0.7
    (.25 Drill)
    N039 G00 Z2. M09
    N040 T0100
    N041 M01
    N042 T0200
    N043 G00 G97 S1528 M03 T0202
    N044 M08
    N045 G00 X0.7 Z2.
    N046 G00 X0 Z1.
    N047 Z0.1
    N048 G01 Z-0.15 F0.003
    N049 G00 Z0.1
    N050 Z-0.1
    N051 G01 Z-0.3
    N052 G00 Z0.1
    N053 Z-0.25
    N054 G01 Z-0.45
    N055 G00 Z0.1
    N056 Z-0.4
    N057 G01 Z-0.5751
    N058 G00 Z1.
    N059 X0.7 Z2.
    (.125 Wide Part Off Tool)
    N060 G00 Z2. M09
    N061 T0200
    N062 M01
    N063 T0500
    N064 G00 G96 S250 M03 T0505
    N065 M08
    N066 G00 X0.7 Z2.
    N067 G00 X0.9
    N068 Z-0.3199
    N069 X0.8574
    N070 G01 X0.6574 F0.02
    N071 X0.6092 Z-0.344 F0.003
    N072 X0.14
    N073 G00 X0.9
    N074 Z2.
    N075 X0.7
    N076 G00 X0.64 Z2. M09
    N077 T0500
    #100=100+1
    If[#100EQ#101]goto600
    N078 Goto500
    N600 M30

  9. #9
    Join Date
    May 2005
    Posts
    90
    ok now on the mid/setting page ???under macro??
    i go to variables column and put 50 where at??
    which variable #

  10. #10
    Join Date
    Dec 2005
    Posts
    3319
    Please revisit post #8 as you read the following:

    The "counter" is essentially the 2 lines after N077. The "if" statement provides the count and stop/repeat logic "decider".

    This in concert with the two lines added at the very beginning of the program (the ones with the #) should count the parts and stop the program just as you asked.

    The amount of parts you want is done here:

    #101=50 -- 50 = part numbers

  11. #11
    Join Date
    May 2005
    Posts
    90
    ill give it a try
    thanks

  12. #12
    Join Date
    Jun 2005
    Posts
    194
    Run Hours and Part Count Display: 907.4
    JR Walcott
    Georgia Machine Tool Resources, LLC

  13. #13
    Join Date
    May 2005
    Posts
    90
    Quote Originally Posted by Jarwalcot
    Run Hours and Part Count Display: 907.4
    what/??

  14. #14
    Join Date
    May 2006
    Posts
    265
    THat is if you got the part counter option from fanuc.. PRess setting key a couple of times and it will appear on your screen. USe M54 to count..

  15. #15
    Join Date
    Mar 2006
    Posts
    167
    Note....if you are able to use the parts counter on the offset/setting screen, it will depend on the manufacturer's choice of M code as to what triggers the count. As M-Man says, use M54 (which may or may not be right for your machine). The machines I deal with use either M30/M02 or M10 depending on the setting of a keep relay. You would need to consult the manual for the right M code to use.

    Regards, Oz

  16. #16
    Join Date
    May 2005
    Posts
    90
    mine uses M30 to count the parts...i have the parts counter
    i just want the machine to stop when it reaches a certain # of parts
    i have a continous button that allows it to start the program over on its
    own after it reads the M30...so i can just turn it on walk away and
    go back and have it stopped after 50 parts while im running or setting up another machine...that way if something went wrong i would only have 50 parts to sort through not a 100 or more

  17. #17
    Join Date
    Jun 2005
    Posts
    194
    Try this:

    Set variable #500 to how many parts you want to stop oat.

    At the end of the program:
    #501=#501+1
    IF [#501LT#500] GOTO999
    #501=0
    M0(YOU HAVE REACHED NUMBER OF PARTS)
    N999 M30

    Good luck,
    JR Walcott
    Georgia Machine Tool Resources, LLC

  18. #18
    Join Date
    May 2005
    Posts
    90
    thanks

  19. #19
    Join Date
    May 2005
    Posts
    90
    i tried that and as soon as the machines tries to read the line with #501
    in it i get a 004 alarm which im my book says
    A numeral or the " - " sign was input without an address at the beginning of a block
    any ideas

  20. #20
    Join Date
    Dec 2005
    Posts
    3319
    Sure:

    I am not a G code programmer BUT I did do Fortran and Basic programming which is, to some extent, involves exactly the same thing with regard to counting logic.

    The "counter" is setting up an arbitrary value of a variable (#500 in this case). The variable is #500 but could be "dogfood" - all it needs to be is SOMETHING that machine can read and equate with a numerical value (your instantaneous and ultimately desired parts count).

    The first value is essentialy 0. At the end of the machining cycle, the "count" is first checked to see if it is greater than or equal to your "set point" (desired parts count). If not, it adds one to the count and recycles and does the operation over again.

    Once it goes thru, it then compares the count again and if the count now meets the "set" value (handled by the IF logic line), it goes to the end of the run and shuts the machine down - exactly what you asked for.

    Idea: feed the machine a variable in a format it wants to see/will accept. Hopefully, you'll eventually find one that the machine will read and update as you go thru the "DO loop" (as in "DO this N times" then quit).

    You're going to have to "fix" each problem as it comes up by figuring out what your machine wants to see in the way of code so as to make the part count and logic comparere to work.

    EDIT

    Perhaps the lack of a line number at the start of the count logic line is screwing up the machine. OK, so add one to the line that's choking the program.

    Just make sure it doesn't trip up the counter/flow thru logic

    END EDIT

    Otherwise, you can call Fanuc and pay (probably dearly) for the option if it can be installed. An afternoon of experimentation by cutting air (and use N = 2 or 3 to save time) should enable you to figure out the programming logic.

    BTW, a programming manual in the machine's language will be real handy and a call to Fanuc to see what the machine will take in the way of an updateable variable might do wonders in troubleshooting/developing your counter.

    Whether you know it or note, this is all that Fanuc is doing with their "parts count option" - they just don't let you see HOW they do it. High priced industrial magic - incrementing a simple counter by 1 each time thru the DO loop.

    Isn't capitalism great???

Page 1 of 2 12

Posting Permissions

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