603,907 active members*
4,733 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > info required about fanuc macro programming
Results 1 to 12 of 12
  1. #1
    Join Date
    Feb 2006
    Posts
    1792

    info required about fanuc macro programming

    I want to learn fanuc macro programming. Can somebody direct me to a web site which explains it, starting from the basics?

  2. #2
    Join Date
    Nov 2005
    Posts
    172
    http://www.cncci.com/
    great source to get started!
    Best of Luck!
    Mark T.

  3. #3
    Join Date
    Mar 2006
    Posts
    1625
    This is a great site for some training info I bought ME Consultant from Mike Lynch on this sit I use the software all the time it been most helpful from the programming stand point for feeds and speeds
    http://www.cncci.com/

  4. #4
    Join Date
    Feb 2006
    Posts
    1792
    Some clarifications needed:
    Can we call subprograms (using M98) from a macro and
    vice-versa (using G65/66)?

    If the answer is "yes", can we have a total of 8
    levels of mixed nesting (4 for macro and 4 for
    subprograms)?

    If the answer to the previous question is "yes", I
    believe, all the nested macros will have different
    "levels" of the local variables (#1 to #33), but the
    local variables of the nested subprograms will have
    the level of the calling program (which can be a macro
    or another subprogram). Am I right?
    Thanks.
    S.K.Sinha

  5. #5
    Join Date
    May 2003
    Posts
    75

    info required about fanuc macro

    There are some differences in the M98 and G65 call that you should be aware of.

    G65 allows an argument to be specified (passed to macro), M98 does not.

    When M98 contains other G-code command, the subprogram is called after execution of the G-Code. G65 calls the macro unconditionally.

    There are other differences also, with regard to Argument specifications. Without knowing what you are attempting to obtain, it would be difficult to state everything that may apply.

    Buffering (look ahead) may also affect the operation of your macros.

    The best reference is the Fanuc Operator's Manual, which has an entire section (Chapter 15 in current 16i/18i manual) on Custom Macro. I would suggest you obtain a copy.
    Paul Sevin - Ovation Engineering, Inc.
    http://www.ovationengineering.com

  6. #6
    Join Date
    Feb 2006
    Posts
    1792

    Fanuc macro

    Thanks for your reply. I do know the difference between M98 and G65/66. I also know how they work. I only want to know if it is possible to use G65/66 inside a subprogram called by M98, and also, whether M98 can be used inside a macro called by G65/66. In other words, can we have combined nesting of subprograms and macro. If yes, how are the local variables treated?
    S.K.Sinha

  7. #7
    Join Date
    May 2006
    Posts
    82
    Yes, you can. If you desigate a variable for one macro and change it for another then try to use the variable for your origanal marco with out setting your vaiables your value may not be what you are expecting.

  8. #8
    Join Date
    Feb 2006
    Posts
    1792
    Thanks for your reply. Let us discuss it with an example to make it more clear.
    The main program 1000 calls a subprogram 1001 by M98,
    1001 calls a macro 1002 by G65,
    1002 calls a subprogram 1003 by M98,
    1003 calls a macro 1004 by G65,
    1004 calls a subprogram 1005 by M98,
    1005 calls a macro 1006 by G65,
    1006 calls a subprogram 1007 by M98 and
    1007 calls a macro 1008 by G65.
    Here we have used 8 level nesting - 4 for subprograms and 4 for macros. My question is that can we have a combined nesting of 8 levels in this manner? Actually, 4 levels of nesting each for subprograms and macros are allowed.
    Assuming such a nesting is permissible with Fanuc 0i series, let us assume that a local variable #1 is being used in the main program as well as in all the nested subprograms/macros. I believe (please correct me if I am wrong!), a subprogram called by M98 does not change the level of the local variables of the calling program, whereas a macro called by G65 does change the level. This means that #1 will have different meanings in the main program 1000 and the 4 macros (1002, 1004, 1006 and 1008), but #1 of the main program 1000 and that of subprogram 1001 will have the same meaning (i.e., they refer to the same memory location). Similarly, #1 of 1002 and that of 1003 will have the same meaning, and so on. Am I correct?
    I do have the original 0i series TC and MB manuals, but these things are not clear. Kindly help! Thanks.

  9. #9
    Join Date
    May 2006
    Posts
    82
    I think I know what you want. I will test on my 150i.

  10. #10
    Join Date
    Feb 2006
    Posts
    1792
    Quote Originally Posted by lgreeves View Post
    I think I know what you want. I will test on my 150i.
    What did you find?

  11. #11
    Join Date
    Jan 2006
    Posts
    4396
    Quote Originally Posted by sinha_nsit View Post
    What did you find?

    Have you looked at this Software yet? www.ncplot.com :rainfro: This will show you how to write Macros and back plot them for you.

    Cheers!!!!!!!:cheers:
    Toby D.
    "Imagination and Memory are but one thing, but for divers considerations have divers names"
    Schwarzwald

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

    www.refractotech.com

  12. #12
    Join Date
    Feb 2006
    Posts
    340
    Quote Originally Posted by sinha_nsit View Post
    Thanks for your reply. Let us discuss it with an example to make it more clear.
    The main program 1000 calls a subprogram 1001 by M98,
    1001 calls a macro 1002 by G65,
    1002 calls a subprogram 1003 by M98,
    1003 calls a macro 1004 by G65,
    1004 calls a subprogram 1005 by M98,
    1005 calls a macro 1006 by G65,
    1006 calls a subprogram 1007 by M98 and
    1007 calls a macro 1008 by G65.
    Here we have used 8 level nesting - 4 for subprograms and 4 for macros. ....
    I believe this is all correct, and is so for any fanuc controls that support G65 and M98. The rest of the post seemed correct as well. I haven't done any testing of it though.

Posting Permissions

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