586,108 active members*
3,014 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > how to get multiple parts from a bar
Results 1 to 14 of 14
  1. #1
    Join Date
    Dec 2009
    Posts
    88

    how to get multiple parts from a bar

    i know that u need to use a main program for the count and a sub program for the machining but could any one give me a Ex. i am using a yama seiki with a fanuc series oi-tc

  2. #2
    Join Date
    Jun 2008
    Posts
    1511
    Are you asking how you code the program to count the parts?

    Stevo

  3. #3
    Join Date
    Dec 2009
    Posts
    88
    i have figured it out using a main and sub program but if u know how to do it in one program that would be helpful
    thanks

  4. #4
    Join Date
    Jun 2008
    Posts
    1511
    Quote Originally Posted by firekoe View Post
    i have figured it out using a main and sub program but if u know how to do it in one program that would be helpful
    thanks
    You still haven't told me what you are trying to do or what you figured out. Are you trying to setup something to count parts? Or are you coding the program to machine a part then index the bar and start over again?

    You can also post your code so we can take a look at it and see about putting it into 1 program.

    Stevo

  5. #5
    Join Date
    Dec 2009
    Posts
    88
    the way i am doing it seems to work but would you know anything about a G84 for tapping and if so can you give a Ex for a M6x1 thanks

  6. #6
    Join Date
    Jun 2008
    Posts
    1511
    First you need to figure out your feed based on the speed you want to use. If your machine is in inch mode. Your thread is M6x1 so you need to take 1/25.4=.03937. multiply that by the speed you choose say 100. So your s&f are F3.937 S100.

    G0G90X0Y0Z3.—position tool 3” above and sets “initial level”
    M3S100---spindle on
    M29---rigid tap mode
    G98G84Z-.5R.1F3.937M8—G98 is "initial level" return(G99 is R-level return), Z tap depth
    M30

    Most fanucs default code is G98 so you may or may not need to use it depending on which your prefer.

    I am still waiting and curious what your original issue/question actually was. What were you trying to do that now works?

    Stevo

  7. #7
    Join Date
    Dec 2009
    Posts
    88
    my original question was how do a get the machine to go to the top of the program and start again with out having to do anything. what i did to salve this to wright a little mane program with called up a sub and told the machine how many time to repeat the sub program. but was wondering if there is a way to do this with out having a sub and main program (all in one)


    thank for the info on rigid tapping.

    i am new to the cnc part of machining as the guy that used to run these machines left and i was elected to jump in and i great appreciate the help that you have given me today

    Thanks
    Kevin

  8. #8
    Join Date
    Jul 2005
    Posts
    12177
    Quote Originally Posted by firekoe View Post
    .....what i did to salve this to wright a little mane program with called up a sub and told the machine how many time to repeat the sub program. but was wondering if there is a way to do this with out having a sub and main program (all in one)....Thanks
    Kevin
    You want everything in one program? I think the only solution is buy a Haas.

    The Haas allows you to do a local subroutine call, M97 Pnnnn where the nnnn is a line number in your main program. Normally I put them at the bottom after the M30 so a program looks like this:

    O00000
    Comments, etc, set work zero, enter tool diameters, whatever.
    M97 P1000 L10
    G28
    M30
    ----
    N1000
    This is the program that does the part
    M99 sends it back to the M97 line until L is counted to zero then to the line below.

    Much, much more convenient than having two separate programs.
    An open mind is a virtue...so long as all the common sense has not leaked out.

  9. #9
    Join Date
    Dec 2009
    Posts
    88
    that does not help as i don't have a haas TC and i don't like the haas machines as we have a hass tool room mill and from my experiences it a poor quality machine that is cheaply made will nosey swiss motor thanks any way

  10. #10
    Join Date
    Jun 2008
    Posts
    1511
    Kevin,
    You’re more than welcome for the help.

    I got ya now. 2 programs are fine for what you are trying to do. The 2 main ways to accomplish what you are doing is the way you are doing it or writing some macro code to jump to the beginning of the program that way it can be in 1 program. An example of something like this would be.

    #1=5(number or parts)
    #2=0(counter)
    N1

    …your machining code here.
    #2=#2+1
    IF[#2LT#1]GOTO1
    M30

    #2 will count by 1 everytime that you run a part(your machining code). Once #2 has reached the same value as #1 the program will no longer jump to the N1 address and it will simply read the M30 and end the program.

    Stevo

  11. #11
    Join Date
    Mar 2004
    Posts
    32
    M99 instead of M30 at the end of the program will run it again.
    Could you try M99 L10 at the end and see if it runs 10 times instead of indefinatley?

    A quick experiment:
    O0001;
    G4 X2.;
    M99 L5;

    Also if you have "memory restart" mode. (I am pretty sure every Yama Seiki lathe I have seen has this) I believe you can preset your "parts required" on the settings page and it will run that many cycles. A quick call to Yama Seiki should verify this.

    Note: this is not the "memory restart" mode used to continue in a program when you change a tool etc. this is the mode that would be run with barfeeders to continually restart program.

  12. #12
    Join Date
    Feb 2006
    Posts
    1792
    On Fanuc, you have system variables for no. of parts required and no. of parts produced, in the current machining session. You can store a desired value for no. of parts required. The no. of parts produced automatically increments whenever M02/M30/M-code defined in a parameter is executed (You can define, say, M100 for this purpose). You can compare the two variables, for terminating the program execution (which is run in a loop).

  13. #13
    Join Date
    Dec 2009
    Posts
    88
    Thanks to all for the vary useful info

  14. #14
    Join Date
    Jun 2008
    Posts
    1511
    Your welcome.

    Stevo

Similar Threads

  1. Need help machining multiple parts
    By greenweanie in forum EdgeCam
    Replies: 5
    Last Post: 06-18-2012, 08:59 PM
  2. Multiple parts 1 stock
    By cnckyle in forum SolidCAM for SolidWorks and SolidCAM for Inventor
    Replies: 9
    Last Post: 01-26-2010, 12:07 PM
  3. Multiple parts in one set up...?
    By Rot Iron Racer in forum Dolphin CAD/CAM
    Replies: 1
    Last Post: 08-16-2008, 05:28 AM
  4. Multiple Parts In M.C.
    By stang5197 in forum Mastercam
    Replies: 5
    Last Post: 03-12-2007, 01:13 AM
  5. Multiple Parts
    By nitemare in forum G-Code Programing
    Replies: 2
    Last Post: 12-22-2005, 02:14 AM

Posting Permissions

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