Hello Guest it is September 24, 2020, 11:50:08 AM

Author Topic: Mach 3 tool change problem.  (Read 1126 times)

0 Members and 1 Guest are viewing this topic.

Mach 3 tool change problem.
« on: April 23, 2018, 11:44:50 AM »
Hi everyone,
I posted this on the CNCZone forum as well, but thought this might be the best place for it after I posted it.  So sorry for the dup if you see it.
I am pretty new to CNCing, just to get that out of the way to start with. I have spent the last month getting to know the lingo and what does what, so please bare with me a little. I also apologize if this gets long, but I want to give everyone enough info to help. I have done a ton of searching with no luck, so you guys are my last hope. LOL Anyway, I have own a Bridgeport series 1 manual mill for sometime now and just recently picked up a CNC Master 4 axis knee mill (Bridgeport copy). It has the drives and motors upgraded to Gecko drives with a smooth stepper ethernet BOB. And I am using the current version of Mach3 (from what I can tell). I used Fusion 360 to build my part and do the CAM. I had someone with a lot of fusion experience help me with it so that should be good.

I have the Tormach TTS system for all of my tools. I have ref. home and then built my tool library with all my tool offsets. Everything seems fine there. I can put a tool in and zero it to G54 and change tools and use the mdi screen to go to g0g54g43h5z0 and it will go to z height correctly. And I have tried it with other tools just changing the "H" value to the correct tool and it will find g54z0 correctly on all tools. So I am pretty sure I have this part correctly done.

So my problem is I have an op that has 4 tool changes in it. All done in fusion360.

This is how I start things:
1. I ref home
2. I put my stock in and I zero g54. And I make sure the tool offset light is green under the offsets tab.
3. I load the gcode for my part.
4. I hit the cycle start and it asks for the first tool (tool 5). I put in the tool and hit cycle start again.
5. Everything is fine. It runs through the code and then stops. I hit cycle start again and it asks for the next tool (tool 2). I change the tool and hit cycle start again. The spindle will start up and then it goes up and hits my limit switch and tells me the emergency stop has hit and the machine stops. Uggg.

I have went into fusion and posted each tool change op as separate operations to make sure it was not that. Everything went fine and built the part as planned. But I want to make it do it all in one operation and it just stop and ask for tool changes. I have built a fixture for all of my parts and each stage zeros from the same point on the fixture for simplicity.

From what I can tell when it gets ready for a tool change the spindle just pulls up to home z0 and waits for a tool change. But after I change the tool and start back up it seems like something in the code forces the spindle to go higher. A couple of times right past the limit switch and I can hear the motor trying to break the machine. Not good at all.

So I basically carved down the code with just 1-2 gcodes to move the table and then let it ask for a tool change again. Just to make it faster so I can check everything out and get is sorted. I don't know if that is a good thing or not as I am just learning. But it seems ok and it does produce the same problem when asking for the next tool. So below is basically the start and end of each segment that asks for the tool change. I just carved out all the extra table movements to make it easier to read.

I am pretty much at a loss and I hope someone can help. Thanks for your time.



(1001)
(PUTTER BACK FULL OP)
(T2 D=0.25 CR=0. - ZMIN=0.1305 - FLAT END MILL)
(T3 D=0.1875 CR=0.0937 - ZMIN=0.1349 - BALL END MILL)
(T5 D=0.5 CR=0. - ZMIN=0.01 - FLAT END MILL)
(T9 D=0.125 CR=0.0625 - ZMIN=0.5267 - BALL END MILL)
G90 G94 G91.1 G40 G49 G17
G20
G28 G91 Z0.
G90


(ADAPTIVE1)
M5
M9
T5 M6
S5100 M3
G54
M7
G0 X1.1125 Y-5.5494
G43 Z1.5814 H5
Z1.0401
G1 Z0.9901 F30.6
X1.1126 Y-5.5491 Z0.9845
X1.1128 Y-5.5482 Z0.979
X1.0141 Z0.1851
G0 Z1.5814
G28 G91 Z0.
G90


(POCKET)
M5
M9
M1
T2 M6
S4000 M3
G54
M7
G0 X1.7155 Y-2.8753
G43 Z1.5814 H2
Z0.2951
G3 X1.8134 Y-2.6589 Z0.2821 I0.0489 J0.1082 F24.
X1.7155 Y-2.8753 Z0.2691 I-0.0489 J-0.1082
X1.8134 Y-2.6589 Z0.256 I0.0489 J0.1082
X1.7155 Y-2.8753 Z0.243 I-0.0489 J-0.1082
X1.7547 Z0.1522
X1.755 Z0.1561
G0 Z1.5814
G28 G91 Z0.
G90


