547,579 active members*
2,501 visitors online*
Register for free
Login
IndustryArena Forum > General Manufacturing Processes > Milling > Adding to wear offset in "Z" Fanuc MXP200
Results 1 to 1 of 1
  1. #1
    Member
    Join Date
    Sep 2021
    Posts
    3

    Adding to wear offset in "Z" Fanuc MXP200

    Anyone know the CNC code to automatically run a short program about 20 times and add .002 to the "Z" wear offset each time?

    It is a Fanuc MXP200 control on a YCM M66 mill. I dont want a long program, I'm looking for a sort of loop code.
    Back in the day it used to be a DO/OP 1,20 with IF then GOTO statements. Is there a canned cycle that will do this?
    I program manually in G and M code. I have no software package. Any help is welcomed.

  2. #2
    Registered
    Join Date
    Feb 2011
    Posts
    350

    Re: Adding to wear offset in "Z" Fanuc MXP200

    as long as you have macro capabilities

    #2001-#2064 are the wear offsets for fanuc
    at the end of the program write a simple addition to the wear offset #2001=[#2001-.002] if you are changing parts and going deeper with a tool run program 20 times and reset the wear offset back to 0

    by changing the tool wear offset for each part the math will need to be done before the tool offset is called. After the tool call it would not take effect until the next tool call IE run the part then the next part will be .002 smaller

    #2001=[#2001-.002]
    G43H1Z1.000


    if you are looking to repeat machining with the tool dropping by .002 (same part/tool) a while/do might work

    #100=0(Z start depth)
    #101=.002(depth of cut)
    #103=0(start of counter)
    #104=20(number of passes)

    WHILE[#103 LT #104]DO1
    X/Y (POSITION)
    G0Z#100
    (MACHINE PART)
    G0Z1.000(CLEARANCE IN THE Z AXIS)
    #100=#100+#101
    #103=[#103+1]
    END1

  3. #3
    Member
    Join Date
    Sep 2021
    Posts
    3

    Re: Adding to wear offset in "Z" Fanuc MXP200

    Thanks Much rcs60, the second example I think is closer to what I need. Instead of standing in front of the machine for 20, 1 minute programs and adding .002 to the wear each time, I can let it run for 20 minutes on its own, with the controller adding to the offset after each program cycle. What exactly is the function of the D01 and the END1? I end my programs with a M30.will that still be used? does it go after the END1?

  4. #4
    Registered
    Join Date
    Feb 2011
    Posts
    350

    Re: Adding to wear offset in "Z" Fanuc MXP200

    WHILE statements make it easy to automate repetition:

    WHILE [conditional expression is true] DOm (m = 1, 2, or 3)

    (one or more lines of g-code to repeat)

    ENDm (m = the same value as the DO’s m)

    WHILE uses a Conditional Expression just like IF, and it is subject to the same rules. In WHILE, the Conditional Expression will case the g-code blocks between the DO and END to be executed over and over while checking the Conditional Expression. So long as it is true, the WHILE loop will execute again. Once it turns false, execution skips the blocks between DO and END and goes directly to the block following the END.

Posting Permissions

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