![]() | |
| Home Page | Mark Forums Read | Today's Posts | My Replies | Classifieds | Reviews | Photo Gallery | Web Links | Share Files | Advertise With Us | Ad List |
| |||||||
| Fanuc Discuss Fanuc controllers here! |
| This forum is sponsored by: |
![]() |
| | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#2
| |||
| |||
| |
|
#3
| |||
| |||
| 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/ Last edited by lakeside; 03-20-2006 at 09:54 AM. |
|
#4
| |||
| |||
| 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
| |||
| |||
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 |
| Sponsored Links |
|
#6
| |||
| |||
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 |
|
#8
| |||
| |||
| 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. |
|
#11
| ||||
| ||||
| Have you looked at this Software yet? www.ncplot.com This will show you how to write Macros and back plot them for you.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
| |||
| |||
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |