Hello Guest it is March 29, 2024, 03:06:37 AM

Author Topic: Warning - Mach3 Turn Tool Table Setup - Risk of Crash - Turn default xml  (Read 2878 times)

0 Members and 1 Guest are viewing this topic.

After I got a manual Tool changer, I was going to set it up and just with luck I avoided a major crash. But from the beginning: If you've a tool changer its a good idea to have a home switch too, so I configured Mach3 with these swiches and referenced my machine. According to the handbook version 1.84 I then selected my Master Tool as #1 and zeroed the axis. The first issue then is that the description in the handbook is wrong. For the next tool, if you push the "Touch X" button in the tool setup screen, the entry for the x offset in the tooltable is to the machine coordinates, not to the part coordinates. In a way, this makes actually sense: If you setup your machine and reference it, after entering the actual tool number the x coordinate is directly the radius of the workpiece. But, different from the handbook, the master tool also has that offset and not zero.

The Z axis is different as it really copies the offset to the work coordinates (which is 0 for the master tool) in the tool table.

The gravely issue are the default options in the turn xml file. If you have your tool table and switch between the tools, everything seems fine, the coordinates adjust and you can also work with manual G code input. The really bad surprise is if you type your G code in a file and let it run. Because it starts with an rapid move in a surprising direction. Why? Because the "Tool Selections Persistent" box is unchecked. So, even if you've everything set up correctly (right tool, part zero ...), it runs the program with Tool 0 - and that's of course very different from your actual tool. Luckily, because of the behaviour above, it has run in x+ direction, what was away from the workpiece.

After I checked that option, I tried tool change and the next problem arised. With the Option "Manual Tool Change - Press Cycle start" the program uses internally the M6 macros even if for example only a T0303 word is in the code. And this macro is by default the same as for the mill:

M6Start:
  tool = GetSelectedTool()
  SetCurrentTool( tool )

M6End:
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


I don't know what exactly happens, but if I pressed "Cycle Start" after the T word Toolchange the x axis runs rapidly in the minus direction until it hits the limit switch. And in this case, the DRO tells correctly something far in the minus. No idea to what position it wants to go. I emptied the M6End macro, and that fixed it. Perhaps because the SafeZ is not defined in Turn, who knows ...

Now, it seems to work correctly, but these are dangerous bugs because it's different than in the handbook and the default values are simply wrong (another was "Reversed Arcs in Front post" )
Re: Warning - Mach3 Turn Tool Table Setup - Risk of Crash - Turn default xml
« Reply #1 on: October 01, 2014, 04:05:27 PM »
Update: Part of the problem was using the g77/g78 macros with the tooltable active. Because these macros use the "T"  word for the taper, but Mach3 interprets them as tool change. T0 is tool 0 and/or taper 0.