G43.1 Dynamic Tool Length Measurement - Program Exceeds machine maximum on axis

More
3 years 4 weeks ago #282034 by andypugh

Please Log in or Create an account to join the conversation.

More
3 years 4 weeks ago #282062 by andypugh
The behaviour can probably be explained by this sequence


The G-code extents are calculated at the point that the G-code program is loaded, using the tool-length data that was current at that point.

When the run button is pressed the system checks the G-code extents, unaware that the tool length might have changed.

In the scenario described, if you were to press the "cancel" button, reload the g-code and then press "run" again the calculation should be correct.

The "fix" here is wrong, apart from anything else it can only use the data from the last tool loaded, so can not be correct for any program with multiple tools used.

The max/min_extents_notool[] data already includes the effect of tool lenght offsets (it's the raw position of the spindle inside the axes, the version without the "notool" is the position of the tool tip inside the axes.)
The following user(s) said Thank You: +Jan+

Please Log in or Create an account to join the conversation.

More
3 years 1 week ago #283604 by +Jan+
I actually always get the message, regardless of whether the tool used in the program has already been measured or not. In addition, it is inconvenient if I always have to click away a dialog box, since I actually use a hardware start button that is not bound to the monitor.

Therefore, I changed today on good luck - I am no coder - a small thing at the code. Now limit violations of the Z-axis are ignored in the function. In X&Y the check still works. Since the tool length does not change exactly predictably with every tool change anyway, I can accept that I have to take a look at it myself.

Here the original definition (from an older 2.8 master version)
Code:
def run_warn():     warnings = []     if o.canon:         machine_limit_min, machine_limit_max = soft_limits()         for i in range(3): # Does not enforce angle limits             if not(s.axis_mask & (1<<i)): continue             if o.canon.min_extents_notool[i] < machine_limit_min[i]:                 warnings.append(_("Program exceeds machine minimum on axis %s")                     % "XYZABCUVW"[i])             if o.canon.max_extents_notool[i] > machine_limit_max[i]:                 warnings.append(_("Program exceeds machine maximum on axis %s")                     % "XYZABCUVW"[i])     if warnings:         text = "\n".join(warnings)         return int(root_window.tk.call("nf_dialog", ".error",             _("Program exceeds machine limits"),             text,             "warning",             1, _("Run Anyway"), _("Cancel")))     return 0

The only line I changed is this:
Code:
 for i in range(2): # check only for x & y violations

Best wishes

Jan

Please Log in or Create an account to join the conversation.

Time to create page: 0.336 seconds
Powered by Kunena Forum