586,655 active members*
2,426 visitors online*
Register for free
Login
Results 1 to 7 of 7
  1. #1
    Join Date
    May 2008
    Posts
    26

    Editing FANUC GPP File

    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?

  2. #2
    Join Date
    Oct 2007
    Posts
    499
    Quote Originally Posted by almo0797 View Post
    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

  3. #3
    Join Date
    May 2008
    Posts
    26

    Fanuc PP

    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.

  4. #4
    Join Date
    Oct 2007
    Posts
    499
    Quote Originally Posted by almo0797 View Post
    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

  5. #5
    Join Date
    May 2008
    Posts
    26

    Next Tool Call

    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

  6. #6
    Join Date
    Oct 2007
    Posts
    499
    Quote Originally Posted by almo0797 View Post
    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.

  7. #7
    Join Date
    Oct 2004
    Posts
    48
    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

Similar Threads

  1. Need file Fanuc 18Mc Nc-basic
    By Selimsalim in forum Fanuc
    Replies: 28
    Last Post: 10-08-2023, 09:50 AM
  2. EDITING WITH FANUC LADDER III
    By CHAD LAWSON in forum Fanuc
    Replies: 2
    Last Post: 01-30-2009, 01:36 PM
  3. SAVE FANUC 21i NC FILE TO CARD READER
    By Bigbill in forum Fanuc
    Replies: 3
    Last Post: 02-01-2008, 09:05 PM
  4. file retrieval on fanuc control
    By Bigbill in forum Daewoo/Doosan
    Replies: 5
    Last Post: 11-01-2006, 10:19 PM
  5. Fanuc ladder editing card
    By bob1371 in forum Fanuc
    Replies: 1
    Last Post: 04-10-2006, 04:50 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •