Hello Guest it is April 25, 2024, 03:09:19 PM

Author Topic: Doing deadly unexplained rapid moves after Manual Tool Change  (Read 1806 times)

0 Members and 1 Guest are viewing this topic.

Doing deadly unexplained rapid moves after Manual Tool Change
« on: August 09, 2021, 11:09:31 PM »
So, I just finished upgrading to a Ethernet SmoothStepper from a PMDX dongle and everything is working fine except my basic manual M6. Using Mach4 Hobby version 4.2.0.4612 with ESS 275. I just copied the old M6 macro from my profile that I was using before (which I think is just the standard one that comes with Mach4...no fancy mods).

I ran 2 programs tonight that each have 2 tools:

1st program: Tool 1 paths all work perfect > Machine pauses and moves up for MTC > Changed tool and zero'd Z > Hit resume and Mach 4 move some in X and Y and then RAPID MOVED down to Z=-25mm or so! It drilled the 4mm shank of a 0.5mm engraving tool through a 2mm piece of aluminum. Pretty impressive really. There is no Rapid Z-25 in my code... So what was this?

2nd program: Tool 1 paths all work perfect > Machine pauses and moves up for MTC> Changed tool and zero'd Z > hit resume and Mach4 rapided X and Y all the way to crash into the X limit switch and the machine stops. Again there is not this motion in my code.

Any idea what the hell is going on here? I'd like to not destroy any more $30 engraving tools :D.
« Last Edit: August 09, 2021, 11:18:13 PM by devinw »
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #1 on: August 10, 2021, 03:21:00 AM »
I would check your modals and see which gcode is active after the toolchange. Maybe it's staying in G00?
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #2 on: August 10, 2021, 07:01:31 AM »
Is there a G28 or G30 in your macro?
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #3 on: August 10, 2021, 12:02:39 PM »
Thanks for the replies ya'll! I just checked and indeed the M6s are exactly the same between my old PMDX profile and my new ESS one. Screenshots attached.

SwiftyJ, pardon me but what do you mean my modals? Sorry, I'm still far from a power user in mach4 :D.

Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #4 on: August 11, 2021, 06:39:32 AM »
At the bottom of the screen it lists all the modal g-codes that are active. I have circled 'G1' in the image below. Check to see if 'G0' is active before resuming, this would mean the next move would be a rapid unless something other than G0 is on the next line of gcode.

Are there additional scripts that are run to move the machine to tool change position and zero the z?
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #5 on: August 11, 2021, 12:31:27 PM »
At the bottom of the screen it lists all the modal g-codes that are active. I have circled 'G1' in the image below. Check to see if 'G0' is active before resuming, this would mean the next move would be a rapid unless something other than G0 is on the next line of gcode.

Are there additional scripts that are run to move the machine to tool change position and zero the z?

OK, I will check this. Thanks.

And no, no additional scripts. It's a very basic setup. I wonder if the "remembered" Z position is messed up somehow and Mach is moving to it after the tool change for some reason?

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #6 on: August 11, 2021, 01:56:25 PM »
The problem might be the tool table.
If your gcode has tool numbers and heights the tools will have the heights associated with what is in the tool table.
If your code does not include populating the tool table that might be the problem.

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #7 on: August 11, 2021, 02:13:42 PM »
You also might want to try putting ToolSetCurrent before ToolChangeManual
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #8 on: August 11, 2021, 02:31:02 PM »
The problem might be the tool table.
If your gcode has tool numbers and heights the tools will have the heights associated with what is in the tool table.
If your code does not include populating the tool table that might be the problem.

Tool table looks to be all 0s from what I can see.. Attached is the code that ran the X into  - and hit the limit after the M6 to T2 and hitting resume.

I'm becoming pretty sure this has to be something with Mach4 because I'm looking side by side with some code with an MTC that I ran prior to switching to the ESS and upgrading Mach4 to this build and I don't see any extra lines of code around the tool change that looks suspect.

Offline Bill_O

*
  •  563 563
    • View Profile
Re: Doing deadly unexplained rapid moves after Manual Tool Change
« Reply #9 on: August 11, 2021, 02:53:25 PM »
Well the X is going to a negative position after the second tool.
Do you actually have room in the negative area before hitting the limit?