Can anyone help with editing the std Fanuc gpp file. I notice that the tool change does not pre-select the next tool. There are parameters for
Next_Tool_Type but what format do you need to have this in to make it work?
Can anyone help with editing the std Fanuc gpp file. I notice that the tool change does not pre-select the next tool. There are parameters for
Next_Tool_Type but what format do you need to have this in to make it work?
It all depends where you want the next tool call to appear. For instance, if you want the tool call to be in the same line as the first rapid move then you have to add {"T"next_tool"} to the code in @rapid. However, if you do that as it stands you will get the call on every rapid line - not what you want I imagine. So you have to make it conditional asnd that involves setting up some global variables, setting them at tool change and clearing them after the first rapid move.
Download the GPP users manual from the SolidCAM website, you will find it invaluable.
Happy Christmas
Bob
Bob
Thanks for the reply and a happy New Year to you. The example of a global variable is not very clear to me in the help files. Is it stated at the top of the file? And if so what is the correct format.
And a Happy new year to you too. Right, global variables are declared at the top of the GPP file like so
@init_post
;Declare variables
global logical first_rapid
global .....
The manual covers it in the Variables chapter.
From memory, what you want is to (a) create a global logical (boolean) variable called "first_rapid" or some such. (b) set this variable to true at the end of @change_tool (c) add to @rapid_move the calls that you want with
if first_rapid eq true
{"T" next_tool}
endif
Then (d) at the end of @rapid_move set first_rapid to false.
The above should then add a tool call to the first rapid move after tool change. You might find that some of this is already there if your post calls an M3 in the first rapid move.
All the best
Bob
I've come up with a solution for next tool call. After the line
{nb, 'M6 T'tool_number} add {nb, 'T'next_tool_number} this seems to work okay except for programs with only 1 tool as it calls the the selected tool as the next tool.
ie:
M6 T1
T1
Is it possible to use logic in this line such as if 'T'next_tool_number does not equal T'tool_number 'T'next_tool_number. I can see you can use the symbol =
but I cannot see a method of stating not equal
That looks good. I must confess my Fanuc post processors date back to SolidCAM R10 and some of the variables now present in the CAM output weren't available then.
"Not Equal" can be expressed in two ways either "ne" or the mathmatical "<>" as shown thus
if next_tool_number ne tool_number
or
if next_tool_number <> tool_number
There is also the NOT logical operator, but I haven't used that one very much and therefore I am not confident in its correct usage.
You are on the right track
I have added the following to my post to get this working
if tool_number ne next_tool_number then
{nb,'T'next_tool_number,' ( Next Tool )'}
endif
Regards
Jake T-B