Author Topic: Tool change blowing my mind !!!  (Read 16192 times)

Offline skray775

  • Storm Trooper
  • ***
  • Posts: 129
    • View Profile
    • FineScale 360
Tool change blowing my mind !!!
« on: October 16, 2011, 21:14:39 pm »
I need your help!

I have started using the Tormach TTS tooling and can not seem to get the M6 G43 H tool change to work correctly.

I have tried modifications to the post processor for Mach3 and tried setting the Mach3 M6start file and I have gotten close a few times but out of the 4 tools one always crashes.


What I want to do is simple...

1) Start with tool 1, and set the top of part to ZERO.
2) Press Cycle Start.
3) Have the machine call for the first cutting tool, in this case T2.
4) Then have the machine move to a set location like Machine 0,0,0 for the tool change.
5) The press Cycle start
6)  Have the machine rapid back to the X,Y, and the clearance plane of Z.
7) The machine should proceed from this point.


First question is how to do this?  In the post prossessor or in M6start in Mach3 or both?

If it would be the post processor please help me get it right... I have tried this one and
it wont work.

( clear tool height compensation )
G43 H0
( goto tool change position )
G0 Z0
{$comment} T{$tool.index} : {$tool.diameter} {$endcomment}
T{$tool.index} M6
( apply tool height compensation )
G43 H{$tool.index}


Thank you for the help, I am totaly confused at this point.







So I guess befor we go to far is this something I should be dealing with


Online lloydsp

  • CNC Jedi
  • *****
  • Posts: 8593
    • View Profile
Re: Tool change blowing my mind !!!
« Reply #1 on: October 16, 2011, 21:21:30 pm »
I'm not familiar with the Tormach system, but every other CNC system I've ever used automatically moves the spindle or the bed to the "tool change position" automatically. 

Is this the part that is failing, or is it the G43 command that is failing?

You might try just issuing a tool change without the G43 following, and see what happens.

Also, (FWIW), most machines will allow you to set tool length offsets in the controller's memory, so any time you select a tool with the M6 command, whatever saved TLO is associated with that tool takes effect as soon as you acknowlege the change.

LLoyd
"Pyro for Fun and Profit for More Than Fifty Years"

Offline gpw

  • Wookie
  • ****
  • Posts: 295
    • View Profile
Re: Tool change blowing my mind !!!
« Reply #2 on: October 16, 2011, 21:45:57 pm »
Dunno nuthin' about mach 3 or Tormach, but I found this...

http://www.syil.ca/education/tool-change

Looks like you may be missing a G49 to cancel the prior tool offset.


Offline kvom

  • CNC Jedi
  • *****
  • Posts: 1608
    • View Profile
Re: Tool change blowing my mind !!!
« Reply #3 on: October 16, 2011, 22:03:53 pm »
As said before, many mills will have a tool change position built in, so M6 will go there.  If they don't, you can jog to anywhere that's convenient.

Assuming T2 has the correct Z offset in the Mach3 table, and T1 has zero Z to the top of stock, then G43 H2 should set T2's offset correctly.  A way to test this is, after changing to T2, enter the G43 T2 in MDI.  the Z DRO should change by the amount that tools 1 and 2 Z offsets differ.

Offline skray775

  • Storm Trooper
  • ***
  • Posts: 129
    • View Profile
    • FineScale 360
Re: Tool change blowing my mind !!!
« Reply #4 on: October 16, 2011, 22:27:31 pm »
That is the guide I used to set up the tool table.   
My mill is home made converted round column machine.

The tool offsets are working if I change the tool number manually. 
Set tool 1 in the offset page, zero top of part, change tool to any of the others 2-4, and the offset
seems to be correct.... jog to top of part and all the tools are dead on.

It is when I try to call the tool offset from the post possessor that seems to make things go wild. Sometimes it to deep sometimes to shallow.

I have been trying things for 2 days and my mind hurts... 


Dunno nuthin' about mach 3 or Tormach, but I found this...

http://www.syil.ca/education/tool-change

Looks like you may be missing a G49 to cancel the prior tool offset.



Offline skray775

  • Storm Trooper
  • ***
  • Posts: 129
    • View Profile
    • FineScale 360
Re: Tool change blowing my mind !!!
« Reply #5 on: October 17, 2011, 03:08:17 am »
Well I got it to work !!!!    :o

I ended up scraping all the post possessor commands and staying with
a simple M6 call that is in the Mach3 PP's.

I then found this simple Script for a Automatic Manual Tool Change.

You need 2 files in your mills macro directory. Make sure your M6end.m1s
file is empty.  In Mach3 General Config set the tool change to AUTOMATIC.

=====================================

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

====================================

Here is a PDF explaining it all.  It is old and it shows Mach2 screens
but it works fine in Mach3.




Offline Bench_Top_Precision

  • Storm Trooper
  • ***
  • Posts: 127
    • View Profile
Re: Tool change blowing my mind !!!
« Reply #6 on: October 18, 2011, 09:23:50 am »
I believe there is a simpler way. I'm not sure if you have any experience with modifying screen sets but here's what I did on my lathe screen set. I added two UserDRO's 1200, 1201. These represent my tool change position and I can set them to whatever I want. Of course these are in machine coordinates.

Under my M6start macro I have the following

X = GetUserDRO (1200)
Z = GetUserDRO (1201)

code "G53G0 Z" & Z
While IsMoving
Wend
code "G53G0 X" & X

Now what this does is reads the values I have in each DRO and moves the machine accordingly.

You can do the same on a mill just use three UserDRO's. Then when you call a tool change just call it as M6T1 G43 H1, so it will run the M6Start macro and also set your tool offset.

The nice thing about doing it this way is like I said, you can make the tool change position anywhere you want and if you want to change it, it's very easy. For instance I have some jobs that are very quick cycles but my tool change position is pretty far away. I've knocked off seconds of cycle time just by moving my tool change position to a closer location. I know seconds doesn't seem like much but when you add it up over a large production run, it adds up.

Just make sure under your general configurations you have it set to 'Stop spindle, wait for cycle start' this will make the machine move to your tool change position and stay there until you press cycle start again.

Also make sure your M6End is empty. I was pulling my hair out for a couple days trying to figure out why my machine was doing erratic things after a tool change. Turns out it was the M6End macro.

If you need any help modifying your screen set or writing the macro let me know I would be glad to help.


Offline skray775

  • Storm Trooper
  • ***
  • Posts: 129
    • View Profile
    • FineScale 360
Re: Tool change blowing my mind !!!
« Reply #7 on: October 18, 2011, 23:47:35 pm »
Thank's BTP,

A poster on the CNCZone helped me refine the script for the M6start file.
This will get the Tool Change Postions in the Mach3 settings and move to
that position for the tool change then move back.

I have not fully tested it but it seems to work great.


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