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.88k stars 761 forks source link

Units change from inches to millimeters after stop button hit #2127

Closed balloonhotair closed 1 year ago

balloonhotair commented 1 year ago

Version

2.0.13

Hardware / Firmware

GRBL 1.1

What happened

If the machine is setup for inches and is running a file or a macro to move the tool and the stop button is hit the machine stops but the Units field on the State panel is set to Millimeters and the machine is now using millimeters. If you look at the console output you can see the G20 command getting executed as a result of the stop function. Looks like the stop command or the function to do the init is hard coded to always put the machine into millimeters.

How to reproduce

Put Units into Inches. Run a file or macro Hit the stop command Units flips to Millimeters

Operating System

RPI

Anything else

No response

balloonhotair commented 1 year ago

Also the machine is VEVOR CNC Router Machine, 4030 Engraver

breiler commented 1 year ago

What you are seeing is the response of the command $G, UGS does not send the G21.

>>> $G
[GC:G0 G54 G17 G21 G90 G94 M5 M9 T0 F0.0 S0]

You could have a look at the startup blocks in GRBL: https://github.com/gnea/grbl/wiki/Grbl-v1.1-Commands#n---view-startup-blocks

Closing as this is a duplicate of #1457