584,866 active members*
4,982 visitors online*
Register for free
Login
IndustryArena Forum > Machine Controllers Software and Solutions > PlanetCNC > Remember loaded tool in ATC at startup / shutdown
Results 1 to 15 of 15
  1. #1
    Join Date
    Apr 2010
    Posts
    1

    Remember loaded tool in ATC at startup / shutdown

    Hello,

    I'm running a CNC mill with a rotary ATC with PlanetCNC TNG. Technically tool change works fine, but I'm struggling a bit to establish a reliable workflow for everyday usage. PlanetCNC doesn't remember the currently loaded tool when I switch off the machine and turn it on again next day. So when I turn on PlanetCNC I have at first to "select" the tool that is already loaded, which I find quite prone to human error.

    My idea was therefore to unload the tool always before I turn off the machine, but actually I couldn't yet find a function for unloading a tool. I could probably add some kind of "empty tool" to the tool table, but this will probably result in unnecessary movements of the ATC.

    Maybe I'm just blind and there is some easy solution already? Or a way to make PlanetCNC remember the loaded tool after shutdown?

    Regards

  2. #2
    Join Date
    May 2019
    Posts
    28

    Re: Remember loaded tool in ATC at startup / shutdown

    "Parameters.txt"

  3. #3
    Join Date
    Mar 2017
    Posts
    1295

    Re: Remember loaded tool in ATC at startup / shutdown

    You can unload tool using T0M6 command or, if you are not using ATC simply use M61Q0. Make sure your ATC script understands that T0 is "special".

    In TNG it is possible to have persistent parameters. Open file "Parameters.txt" located in profile folder. There are some parameters already there. Then add your custom parameter, for example "_mytool 0". Note that name starts with underscore because you want this parameter to be global. There is single space between name and value.

    Now you can use this parameter in home script. Somewhere near beginning you can add:
    o<tool> if [#<_current_tool> EQ 0]
    M61 Q#<
    _mytool>
    o<tool> endif
    And perhaps also add a message informing user that M61 selected different tool.
    Homing script now loads last stored tool.

    In M6 script, after M6 gcode add line:
    #<_mytool> = #<_current_tool>
    This way custom parameter has correct value. And because it is listed in "Parametes.txt" file its value will persist.


  4. #4
    Join Date
    Mar 2017
    Posts
    1295

    Re: Remember loaded tool in ATC at startup / shutdown

    In TNG v2 this is done without any script modifications. Just add "_current_tool" parameter to "Parameters.txt" file and last tool will be remembered.

  5. #5
    Join Date
    Nov 2021
    Posts
    35

    Re: Remember loaded tool in ATC at startup / shutdown

    I only must write "_current_tool" in Parameters file? No need script or add some parameters after "_current_tool" line?

  6. #6
    Join Date
    Jan 2022
    Posts
    107

    Re: Remember loaded tool in ATC at startup / shutdown

    i suggest adding more than just _current_tool
    Look for the parameters for current tools offset and add those as well.

    Otherwise it is likely that your tool is remembered, but the tool offset is zero.

    For explanation: all parameters who are added to parameters.txt are stored at shutdown and reloaded at startup. This works also for self created parameters which starts with an underscore _

    Do not modify the parameters.txt while tng is running. Otherwise your modificatuons will be overwritten during shutdown.

  7. #7
    Join Date
    Nov 2021
    Posts
    35

    Re: Remember loaded tool in ATC at startup / shutdown

    Very thank's (more of all for your final suggest! I don't understand because don't modify the file).
    I've tried and now memorize current tool. Can you help me for the offset parameters add? (Don't take it from tool table with G43?)
    Thank's again

  8. #8
    Join Date
    Jan 2022
    Posts
    107

    Re: Remember loaded tool in ATC at startup / shutdown

    You may load tool offset with G43, but if you add _current_tool to Parameters.txt, it will remember the tool after restart, but you will require G43 to load the tool offset because this would not be remembered.

    To bypass this, you can add the following lines to parameters.txt
    _current_tool
    _tooloff
    _tooloff_x
    _tooloff_y
    _tooloff_z
    _tooloff_a
    _tooloff_b
    _tooloff_c
    _tooloff_u
    _tooloff_v
    _tooloff_w


    This will also remember the last used tool offset. Regardless if it was loaded from tool table or somewhere else.
    So you will be in safe condition that tool and the correct offset is remembered during app restart and you can safely continue without potential missing offset values.

    For explanation:
    _current_tool remembers only the tool number but not offset
    _tooloff remembers if tool offset was used or not
    _tooloff_x remembers the tool offset X-Axis and of course the others are for the other axes.

  9. #9
    Join Date
    Nov 2021
    Posts
    35

    Re: Remember loaded tool in ATC at startup / shutdown

    ok!
    Thank's for your perfect explain.

  10. #10
    Join Date
    Jan 2022
    Posts
    13

    Re: Remember loaded tool in ATC at startup / shutdown

    Hi
    This would be the really useful solution to one of my problems and I thought it would be easy!

    I imagine it is me being stupid but if I try to save Parameters.txt I get a message saying I don't have permission to open the file and it won't let me save the modified version, I am not running TNG, can anyone help please?

  11. #11
    Join Date
    Feb 2011
    Posts
    138

    Re: Remember loaded tool in ATC at startup / shutdown

    copy file somwere to hdd, make changes, copy that file to origin. Make shure that you have admin privileges. Works with all files in "C" Program Files etc...

  12. #12
    Join Date
    Jan 2022
    Posts
    107

    Re: Remember loaded tool in ATC at startup / shutdown

    As regular user, u do not have permission to change files in program files folder. Thats why tng always requests admin rights at startup.

    So you have the option to add your user account to have read write permission to the folder in windows.

    Or you can open your Texteditor by rightclick -> "run as admin" and then open the parameters.txt from there.

    Or you can safe the parameters.txt to your desktop and then dragn'drop it to the profiles folder. In that case it will request admin rights and overwrites the file.

    Or you can use Notepad++ or visual code which will ask for admin rights if required.

  13. #13
    Join Date
    Mar 2017
    Posts
    1295

    Re: Remember loaded tool in ATC at startup / shutdown

    Or you can copy whole TNG installation folder somewhere else, where you have permissions.

  14. #14
    Join Date
    Feb 2011
    Posts
    138

    Re: Remember loaded tool in ATC at startup / shutdown

    Quote Originally Posted by awpross View Post
    Or you can safe the parameters.txt to your desktop and then dragn'drop it to the profiles folder. In that case it will request admin rights and overwrites the file.
    That will be a good solution if you want to change a few files, bether is to create a folder and put them there (where you have a ful acess). Pc will always ask for permision when copy something in Programs folder, just owerwrite file.

    What Andrej (PlanetCNC) sugest is evan bether option when you want more detailed costumization of many files.

  15. #15
    Join Date
    Jan 2022
    Posts
    13

    Re: Remember loaded tool in ATC at startup / shutdown

    Thanks folks lots of useful information,
    I thought I might have done something stupid in my setup but the protection of files is intentional.

Similar Threads

  1. Spring Loaded Engraving Tool
    By MFchief in forum Tormach Personal CNC Mill
    Replies: 17
    Last Post: 12-06-2018, 05:08 PM
  2. Replies: 11
    Last Post: 07-20-2017, 11:42 PM
  3. Proper Startup/Shutdown Procedure for Kflop
    By MadTooler in forum Dynomotion/Kflop/Kanalog
    Replies: 1
    Last Post: 07-11-2016, 07:55 PM
  4. Spring loaded pen plotter tool
    By Joe2014 in forum Uncategorised WoodWorking Machines
    Replies: 0
    Last Post: 03-01-2016, 07:36 PM
  5. Spring Loaded Engraving Tool
    By djh82uk in forum MetalWork Discussion
    Replies: 7
    Last Post: 01-11-2008, 05:35 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
  •