584,866 active members*
5,076 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > Fanuc > Automatic wear offset change macro
Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2022
    Posts
    3

    Automatic wear offset change macro

    Hello everybody, I running a lathe (fanuc 31i) with bar feeder. I undesrtand the basics but never wrote a macro before, because there was no need for it.

    I trying to figure out how to write a macro program for automatic wear offset change for finish tool after certain number of parts.
    From one bar I get 15 parts, the problem is that after part 9, the tolerance always changes for 0.02mm, because of bar vibrations.

    Example:

    Parts 1-9 dimesion is 30.00mm

    Parts 10-15 dimension is 29.98mm

    So would like to write a macro program which would add 0.02mm (X-axis) to finish tool wear offset after part 9.

    Till now I was using part counter and than manualy change wear after part 9.

    Program would look like this:

    T0101
    Rough turning

    T0202 (wear offset 0)
    Finish turning
    Run the turning cycle for 9-times

    Than automaticly add 0.02mm to T0202 wear offset
    And run the same cycle 6 more times.

    After that repeat the same proces again after bar change.

    How should I start? Maybe using part counter for each bar so when it comes to part 9 than it would add to wear offset, finish the bar till the end and than reset the part counter again for the next bar?

    I hope you guys understand what I trying to do

  2. #2
    Join Date
    Aug 2019
    Posts
    145

    Re: Automatic wear offset change macro

    The below is simply a reference. The variable number could vary based on what type and the number of offsets you have.
    I would also recommend using another variable to limit the number of loops that would be run.
    #5nn would be reset to 0 by the operator after a insert change. #5oo sets the number of parts to run between offset increments.
    Full testing should also be run prior to production release.

    Something like this can either be very simple or very involved depending on where you choose to take it.
    You could start with something like the below as a base;
    .
    .
    IF[#5nnLT#5oo]GOTOssss Note:nn and oo represents available macro variables. ssss represents an available line number
    T200
    #2002= #2002+.02
    T202
    #5nn=0
    Nssss
    .
    .
    #5nn=#5nn+1
    M30

  3. #3
    Join Date
    Nov 2007
    Posts
    351

    Re: Automatic wear offset change macro

    Run a batch of parts from first to last with new insert and from the data determine the complete wear added for the insert to remain in a stable condition ----No burrs or massive size changes ------------Take that number and take 20 percent off it for material and insert grade change and divide into the number of parts you made
    Total wear ------is 0.2 mm
    number of parts 300 for tool life counter
    80 percent of wear is .160
    Wear 0f .160/300 is .0005 per component
    Find the macro for that tool number wear direct and just add that value per componet
    But remeber when tool change comes up the number must return to start value or you compound an error
    I used to do this for a brake rotor machine macking thousands of components per week no inline guaguing and this method can help stabilize within CPK difficult products

Similar Threads

  1. Need Automatic Wear Offset
    By p8md in forum G-Code Programing
    Replies: 24
    Last Post: 10-22-2022, 03:43 AM
  2. Replies: 8
    Last Post: 11-06-2018, 02:18 AM
  3. X-Y offset in tool change? Macro?
    By StefanV in forum Mach Software (ArtSoft software)
    Replies: 1
    Last Post: 06-24-2012, 01:17 AM
  4. Tolls offset wear.
    By jdgromi in forum Fanuc
    Replies: 13
    Last Post: 04-23-2009, 01:16 PM
  5. wear offset missing
    By mcash3000 in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 4
    Last Post: 03-20-2009, 05:35 PM

Tags for this Thread

Posting Permissions

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