winder / Universal-G-Code-Sender

A cross-platform G-Code sender for GRBL, Smoothieware, TinyG and G2core.
http://winder.github.io/ugs_website/
GNU General Public License v3.0
1.89k stars 764 forks source link

Tool crash at the end of the job #2466

Open Lycowolf opened 7 months ago

Lycowolf commented 7 months ago

Version

2.1.4

Hardware / Firmware

GRBL 1.1

What happened

My g-code ends with the command G53 G00 Z-5. Instead of sending it to the controller as-is, UGS split it into 3 moves, all in WCS (see below). The original command would move the tool up, away from the work, but it went down and damaged the work. I suspect t might be related to autoleveling, as the coordinates are clearly modified by the probe data.

serial console:

>>> G01X12.3593Y26.1145Z-0.2855
ok
>>> G01X12.399Y26.1265Z-0.2857
ok
>>> G01X12.455Y26.1335Z-0.2859
>>> 
ok
>>> G0X12.455Y26.1335Z-1.9026
ok
>>> G0X12.455Y26.1335Z-3.5192
ok
>>> G0X12.455Y26.1335Z-5.1359

G-code:
G01 X12.35931 Y26.11447
G01 X12.39901 Y26.12654
G01 X12.45497 Y26.13352

G53 G00 Z-5.00000 (Retract to tool change height)

How to reproduce

No response

Operating System

Ubuntu 22.04, amd64

Anything else

No response

breiler commented 7 months ago

Ouch, sorry to hear this.

Yes you are correct. The G53 is a non modal command and should not be splitted up this way. It should probably not even be included in the autoleveling process. Thanks for letting us know.