(FILLETS)
M5
M9
M1
T9 M6
S5000 M3
G54
M8
G0 X2.0871 Y-4.7165
G43 Z1.5814 H9
Z1.0801
G1 Z1.0126 F10.
X2.0872 Y-4.7159 Z1.0087
X2.0875 Y-4.7142 Z1.0053
X2.0881 Y-4.7115 Z1.0025
X1.9431 Y-3.7734
X1.9574 Y-3.769
G0 Z1.044
Z1.5814
G28 G91 Z0.
G90


(LOWER FILLETS)
M5
M9
M1
T3 M6
S5093 M3
G54
M7
G0 X1.448 Y-4.7352
G43 Z1.5814 H3
Z0.5489
G1 Z0.1679 F20.
X1.4483 Y-4.7354 Z0.1642
X1.4493 Y-4.7359 Z0.1607
X1.606 Y-1.4528 Z0.1491
Y-1.4535 Z0.1541
G0 Z0.2143
Z1.5814


M9
G28 G91 Z0.
G28 X0. Y0.
M30

Offline TPS

*
  •  1,673 1,673
    • View Profile
Re: Mach 3 tool change problem.
« Reply #1 on: April 24, 2018, 01:42:05 AM »
for a first test have a look to your M6End macro, in Folder C:\Mach3\Macros\Your Profile Name.
try to comment the code out by using Rem at the start of each line.

anyway your code is sendig the z axis to 1.5814 after every toolchange.
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach 3 tool change problem.
« Reply #2 on: April 24, 2018, 09:27:10 AM »
TPS thanks for the reply.  I checked the M6End.m1s.  Here it is below.  I noticed that it sends it to 1.5814 also.  But according to the code all it does is return it to where it left off.  I would rather that not happen as after a tool change is normally goes to another location anyway.

I was also told that all my gcode should be negative numbers and it was wrong.  But I touch off g54 at the same spot on my soft jaw for all my OPs for production.  Which is actually about an inch below the work space.  Should this matter?

Is there a way to rewrite the M6start.m1s to make the behavior different?


M6END.m1s
REM The default script here moves the tool back to m6start if any movement has occured during the tool change..

x = GetToolChangeStart( 0 )
y = GetToolChangeStart( 1 )
z = GetToolChangeStart( 2 )
a = GetToolChangeStart( 3 )
b = GetToolChangeStart( 4 )
c = GetToolChangeStart( 5 )
if(IsSafeZ() = 1) Then
   SafeZ = GetSafeZ()
   if  SafeZ  > z then StraightTraverse x, y,SafeZ, a, b, c
      StraightFeed  x, y,  z  , a, b, c
else
Code"G00 X" & x & "Y" & y
end if



 

Thanks again.
« Last Edit: April 24, 2018, 09:28:49 AM by Siddhi »

Offline TPS

*
  •  1,673 1,673
    • View Profile
Re: Mach 3 tool change problem.
« Reply #3 on: April 24, 2018, 04:13:16 PM »
first Change your M6End code to:

REM The default script here moves the tool back to m6start if any movement has occured during the tool change..

REM x = GetToolChangeStart( 0 )
REM y = GetToolChangeStart( 1 )
REM z = GetToolChangeStart( 2 )
REM a = GetToolChangeStart( 3 )
REM b = GetToolChangeStart( 4 )
REM c = GetToolChangeStart( 5 )
REM if(IsSafeZ() = 1) Then
REM    SafeZ = GetSafeZ()
REM    if  SafeZ  > z then StraightTraverse x, y,SafeZ, a, b, c
REM       StraightFeed  x, y,  z  , a, b, c
REM else
REM Code"G00 X" & x & "Y" & y
REM end if


normaly you set your G54 Z Zero to the top of your workpiece, and work then with neative Z values to do the Job.

in the M6Start macro you can add code to get the Z axis to a Position where you can do your tool Change.

in M6End is only code needed if your cam does not bring back the Z-axis to a Position where it is needed after toolchange,
but your example G.code does this, so only one part of Software should o this (G-code or M6End macro), never both of them.



 
anything is possible, just try it.
if you find some mistakes, in my bad bavarian english,they are yours.
Re: Mach 3 tool change problem.
« Reply #4 on: April 25, 2018, 07:25:33 AM »
Thanks for all the help.  I did get everything working.  I had to do as you suggested and rem out everything in the M6end file and I also found someone with a custom M6Start file and I modified it to make mine work properly.