. .

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. Is it really as simple as doing this?

    C:\Mach3\macros\Mach3Mill\M6Start.m1s
    Code:
      code "G53 Z0"
      code "G53 X1000 Y500"
      tool = GetSelectedTool()
      SetCurrentTool( tool )
    "If first you don't succeed, redefine success"

  2. #2
    Yes, that works. Although be careful where you have the absolute zero position for Z set. If you're not zeroing the Z with a home switch then that position could be anywhere, so I'd be inclined to use G0 instead of G53 in that line and put a suitable clearance, say code "G0 Z10" (depending on how much Z-travel you have). The other method is more robust iff you have a home switch on Z.

  3. #3
    Quote Originally Posted by Mad Professor View Post
    Is it really as simple as doing this?

    C:\Mach3\macros\Mach3Mill\M6Start.m1s
    Code:
      code "G53 Z0"
      code "G53 X1000 Y500"
      tool = GetSelectedTool()
      SetCurrentTool( tool )
    I think this makes more sense where you can set the G28 tool change position in homing and limits. G28 is always machine position, not offset position.

    Code:
    Code "m5"
    Code "g28"
    Code "m1"
    tool = GetSelectedTool()
    SetCurrentTool( tool )
    Its seems to be pretty simple. Sorry if I dredged up an old thread, but this one got me on the right track, and I thought I had something to add for future solutions.

  4. #4
    Here was my final solution:

    Code:
    code "m9"
    code "m5"
    code "g28"
    tool = GetSelectedTool()
    SetCurrentTool(tool)
    code "g43 h" & tool
    code "m1"
    It does what I want for a fast easy tool change finally.

    It stops the spindle and the coolant pump, goes to a safe tool change location, retrieves the T(x) value, and stores it in the variable "tool". (Tool 1, Tool 2, etc) Then it performs the Gcode G43 H(x) to set the tool offset. All that's left is for me to swap to the correct tool and press start.

    There are still a few things I would like to figure out how to do. For one thing I never really found a good resource for the values, commands, language structure, etc for Mach 3 macros. I just pieced them together from bits and pieces found here and there. Another thing I would like to do is figure out how to "park" the machine at the end of a program. Basically raise the spindle to safe Z, center the table, and move it forward to make part removal faster and easier when a program completes. Maybe I'll add a park button to my program screen. I ran across references to that while I was researching M6 macros. Executing a macro from a screen button. Well, that is a task for another day.

  5. #5
    Quote Originally Posted by bob la londe View Post
    Here was my final solution:

    Code:
    code "m9"
    code "m5"
    code "g28"
    tool = GetSelectedTool()
    SetCurrentTool(tool)
    code "g43 h" & tool
    code "m1"
    It does what I want for a fast easy tool change finally.

    It stops the spindle and the coolant pump, goes to a safe tool change location, retrieves the T(x) value, and stores it in the variable "tool". (Tool 1, Tool 2, etc) Then it performs the Gcode G43 H(x) to set the tool offset. All that's left is for me to swap to the correct tool and press start.

    There are still a few things I would like to figure out how to do. For one thing I never really found a good resource for the values, commands, language structure, etc for Mach 3 macros. I just pieced them together from bits and pieces found here and there. Another thing I would like to do is figure out how to "park" the machine at the end of a program. Basically raise the spindle to safe Z, center the table, and move it forward to make part removal faster and easier when a program completes. Maybe I'll add a park button to my program screen. I ran across references to that while I was researching M6 macros. Executing a macro from a screen button. Well, that is a task for another day.
    ... later.

    So much for my simple elegant solution:

    I am having some problems getting my mind wrapped around the tool offsets and the tool table. It seems simple, but doesn't seem to work for me. I am abandoning the G43 H(x) stuff for now.

    Just going with this for now:

    Code "m9"
    Code "m5"
    Code "g28"
    Code "m1"

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Ignoring tool change
    By dudz in forum Machine Discussion
    Replies: 6
    Last Post: 15-02-2014, 06:34 PM
  2. Machine tool transporters that will move machines into position
    By komatias in forum Marketplace Discussion
    Replies: 6
    Last Post: 09-08-2013, 07:27 AM
  3. New CNC Router Setup Tool For Use With Mach3
    By CambiumMachines in forum Manufacturer News
    Replies: 3
    Last Post: 08-06-2012, 04:14 AM
  4. XYZ Centurian 450 VMC tools sticking during tool change (M06)
    By craftydonkey in forum Milling Machines, Builds & Conversions
    Replies: 0
    Last Post: 19-10-2011, 03:11 PM
  5. WANTED: Tool holders for T2 (I think) quick change toolpost
    By Jonathan in forum Items Wanted
    Replies: 22
    Last Post: 07-05-2011, 10:30 AM

Bookmarks

Posting Permissions

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