Hello everyone,
I've created some programs to machine parts using Fanuc Macro sub-program calls and some Custom G-Code Calls to machine each part (with the ability to skip some ro allparts etc...)
Here's a sample sub-program os a machining operation (the principle is that it repeats itself once for each part):
The G110 is a custom G-Code that will call a subprogram that handles tool calls, origines, etc.. and the G130 will set the next part to be machined and will either jump back to N110 to machine the next part or to N130 if it has machined all the parts.
The question I have is if you guys know any way I can skip this entirely (as in jump to M99) if in the G110 it calculated that all parts are to be skipped.
I know I can just add 2 more lines to make it work, for example (in green):
But this would defeat my idea of making this as simple as possible by adding 2 more lines.
I was thinking about some fanuc option that would make me able to for example on the G110 (O9015) that could execute code on his parent program (O8050) that way I could just jump to the line I wanted from the G110 and could even remove the GOTO#130 and make it even more simple, or something that could make it able to end the program that was called before it, or some other option.
If you guys can think of something please let me know.
Thank you in advance for any help!
Best Regards
I've created some programs to machine parts using Fanuc Macro sub-program calls and some Custom G-Code Calls to machine each part (with the ability to skip some ro allparts etc...)
Here's a sample sub-program os a machining operation (the principle is that it repeats itself once for each part):
Code:
% O8050 (MACHINING OPERATION SUB-PROGRAM)
N110
G110 T#20 H#11 (Call to sub-program O9015)
Z-#26
G130
GOTO#130
N130
M99%
The G110 is a custom G-Code that will call a subprogram that handles tool calls, origines, etc.. and the G130 will set the next part to be machined and will either jump back to N110 to machine the next part or to N130 if it has machined all the parts.
The question I have is if you guys know any way I can skip this entirely (as in jump to M99) if in the G110 it calculated that all parts are to be skipped.
I know I can just add 2 more lines to make it work, for example (in green):
Code:
% O8050 (MACHINING OPERATION SUB-PROGRAM)
N110
G110 T#20 H#11 (Call to sub-program O9015)
GOTO#110
N110
Z-#26
G130
GOTO#130
N130
M99%
But this would defeat my idea of making this as simple as possible by adding 2 more lines.
I was thinking about some fanuc option that would make me able to for example on the G110 (O9015) that could execute code on his parent program (O8050) that way I could just jump to the line I wanted from the G110 and could even remove the GOTO#130 and make it even more simple, or something that could make it able to end the program that was called before it, or some other option.
If you guys can think of something please let me know.
Thank you in advance for any help!
Best Regards