Remember loaded tool in ATC at startup / shutdown

Results 1 to 15 of 15

Thread: Remember loaded tool in ATC at startup / shutdown

  1. #1
    Member
    Join Date
    Apr 2010
    Location
    Germany
    Posts
    1
    Downloads
    0
    Uploads
    0

    Default 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

    Similar Threads:


  2. #2

    Default Re: Remember loaded tool in ATC at startup / shutdown

    "Parameters.txt"

    Last edited by SkiPatrol; 07-25-2019 at 06:56 AM.


  3. #3
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1310
    Downloads
    0
    Uploads
    0

    Default 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.



    Last edited by PlanetCNC; 07-25-2019 at 04:47 AM.


  4. #4
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1310
    Downloads
    0
    Uploads
    0

    Default 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
    Member Clyde_IT's Avatar
    Join Date
    Nov 2021
    Posts
    35
    Downloads
    0
    Uploads
    0

    Default 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
    Member awpross's Avatar
    Join Date
    Jan 2022
    Posts
    107
    Downloads
    0
    Uploads
    0

    Default 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
    Member Clyde_IT's Avatar
    Join Date
    Nov 2021
    Posts
    35
    Downloads
    0
    Uploads
    0

    Default 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
    Member awpross's Avatar
    Join Date
    Jan 2022
    Posts
    107
    Downloads
    0
    Uploads
    0

    Default 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
    Member Clyde_IT's Avatar
    Join Date
    Nov 2021
    Posts
    35
    Downloads
    0
    Uploads
    0

    Default Re: Remember loaded tool in ATC at startup / shutdown

    ok!
    Thank's for your perfect explain.



  10. #10

    Default 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
    Member maki's Avatar
    Join Date
    Feb 2011
    Location
    Slowenia
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default 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
    Member awpross's Avatar
    Join Date
    Jan 2022
    Posts
    107
    Downloads
    0
    Uploads
    0

    Default 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
    Member PlanetCNC's Avatar
    Join Date
    Mar 2017
    Location
    Slovenia
    Posts
    1310
    Downloads
    0
    Uploads
    0

    Default 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
    Member maki's Avatar
    Join Date
    Feb 2011
    Location
    Slowenia
    Posts
    138
    Downloads
    0
    Uploads
    0

    Default 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

    Default 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.



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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Remember loaded tool in ATC at startup / shutdown

Remember loaded tool in ATC at startup / shutdown