603,850 active members*
4,476 visitors online*
Register for free
Login
Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2021
    Posts
    13

    Question tool change code

    I'm using the current version of TNGV2 (08/27/2024) I'm changing tools but the current tool doesn't appear as usual. Here's an example

    obviously she did something in the settings and I'm wondering which "code" needs to be used.

    Thank you Markus
    Attached Thumbnails Attached Thumbnails IMG_0892.jpg  

  2. #2
    Join Date
    Nov 2015
    Posts
    280

    Re: tool change code

    T(toolnumber)M6
    exampel: T50M6 or M6T50

  3. #3
    Join Date
    Jul 2021
    Posts
    13

    Re: tool change code

    thanks and where do I save this and where should the file go then?
    The problem is that he forgets that he has loaded a tool.

  4. #4
    Join Date
    Aug 2020
    Posts
    168

    Re: tool change code

    There seems to be an issue in the M06 script.
    It seems that the line break is not working as intended.
    Changing Line 83 from
    (msg,Change tool:\ #<_current_tool,0>: #<_current_toolname>\to\ #<_selected_tool,0>: #<_selected_toolname>)
    to
    (msg,Change tool: #<_current_tool,0>: #<_current_toolname> to #<_selected_tool,0>: #<_selected_toolname>)
    fixes the issue for me.
    Seems the \ is somehow preventing the correct interpretation of the following variable in the first instance. From my understanding it should only add a line break but it seems that its working as an escape character in this case.

    @PlanetCNC please have a look, looks like a bug somewhere in the code, or at last like a unexpected behavior.
    can be easily reproduced in the MDI as well.
    Swtiching to Tool 1 with T1M06
    Preload tool 2 with
    T2

    (print,Change tool:\ #<_current_tool,0>: #<_current_toolname>\to\ #<_selected_tool,0>: #<_selected_toolname>)
    in mdi gives the following output:
    Change tool:\ #<_current_tool,0>: #<_current_toolname>\to\ 2: tool 2

    Best Regards,
    Klaus

  5. #5
    Join Date
    Feb 2011
    Posts
    154

    Re: tool change code

    Hi ScorpionTDL, I have the same error and your fixes is superb, but there must be another sintax error in script.
    When I first time run new G-code and tool is "0" and script starts come out that screen, then actualy works fine just dialog is somehow wrong...Attachment 510608

  6. #6
    Join Date
    Aug 2020
    Posts
    168

    Re: tool change code

    yea there is a bug in planetcnc
    They messed up the behavior of
    \
    intially this was used to indicate a linebreak in a dialog. They now also use this as a Excape caracter for certain stuff. Which breaks the line break behaviro.
    So have a look at any message boces, they all start with
    (msg,
    an remove any \ in the following string.
    In the stock m06 files yous is most likely in Line 81

  7. #7
    Join Date
    Feb 2011
    Posts
    154

    Re: tool change code

    Thank you, solved

  8. #8
    Join Date
    Mar 2017
    Posts
    1495

    Re: tool change code

    I will change this \ behavior again in next version. Sorry for all inconvenience but I want to mage it right.

  9. #9
    Join Date
    Feb 2011
    Posts
    154

    Re: tool change code

    today I was trying to mill some xps as part of prototyping stuf, couldnt make that because strange thing happend. For that purpose I have a loong tool ( 120mm/6mm) and couldnt get the Z axes valuwe wright - it always goes in to table (z0) instead start with first of 6 layers.
    Strange is because I was changing with standard lenght tool ( 58mm/6mm) and start properly! Same file, same position, etc. Where is the problem?

    That was happend with old version from '24, then upgraded to last one and problem persists...

    anny help will do,
    Regards

Similar Threads

  1. tool change code
    By deadlykitten in forum Okuma
    Replies: 14
    Last Post: 03-08-2025, 03:59 AM
  2. TOOL CHANGE G-CODE
    By tdoz in forum G-Code Programing
    Replies: 1
    Last Post: 01-18-2016, 03:17 PM
  3. Replies: 1
    Last Post: 02-21-2012, 09:58 AM
  4. How to fix tool in Random Tool Change using Code?
    By CholPeter in forum G-Code Programing
    Replies: 1
    Last Post: 07-05-2011, 07:40 PM
  5. tool change code
    By danimal24 in forum Fagor Automation
    Replies: 2
    Last Post: 07-17-2010, 03:14 AM

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
  •