Results 1 to 10 of 10

Thread: Help with mods to this Automatic Manual Tool Changer

  1. #1
    Registered kregan's Avatar
    Join Date
    Mar 2011
    Location
    USA
    Posts
    505
    Downloads
    0
    Uploads
    0

    Help with mods to this Automatic Manual Tool Changer

    Hi all,

    Over the weekend I found and installed this script to work as a semi automatic tool changer
    for use with the Tormach style tools in my small mill.

    I would like some help on updating this to work with the UserDRO's in the offset's page
    under "tool change location".

    I am not sure how to do this?


    Here is the existing script that was written for Mach2:

    -------------------------------------------------

    The M6Start.m1s file should contain the following

    SafeZ=GetSafeZ() 'Load Safe Z Value
    Code"G53 G00 Z" & SafeZ 'Goto the safe Z Location
    Code"M99999" 'Call Macro M99999

    Then make a new file called M99999.m1s with the following:

    tool=GetSelectedTool() 'Load the tool number
    SetCurrentTool(tool) 'Set the tool
    Code "g43 H" & tool 'Set the height

    Complete=Question ("Change to tool number" & tool

    ---------------------------------------------------

    Possible new script...

    M6Start.m1s file:

    x = GetUserDRO( 1200 )
    y = GetUserDRO( 1201 )
    z = GetUserDRO( 1202 )

    Code' G53G0 Z' & Z
    Code' G53G0 X' & x & 'Y' & y
    Code"M99999" 'Call Macro M99999


    M99999.m1s file:

    tool=GetSelectedTool() 'Load the tool number
    SetCurrentTool(tool) 'Set the tool
    Code "g43 H" & tool 'Set the height

    Complete=Question ("Change to tool number" & tool

    ------------------------------------------------------

    I don't know what to add to rapid back to the starting location?

    Totaly new to scripts so don't laugh to hard if it is way off.


  2. #2
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,295
    Downloads
    0
    Uploads
    0
    I do it something like this. I'm not moving back to the previous Z position, but you can see how to do it.

    Also, I don't see the purpose of this line, and it appears to be missing a ).
    Complete=Question ("Change to tool number" & tool

    Try this. I actually store the tool change position in variables, as I use M6 End to retrieve the position and move there.

    SetVar(1, GetOEMDRO(800))
    SetVar(2, GetOEMDRO(801))
    SetVar(3, GetOEMDRO(802))
    TCX=GetOEMDRO(1200)
    TCY=GetOEMDRO(1201)
    TCZ=GetOEMDRO(1202)


    Code "G53 G0 Z " & TCZ
    While IsMoving
    Wend
    Code "G53 G0 X" & TCX & "Y" & TCY
    While IsMoving
    Wend
    Code "M99999"
    While IsMoving
    Wend

    Code "G0 X" & GetVar(1) & " Y" & GetVar(2) ' Move to Previous XY Position prior to M6 being called

    While IsMoving()
    Wend
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  3. #3
    Registered kregan's Avatar
    Join Date
    Mar 2011
    Location
    USA
    Posts
    505
    Downloads
    0
    Uploads
    0
    Gerry,

    That is awesome! Thank you!
    I tried it out briefly tonight just moving in air and it seems to work perfectly.

    One issue I get is a limit switch warning but I think that is due to the fact that this is a round column machine with the quil driven for the Z axis. I only have 4"
    of travel and HOME shares the limit switch and it is all set very close.

    I will do some test cutting and report back.



  4. #4
    Registered kregan's Avatar
    Join Date
    Mar 2011
    Location
    USA
    Posts
    505
    Downloads
    0
    Uploads
    0
    That was my typo...
    The change tool number message appears in a box on the screen when a tool change is called for. It has another box next to it that requires me to type in the tool number I inserted into the machine and hit enter...



    Quote Originally Posted by ger21 View Post
    I do it something like this. I'm not moving back to the previous Z position, but you can see how to do it.

    Also, I don't see the purpose of this line, and it appears to be missing a ).
    Complete=Question ("Change to tool number" & tool


  • #5
    Registered kregan's Avatar
    Join Date
    Mar 2011
    Location
    USA
    Posts
    505
    Downloads
    0
    Uploads
    0
    I ran a bunch of parts today and the script worked perfectly.

    Thank you again!


  • #6
    Registered kregan's Avatar
    Join Date
    Mar 2011
    Location
    USA
    Posts
    505
    Downloads
    0
    Uploads
    0
    I know this is an old thread of mine but I have a question.

    My new square column machine has more Z travel then my old round column and often my tool change position is a lot higher so it can take a while for the Z to move down into position.

    If I want the machine to rapid back to the previous Z position do I change the code from this:

    Code "G0 X" & GetVar(1) & " Y" & GetVar(2) ' Move to Previous XY Position prior to M6 being called

    to this:

    Code "G0 X" & GetVar(1) & " Y" & GetVar(2) & "Z" & GetVar(3) ' Move to Previous XYZ Position prior to M6 being called

    Thank you for the help.



    Quote Originally Posted by ger21 View Post
    I do it something like this. I'm not moving back to the previous Z position, but you can see how to do it.

    Also, I don't see the purpose of this line, and it appears to be missing a ).
    Complete=Question ("Change to tool number" & tool

    Try this. I actually store the tool change position in variables, as I use M6 End to retrieve the position and move there.

    SetVar(1, GetOEMDRO(800))
    SetVar(2, GetOEMDRO(801))
    SetVar(3, GetOEMDRO(802))
    TCX=GetOEMDRO(1200)
    TCY=GetOEMDRO(1201)
    TCZ=GetOEMDRO(1202)


    Code "G53 G0 Z " & TCZ
    While IsMoving
    Wend
    Code "G53 G0 X" & TCX & "Y" & TCY
    While IsMoving
    Wend
    Code "M99999"
    While IsMoving
    Wend

    Code "G0 X" & GetVar(1) & " Y" & GetVar(2) ' Move to Previous XY Position prior to M6 being called

    While IsMoving()
    Wend
    Kelly
    Web: http://www.cnceffects.com


  • #7
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,295
    Downloads
    0
    Uploads
    0
    Yes, but sometimes it's safer to move the X and Y first, and then move the Z down.
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • #8
    Registered kregan's Avatar
    Join Date
    Mar 2011
    Location
    USA
    Posts
    505
    Downloads
    0
    Uploads
    0
    Yes I would like to move X Y and then Z...
    I am really clueless with the scrips so how would I do that?

    Thank you.


    Quote Originally Posted by ger21 View Post
    Yes, but sometimes it's safer to move the X and Y first, and then move the Z down.
    Kelly
    Web: http://www.cnceffects.com


  • #9
    Community Moderator ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Twp, MI....USA
    Posts
    22,295
    Downloads
    0
    Uploads
    0
    Code "G0 X" & GetVar(1) & " Y" & GetVar(2) ' Move to Previous XY Position prior to M6 being called

    Code "G0 Z" & GetVar(3) ' Move to Previous Z Position prior to M6 being called
    Gerry

    Mach3 2010 Screenset
    http://home.comcast.net/~cncwoodworker/2010.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)


  • #10
    Registered kregan's Avatar
    Join Date
    Mar 2011
    Location
    USA
    Posts
    505
    Downloads
    0
    Uploads
    0
    Thank you very much for the quick help. I will test this out
    and report back when I can.


    Quote Originally Posted by ger21 View Post
    Code "G0 X" & GetVar(1) & " Y" & GetVar(2) ' Move to Previous XY Position prior to M6 being called

    Code "G0 Z" & GetVar(3) ' Move to Previous Z Position prior to M6 being called
    Kelly
    Web: http://www.cnceffects.com


  • Similar Threads

    1. Need Help! - Automatic Tool Changer
      By mattjames in forum Machine Problems, Solutions , Wireless DNC, serial port
      Replies: 2
      Last Post: 08-16-2009, 11:51 PM
    2. X2 automatic tool changer
      By X2cnc in forum Benchtop Machines
      Replies: 44
      Last Post: 07-27-2008, 07:11 AM
    3. Automatic Tool Changer
      By Rockwall in forum Tormach Personal CNC Mill
      Replies: 45
      Last Post: 04-21-2008, 06:34 PM
    4. Automatic Tool Changer
      By spalm in forum DIY CNC Router Table Machines
      Replies: 4
      Last Post: 07-10-2007, 08:49 PM
    5. Automatic Tool Changer
      By Chivo in forum Mechanical Calculations/Engineering Design
      Replies: 5
      Last Post: 03-19-2007, 07:57 PM

    Posting Permissions


     


    About CNCzone.com

      We are the largest and most active discussion forum from DIY CNC Machines to the Cad/Cam software to run them. The site is 100% free to join and use, so join today!

    Follow us on

    Facebook Dribbble RSS Feed


    Search Engine Friendly URLs by vBSEO ©2011, Crawlability, Inc.