![]() | |
| 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
| |||
| |||
| No because "G" is not a valid argument for a macro call. You'll either get an error or it gets ignored. If you want to make sure you are in G98, just have G98 written in the macro program.
__________________ It's just a part..... cutter still goes round and round.... |
|
#3
| |||
| |||
| Any G-code after G65 is illegal, because it would be considered an argument. But, before G65, it would be considered a regular G-code. If it is a code like G98, probably there would be no problem. But a movement code may affect the logic, because while the tool is moving, the macro execution would simultaneously start. The best thing would be not to confuse the control (and ourselves), and always command G65 in a separate block. An excerpt from the Operator's Manual: "When an M98 block contains another NC command (for example, G01 X100 M98 P_), the subprogram is called after the command is executed. On the other hand, G65 unconditionally calls a macro." |
|
#4
| |||
| |||
However, a bit confused here .... You ask a question but had all the answers????
__________________ It's just a part..... cutter still goes round and round.... |
|
#5
| |||
| |||
| Sinha…if you are going to be calling a macro were the G98 is important then why would you want to call it in the macro line? Why not just hard code it in the program so you never have to worry about it again. If you are curious because you may want to switch from G98 G99 but use the same macro then use a variable to specify it instead of hard coding it. All of my macros I write for milling have data sheets to follow on the designation of the variables. If someone were to use the setup sheet there is no easy way to say “hey make sure you put G98 in the macro call”. It’s not common practice to involve anything other than the program and variable passage in the macro call line so I would highly suggest leaving the macro line alone. Stevo |
| Sponsored Links |
|
#6
| |||
| |||
| There is one more reason for posing this particular question. I did not find any new post that day. So, I thought we must have someting to discuss! I believe, everybody loves to talk. So, I may be excused, if you do not like my habit. |
|
#7
| |||
| |||
|
|
#8
| |||
| |||
|
You are right. I verified it on the machine. A G-code to the right of G65 would alarm out. A G-code to the left of G65 is ignored. So, for example, G98 G183 ... is not correct. M98 has a slightly different behaviour. If we command G01 W-100 F100 M98 P8000, then the G-code is not ignored. But, the subprogram call does not wait for the motion to be complete. |
|
#9
| |||
| |||
|
Shinha….you don’t need to apologize. I actually like the questions or suggestions you have as they usually lead me to trying things I have never thought of or simplifying things. I like to learn something new when I can. I just found it comical when Psycho said that. No insult towards you though. Macro’s are great so keep it up and have fun with it. Yes macro calls will act different then subprogram calls. Now what I was trying to get at before was I would not suggest using G98G183 just because it is not the norm and if someone does not know that it has to be specified in the macro call line then having a small R-plane with tall clamps can be a major problem. Not to mention as you stated it does not work. I like to teach my guys that they don’t have to worry about the macro it will repeat without error. It’s the darndest thing that a machine will only do what you tell it to do. They are very disciplined. If you are using a G183 to call your drill macro then I ass u me that you have variables that you are passing along to the macro? G183A()B()C()E()V() etc to specify the specifics of what you want to machine. (correct) I would suggest that you make another variable in the macro line that specifies G98 or G99 and label it as so. For example use R(). So in the call line G183A()B()R98. Now in your macro program specify it in your canned cycle line as G#18. Another thing I like to do is use my custom codes for more specific things per machine rather than calling a machining macro. You will find out down the road that the more macros you write will be tailored specific and you will think you need to use a custom code like G183 but you will soon find that you will run out of the allowable amount of custom codes. What I am working on now requires 4 different ways of using a bolt circle canned cycle so 4 programs are needed. I also have C-bores, threadmilling, tapping, etc that also require 4 programs each. You can see that I will never have enough custom codes for that. That is why sticking with the G65P() is the better way to go for me. I then make a book describing each program and the variable usage with it. This book is at the machine. Straight forward and to the point with no confusion. Stevo |
|
#10
| |||
| |||
| Do all control versions allow only 10 custom G-codes? I find that usually controls give more options than it is ever needed. Be it total number of local/common variables, or 4-level nesting of macros/subprograms, or 3-level nesting of WHILE loop, or max permissible spindle speed/feedrate/stroke length etc. On this scale, at least 100 new G-codes should have been allowed! I did not include 98/99 in the argument list, because I wanted to make G183 similar to G83. |
| Sponsored Links |
|
#11
| |||
| |||
| Sinha, Most of my experience is on Fanuc so I cannot speak for other controls and the amount of custom codes you can have. With Fanuc yes there are options that can be turned on thru the parameters to give you more “variables” and “macroB” programming ect. There is no option to give the user more custom codes. Also you are only allowed to nest up to 3 WHILE loops and no option to expand this. These are just examples of the call and sub. Lets say G83 calls program 9001 and G183 calls 9002. Z=drill depth, R=return plane, Q=pick size, D=return point G98 or G99 O0001(MAIN) G83Z1.R.1Q.1D98 M30 O9001(macro sub) … G0Z3. G83G#7Z-#26R#23Q#17 … M99 In this example your return point will be using G98 “initial level”. If you change your D=99 then it will use the “R-level” of .1 Now using the G183 O0001(MAIN) G183Z1.R.1Q.1D98 M30 O9002(macro sub) … G0Z3. G83G#7Z-#26R#23Q#17 … M99 Again I am not sure how your macro is structured but this is the basic idea of what I am refering to. Stevo |
|
#12
| |||
| |||
| Basically I want that every subsequent peck length is smaller than its previous value, e.g., <peck length> = <peck length> * 0.9, till it becomes smaller than a specified minimum peck length, when its value is clamped and not reduced further. This is not possible by having G83 inside the macro. Of course, we can divide the hole into several parts, and call G83 separately for each part, with the desired peck lengths for each part. So, I designed G183 using G00 and G01 only, imitating most of the features of G83. Of course. G183 would not be a canned cycle like G83. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| G/M/S/T codes in the same block | sinha_nsit | Fanuc | 1 | 07-08-2008 05:05 AM |
| 417 & 427 codes | chetohead | General CNC (Mill and Lathe) Control Software (NC) | 0 | 04-30-2008 02:40 PM |
| M-codes and G-codes 4 Matsuura ES-1000V | maximusek | G-Code Programing | 2 | 11-27-2007 06:41 AM |
| RS232 program block by block | smoregrava | General CNC (Mill and Lathe) Control Software (NC) | 3 | 12-22-2005 12:52 AM |
| g-codes | pimp215 | General Metalwork Discussion | 11 | 03-07-2005 01:43 PM |