Stringing Together Multiple Controller Macros for Sequenced Operations

      Programming tips for creating a main G-code and multiple subroutines to manage a series of different nested operations on one panel after another. March 4, 2009

Say youre nesting 30 plus sheets with each sheet a different operation. How can I set up the machine to bring up and start the next operation simply by activating the cycle start button? Where can I learn to write macros?

Forum Responses
(CNC Forum)
From contributor E:
Our KOMO which has a Fanuc controller has a program called DNC Barcode which lets you batch multiple programs. I'm not sure if that's a KOMO program or part of the Fanuc controller?

From contributor J:
You need the Fanuc Basic operation package and the DNC operation management package.

From contributor M:
Best of my knowledge it would take a macro and some discipline setting up your file system, but my thought is that it a barcode reader would be easier, more reliable and more versatile. The issue you are bringing up is my one gripe with the Anderson machines. I really like the hardware a lot, having used one for a year, and the Fanuc controller is very reliable and solid. But the user interface is clunky, slow and not operator friendly. It takes forever to call a sheet, and treeing through a directory of 60 files 9 lines at a time, 5 to 10 seconds per scroll is maddening

There is another way if you are using CV or CW or Alpha Cam, though it has its own problems too. You can output your nested runs as one large file running over DNC with a pause between each sheet. This can work pretty well, but if you have an error or an issue that needs attention on sheet 7 of a 30 sheet run, you have a problem picking that up in the middle again. The Macro solution may present this issue in a different way, depending on how you write it.

From contributor T:
It would seem to me that if you batched all of the sheets together and made sure they each included a start/stop command at the beginning and end, that this should be somewhat easy to accomplish. The overall program will be quite large and could possibly be spoon fed into the control with some simple DNC software.

From contributor O:
Contributor L - FYI, that program you use is a KOMO program. The Fanuc Basic Operation Package and the DNC software is all you need. Since you have an Andi already, you probably have the B.O.P. software. Its pretty simple to set up.

From contributor K:
Hopefully you will have had this addressed to your satisfaction, but if you have not , here is what I would recommend - typically my recommendations are using the software of the control itself, because its cheap, you already have it and once you get used to it it really isn't a huge undertaking! I am assuming you have a standard Fanuc or standard EIA/ISO control.

1.) Transfer all nest programs to the control memory.
2.) Edit the last line of each program from M30 or M02 to M99. This is the M command which tells the control this program is functioning as a sub program so after it has executed, the control must jump back to the main program.
3.) Create a main program. Use the standard preperatory blocks you would normally (you can get this by looking at the lines of your current programs prior to movements). After you have inserted these lines create a line that looks like so: N30 M98 P0001 then repeat this process for every program number of the nests.
4.) You can place man readable comments between () and specify what each program is for to make it easier to find.
5.) Your main program would be 30 or so lines long, jumping in and out of each of the nested programs in whatever sequence you specified.
6.) At the end of the main program - place an M02 or M30 (whichever you use). You can actually create a spread sheet to do this for you once you are familiar enough with the syntax.

I know its not the preferred option for many, but if youre on a budget it works pretty well. It does take some studying of the way you code your machine - which I recommend to most people anyway. If you do not understand the code, it is very difficult to troubleshoot anything. It is worth the investment to understand how your control interprets code!

From contributor K:
Revision # 1 I forgot to put this in the original post, but inserting an M00 in-between the subprogram call lines will provide for you to unload/load then press cycle start to continue with next nest. My apologies for overlooking that!

Would you like to add information to this article?
Interested in writing or submitting an article?
Have a question about this article?

Have you reviewed the related Knowledge Base areas below?
  • KnowledgeBase: Knowledge Base

  • KnowledgeBase: Computerization

  • KnowledgeBase: Computerization: CNC Machinery and Techniques

    Would you like to add information to this article? ... Click Here

    If you have a question regarding a Knowledge Base article, your best chance at uncovering an answer is to search the entire Knowledge Base for related articles or to post your question at the appropriate WOODWEB Forum. Before posting your message, be sure to
    review our Forum Guidelines.

    Questions entered in the Knowledge Base Article comment form will not generate responses! A list of WOODWEB Forums can be found at WOODWEB's Site Map.

    When you post your question at the Forum, be sure to include references to the Knowledge Base article that inspired your question. The more information you provide with your question, the better your chances are of receiving responses.

    Return to beginning of article.

    Refer a Friend || Read This Important Information || Site Map || Privacy Policy || Site User Agreement

    Letters, questions or comments? E-Mail us and let us know what you think. Be sure to review our Frequently Asked Questions page.

    Contact us to discuss advertising or to report problems with this site.

    To report a problem, send an e-mail to our Webmaster

    Copyright © 1996-2018 - WOODWEB ® Inc.
    All rights reserved. No part of this publication may be reproduced in any manner without permission of the Editor.
    Review WOODWEB's Copyright Policy.

    The editors, writers, and staff at WOODWEB try to promote safe practices. What is safe for one woodworker under certain conditions may not be safe for others in different circumstances. Readers should undertake the use of materials and methods discussed at WOODWEB after considerate evaluation, and at their own risk.

    WOODWEB, Inc.
    335 Bedell Road
    Montrose, PA 18801

    Contact WOODWEB

  • WOODWEB - the leading resource for professional woodworkers

      Home » Knowledge Base » Knowledge Base Article