I'm working on a milling with Fanuc controller.
I'm trying to adjust the tool change command with the GOTO condition but I don't know how it work.
Here's what my program look like :
The thing here is : IF the tool number (10) actually in the spindle (#994 = 10 variable) is EQual to 10, GOTO (I would like to next M1 at line N20)
The reason why is like that is, Fanuc give me an alarm if the tool is called (T10, M6) while he his already in the spindle so that's why I want a GOTO to next M1 if the tool is already in spindle to skip tool change.
So my question is : how can I complete the GOTO condition that it will automatically calculate to jump 3 lines lower or going to next M1 (like GOTO N+3..... GOTO next M1) cause right now I'm adding the line number manually each time my program is posted.
you can do this in several ways. the best way is to write a tool change macro so when M6 is read it will run a macro program
that checks to see if the tool is in the spindle. variable #4120 will have the last the value of T read in the program:
doing it this way you won't have to edit your program. if parameter 6080 has a value in it already, you can use 6081-6089 which
will call O9021-O9029 respectively
Thanks for the correction, I haven't tried it in a Fanuc control until testing it out this morning.
The statement doesn't alarm out in a Haas control. My second example will work fine for the OP
Not sure what O9050 program does. I'm also assuming that #994 holds the current spindle tool as per your program example. your tool change macro saves the tool called in #990.
Yes, #994 holds the current spindle tool and the macro saves the tool called in #990.
The fact is i can't really change or play with thoses tool change Macro in here in the company
We bought BobCAD CAM for simple 3-4 axis part recently and i was trying to adjust the Fanuc post tool change code to work like it work here in our programming department who's pgrogramming with Catia V5. Catia post generated the code line i want BobCAD to do.
.
If i take a Catia program, at each tool change, their post automatically generate the GOTO (line number) to jump to next M1 three lines lower to skip the automatic tool probing line.
The only place in the BobCAD post that i'm stuck with is that GOTO line generated
Maybe is more simple if i show you guys the BobCAD post
n, spindle_off
n,"M1"
n,work_coord,
"(TOOL #", list_tool_number, " " , tool_label, ")"
n,"M5"
n,"M1"
n,work_coord, "IF[#"994""force_no_add_spaces"EQ"force_no_add_spaces, list_tool_number"]GOTO"
n,t
n,"M6"
n,"G65P9904Z8.A0W.003U0V0" (Tool probing)
n,"M1"
n,"G40"
n, work_coord
n, s, spindle_on
The programming dept. should want to modify the tool change macro because it will eliminate the workaround in the post and also work when you call up a tool in MDI. If they won't you try this in your post:
n, spindle_off
n,"M1"
n,work_coord,
"(TOOL #", list_tool_number, " " , tool_label, ")"
n,"M5"
n,"M1"
n,work_coord,
"IF[#"994""force_no_add_spaces"EQ"force_no_add_spaces, list_tool_number"]GOTO1"
n,t
n,"M6"
n,"G65P9904Z8.A0W.003U0V0" (Tool probing)
"N1M1"
n,"G40"
n, work_coord
n, s, spindle_on
your control should be able to run without sequence numbers and also be able to have duplicate ones also. the GOTO command will search forward in the program to the first N1 so it will work for all the tool changes.
if the tool change macro was changed it wouldn't affect the the way they're programming right now. They should at least try the change out to verify that it will work. just saying
I'm agree with you that the programming dept. should modify the tool change macro.
I will try to let them know and if it's possible to modify that macro :/
If they can't or they don't want....
You're GOTO1 with the N1 line is exactly what i had in mind for my Plan-B but i was not sure if the line search was always forward
I'll go with that option first and will try to work the post dept for their Fanuc tool change macro