585,602 active members*
3,484 visitors online*
Register for free
Login
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2008
    Posts
    15

    Tool length offset reduction macro (Sinumeric 840D)

    Hi,

    We are using abrasive nylon brush to clean parts on the machine after machining.
    We would require a macro of some sort to “shorten” the tool offset by 0.02mm every time program is run.
    We tried “L_39 (0,0)” to do this, but it only writes the given value to wear.

    Example: L_39 (-0.02,0) would write -0.02 in to “WEAR” section. If run again “WEAR” would stay the same -0.02, not -0.04.

    Also, which parameter is used for the minimum tool length?

    Example: If our tool is 150mm long, and minimum tool length can be 135mm.
    When -0.02 is applied enough times tool length would reach 135mm and then give an alarm or a warning of a tool being too short.

    Any help would be appreciated.

  2. #2
    Join Date
    Nov 2011
    Posts
    40
    Hi McMaster
    I think i can help you with what you need

    If i understood everything right it should go like this

    T10 D1
    M6
    G0 G90 G17 G94
    G54
    CYCLE800(1,"DMG",200000,57,0,0,0,0,0,0,0,0,0,1,,1)
    HEIGHT_CORR(-0.02) ;MACRO PROGRAM I WROTE
    ...
    ...

    Just make "HEIGHT_CORR.SPF" in user cycle directory on your machine and copy this below in it.
    Hope this helps

    PROC HEIGHT_CORR(REAL PAR1)
    DEF REAL PAR2
    PAR2=$P_TOOLNO
    $TC_DP3[PAR2,1]=$TC_DP3[PAR2,1]+PAR1

    IF $TC_DP3[PAR2,1]<=135 GOTOF ALARM1
    GOTOF END

    ALARM1:MSG("TOOL IS AT 135 MM LIMIT")
    STOPRE
    M00
    GOTOB ALARM1

    END:
    M17

  3. #3
    Join Date
    Feb 2024
    Posts
    0

    Re: Tool length offset reduction macro (Sinumeric 840D)

    ello everyone,

    I have a task at my new job that I need assistance with. Previously, I worked as a CNC CAM programmer, but I am facing a challenge because I lack experience in macro programming for the Sinumerik 840D. The requirement from our customer is to set a macro where the tool length is updated by about -0.005 or so, then return to the main program, execute it with the new length, and store the actual length of the tool after each execution. Additionally, there should be an option to set a minimum value for the tool. I would appreciate any ideas or suggestions you may have. Thank you.

Similar Threads

  1. tool length offset
    By ahmed4040 in forum Fanuc
    Replies: 16
    Last Post: 06-15-2010, 05:49 PM
  2. Tool length offset
    By vesene in forum Mazak, Mitsubishi, Mazatrol
    Replies: 0
    Last Post: 04-27-2010, 11:51 AM
  3. Sinumeric 840D - 7 segment LED
    By Cleverel in forum CNC (Mill / Lathe) Control Software (NC)
    Replies: 0
    Last Post: 06-25-2009, 12:45 PM
  4. Sinumeric Offset Value macro
    By sanjeevlj in forum Mastercam
    Replies: 3
    Last Post: 05-06-2009, 11:05 AM
  5. Tool Length offset?
    By cncuser1 in forum G-Code Programing
    Replies: 3
    Last Post: 08-31-2007, 02:59 AM

Posting Permissions

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