Hello Guest it is August 23, 2019, 01:19:17 AM

Author Topic: Help with tool changes  (Read 4722 times)

0 Members and 1 Guest are viewing this topic.

Offline SWATH

*
  •  48 48
    • View Profile
Help with tool changes
« on: March 21, 2011, 01:39:21 AM »
Hello,
I'm a new Mach user so I don't know much but I'm in the process of customizing some things and I don't know how to do it.

Here is what I want to happen:

When Mach encounters an M06 for tool change I want the Z to move up to either the home switch/limit switch/or a predefined machine coordinate high in the Z but I want X and Y to not change.  I would also like a pop up window to display a message with the details of the requested tool (i.e. "Please load tool #3 .5 flat endmill", or "Please load tool #4 3.15 45deg facemill", etc.) and possibly even a photo image of it and a beep or a .wav saying "please load new tool" or something.  I would also like to put a "go to tool change location" button on the program screen that executes this action.


As an aside, how do you control tool #0?  I would like to use T0 for the indicator reference tool but I can't figure out how to use the T0 so I have it as T1.

Thanks for the help
« Last Edit: March 21, 2011, 01:56:44 AM by SWATH »

Offline Hood

*
  •  25,849 25,849
  • Carnoustie, Scotland
    • View Profile
Re: Help with tool changes
« Reply #1 on: March 21, 2011, 06:55:48 AM »
You would have to enable the Auto Changer option and then write some VB for the M6 macro to do what you want it to do.
Hood

Offline SWATH

*
  •  48 48
    • View Profile
Re: Help with tool changes
« Reply #2 on: March 21, 2011, 09:17:00 PM »
Thanks that is what I figured.  Here is what I got to get the z to where I specify on the tool change location DRO.

Z = GetUserDRO( 1202)

code" G53G0 Z" & Z

and I saved it in the M6start.m1s

the problem is that is doesn't stop and wait for the cycle start button to be pushed, it just hits the Z location then proceeds with the program.  What's next?

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Help with tool changes
« Reply #3 on: March 21, 2011, 09:46:34 PM »
In general config, check "Stop spindle, wait for Cycle Start". This runs the M6 start, then waits for cycle start, then runs m6 end, then continues with the program.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline SWATH

*
  •  48 48
    • View Profile
Re: Help with tool changes
« Reply #4 on: March 21, 2011, 10:21:12 PM »
Ahh that's perfect, thanks a lot.

So now it goes to Z home and waits for cycle start, so far so good.  Now I would like a pop up dialog box displaying the requested tool info.  I tried getting a dialog box which sort of worked but I couldn't get the tool info.

Something like:

Please change to Tool #4
3.15" 45deg Facemill and
then press cycle start.
           OK

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Help with tool changes
« Reply #5 on: March 21, 2011, 10:32:10 PM »
In the programmers manual, see the following:
GetCurrentTool
GetSelectedTool
GetToolParam
GetToolDesc

Put the info in a string and display it in a message box.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline SWATH

*
  •  48 48
    • View Profile
Re: Help with tool changes
« Reply #6 on: March 22, 2011, 01:31:55 AM »
Ok here is what I got so far:

Z = GetUserDRO( 1202)

code" G53G0 Z" & Z

NewTool = GetSelectedTool ()

SetCurrentTool (NewTool)

Message "Please Load Tool #" & GetCurrentTool () & Space (1) & GetToolDesc (GetCurrentTool () )

TNum = GetCurrentTool ()

TDec = GetToolDesc (GetcurrentTool ())

MachMsgTypeOK = 0

Ret = MachMsg ("Please Load Tool #" & GetCurrentTool () & Space (2) & GetToolDesc (GetCurrentTool ()), "Tool Change Rquired", MachMsgTypeOK)



I have a couple of questions I can't figure out. 

!.  How do you Bold text in a message box
2. How do you break a message into 2 lines in a message box?
3. How do you add an image to a message box?

Offline ger21

*
  • *
  •  6,288 6,288
    • View Profile
    • The CNC Woodworker
Re: Help with tool changes
« Reply #7 on: March 22, 2011, 06:57:59 AM »
1) You can't
2) add a carriage return, don't know it off the top of my head though.
3) You can't, I don't think. You can get different symbols to display. I think the info is in the cypress manual.
Gerry

2010 Screenset
http://www.thecncwoodworker.com/2010.html

JointCAM Dovetail and Box Joint software
http://www.g-forcecnc.com/jointcam.html

Offline SWATH

*
  •  48 48
    • View Profile
Re: Help with tool changes
« Reply #8 on: March 22, 2011, 11:49:36 AM »
Ok I got the new line done.  It is disappointing not to be able to insert an image into the text box somehow, there has got to be a work around.

Anyway how do you edit tool #0?  It's there but I can't do anything with it?

Offline SWATH

*
  •  48 48
    • View Profile
Re: Help with tool changes
« Reply #9 on: March 22, 2011, 11:41:45 PM »
OK I now have a problem.  The above script works perfectly on my laptop.  However when I run it on my machine computer it does not get the new tool specified in the Gcode it just asks for whatever the current tool is regardless of what the T() is.  What is going on here and how can I fix it?