Hello Guest it is April 19, 2024, 08:42:10 PM

Author Topic: Macro to modify Z soft limit based on tool offset  (Read 2423 times)

0 Members and 1 Guest are viewing this topic.

Macro to modify Z soft limit based on tool offset
« on: January 22, 2016, 03:59:37 PM »
Hi all-

I have added a bit of code to my tool change macro that updates the Z min soft limit based on the difference in tool length offsets between the old and new tools (SetOEMDRO(158, OffsetDiff). The goal is to avoid slamming my tools into the table.

This macro works perfectly in the sense that the Z min soft limit is updated correctly.

The problem is that Mach3 (.062 or .066) is not "aware" that the soft limit has been updated until a reset (pushing the reset button twice) is performed.

I have tried to incorporate a DoOEMButton(1021) into my macro (should mimic a reset button press). I actually tried two of these call separated by a sleep 100 command, but this does not work.

Does anyone know how to reset Mach3 from within a macro ?

Thx
Jake


Sent from my iPad using Tapatalk

Offline BR549

*
  •  6,965 6,965
    • View Profile
Re: Macro to modify Z soft limit based on tool offset
« Reply #1 on: January 22, 2016, 06:05:42 PM »
I don't think you can.   Why not just set it correctly then use Tool Length offsets in your Gcode G43/49 .

(;-) TP

Macro to modify Z soft limit based on tool offset
« Reply #2 on: January 22, 2016, 08:31:29 PM »
I want to prevent table hits if I mess up G-code.


Sent from my iPhone using Tapatalk
Macro to modify Z soft limit based on tool offset
« Reply #3 on: January 22, 2016, 08:36:13 PM »
I'm using g43 TLOs now and the softZ min needs to be changed for each tool- if set properly for a long tool, then a short tool can't get close to table. If set for short tool, then long tool could hit table. Does this make sense ??  Thx
Jk


Sent from my iPhone using Tapatalk
Macro to modify Z soft limit based on tool offset
« Reply #4 on: January 22, 2016, 08:47:00 PM »
By dynamically changing the softZ min as part of the m6tool change macro, I hope to have the Zmin set properly so the current tool can always get close to, but not hit the table.
Thx
Jk


Sent from my iPhone using Tapatalk