Hello Guest it is March 28, 2024, 10:10:49 AM

Author Topic: Lathe tool change problem  (Read 2786 times)

0 Members and 1 Guest are viewing this topic.

Offline mc

*
  •  382 382
    • View Profile
Lathe tool change problem
« on: January 14, 2013, 05:32:10 PM »
This problem has existed since I started using my lathe, but I managed to tweak the g-code to get around it, but having just hit the problem again tonight, I want to figure what is actually causing the problem.

When changing between tools in the g-code, if there is a large distance on the X-axis needing moved, lots of steps get lost/the stepper stalls.
Tool changes are fine as long as the x-axis distance needing moved after the tool change is minimal (or is combined with a long Z move).

For example, if the new tool offset is 80mm different, and needs a physical movement of say 2mm to get to the next commanded position things are fine, or if it needs to move 100mm in the Z and 80mm in the X, things are fine.
However, if the physical movement needed is say 50mm in the X alone (or combined with a few mm in the Z), the x-axis will stall.

It's as though Mach ignores the max speed of the X-axis for that first move after a tool change.
If the first move is combined with a long Z move, because the two are interpolated to move diagonally, things go fine.

I'm not sure if it's related to some setting (G0 moves never cause any problems, and I've even tried reducing the X-axis max speed when I first had the problem), a bug with the SmoothStepper, or something wrong with Mach.

Anybody got any suggestions?

Offline RICH

*
  • *
  •  7,427 7,427
    • View Profile
Re: Lathe tool change problem
« Reply #1 on: January 15, 2013, 06:37:18 AM »
mc,
Post you xml file and someone will have a look.
RICH

Offline mc

*
  •  382 382
    • View Profile
Re: Lathe tool change problem
« Reply #2 on: January 15, 2013, 11:26:24 AM »
xml is attached.

I had a few PM's with Hood last night, thinking I was doing something stupid in the g-code, until I remembered about this problem.
Last time I noticed it because I heard the stepper stall as I moved into position before starting the spindle, whereas this time I had the spindle running before the move, so I never heard/noticed the stepper stalling.
I know that to get around the problem, I can just add a move to the aproximate position I need for the next tool, but I'd like to solve the problem than continually have to work around it.

Here's a snippet of g-code that caused the problem last night
Code: [Select]
N270 M5
N280 G0 X125 Z100
N290 T0404 (ER Tool gang with 6.8mm drill in rear)
N300 M3
N310 ;M830 X0 Y0 Z-33.5 R2 Q3 W0.5 P0 D0 F100 I0 J0 L1
N320 M830 P310
N330 M5
N340 G0 Z10
N350 T0606 (2mm MDT)
N360 M3
N370 G0 X16
N380 G0 Z-31
N390 F50
N392 G1 X14.8
N394 G1 Z-32 X14
N400 G1 X0
N410 G0 X16
N420 M5
N430 G0 Z0
N440 M30

Line 340 to 430 were what I added last night to make use of a MDT tool to chamfer and part off.
Line 370 is where the problem occurs, because after the tool change, the x-axis has to move near full travel (about 80mm travel) to reach X16.
If T6 was commanded to X16, it would have to move 8mm (I run in diameter mode), so it's as if Mach tries to move that 80mm in the time it would take to move 8mm.
(X0 for T4 is just of home position, whereas X0 for T6 is nearly full opposite travel)

The DROs are updated to the new tool offsets as soon as the toolchange is called, so Mach, or at least the SS, knows where the tool is, but on the next move, Mach fails to allow extra time for any additional movement caused by the changed tool offsets.

The strange thing is, this problem never affects the Z-axis. I've got tool changes where the Z-offset is 100mm different, yet on the next move after a tool change, all the moves are spot on.

I'm currently running the latest stable SS plugin (15ogx I think), but not sure what version of Mach I have on the lathe computer.
Once I get this latest batch of parts run, I was going to try updating to the latest recommended versions.