584,850 active members*
4,416 visitors online*
Register for free
Login
Results 1 to 9 of 9
  1. #1
    Join Date
    Apr 2007
    Posts
    45

    Repeat subprogram continuously.

    Hello

    We have nakamura tomb wt150s with Fanuc 18i controllers. I would like to have a main program that does a top cut then switch to the sub program and continuously run the sub program untill the memory restart switch is shut off. With the memory restart on the programs sees the M30 and restarts but goes to the main program. Is there a way to have it hit the M30 or a different M code and have it repeat the sub program untill the memory start switch is shut off?

    Thanks for any advise.

  2. #2
    Join Date
    Mar 2003
    Posts
    2932

    Re: Repeat subprogram continuously.

    It's not exactly infinite, but you could use M98 P99991001

    P9999 is the number of times it will repeat sub-program O1001

  3. #3
    Join Date
    Apr 2007
    Posts
    45

    Re: Repeat subprogram continuously.

    I cant use that because it is never known how many parts it will run until it is shut down. We are a high production shop and run the same parts all year long with one operator running many machines. Also for simplicity I have to keep it working so that the memory restart toggle switch is how the machine is stopped.

  4. #4

    Re: Repeat subprogram continuously.

    The best way to this is to NOT use a sub program. Insert the Sub Program ant the end of the main program and use the GOTO command. Using Block Skip (Block Delete) you will run till you turn off the Block Skip button.
    Main Program
    O0001Main Program)
    N10 Part of main program
    N20 Part of main program
    N30 Part of main program
    N40 Part of main program
    N50 Start of old sub program copy and pasted into main program
    N60 Part of Sub Program
    N70 Part of Sub Program
    N80 Part of Sub Program to when ever
    / N200 M30
    N210 GOTO 50

  5. #5
    Join Date
    Apr 2007
    Posts
    45

    Re: Repeat subprogram continuously.

    I would like to use

    Main prog ---------------------------------------Sub prog

    N10 TOP CUT ----------------------------- O1234

    N20 (PROGRAM) ---------------------------N40 (SUB PROGRAM)

    N30 M98 P1234 --------------------------- N50 M99P0040

    Think this would run the top cut go into sub program then hit the M99 and jump back to line 40 in the subprogram and keep going continuously. But i dont know if there is a way to make the Memory restart use a M99 instead of the M30.

  6. #6
    Join Date
    Apr 2007
    Posts
    45

    Re: Repeat subprogram continuously.

    We use bar feeders that are activated by the block skip function automatically. Machine automatically skips the block skip lines and when it goes to load a new bar it activated the machine to read them. So that also takes the block skip feature out of my hands.

  7. #7

    Re: Repeat subprogram continuously.

    How does the restart toggle switch interact with the program?

  8. #8
    Join Date
    Apr 2007
    Posts
    45

    Re: Repeat subprogram continuously.

    When in the memory restart position it reads M30 and restarts from the top line of the program. If the switch is off then it reads M30 as the end of the program and stops.

  9. #9
    Join Date
    Apr 2007
    Posts
    45

    Re: Repeat subprogram continuously.

    I will have to shut a machine down and try some stuff. If the Toggle switch makes it read the M30 as M99 maybe i can enter in a M30 with the M99 P values to restart it where i want.

Similar Threads

  1. Replies: 12
    Last Post: 01-31-2014, 11:01 PM
  2. Repeat Subprogram problem!
    By quasarix in forum Fanuc
    Replies: 5
    Last Post: 12-19-2011, 09:17 AM
  3. How long can you run a Dremel continuously?
    By Fozzie55 in forum WoodWorking Topics
    Replies: 15
    Last Post: 07-11-2011, 05:48 PM
  4. Replies: 2
    Last Post: 10-21-2010, 03:24 PM
  5. fanuc o-m, subprogram repeat w/ z axis shift?
    By MOtorPARts in forum Fanuc
    Replies: 25
    Last Post: 09-19-2009, 05:41 AM

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
  •