gnea / grbl

An open source, embedded, high performance g-code-parser and CNC milling controller written in optimized C that will run on a straight Arduino
https://github.com/gnea/grbl/wiki
Other
3.99k stars 1.59k forks source link

Soft reset and WCO problem #1176

Closed Discorez closed 1 year ago

Discorez commented 1 year ago

The meaning is - Before starting work, I do a home search, put the spindle in the working zero position and zero all the axes. I get such a coordinate offset -150.563, -59.190, -73.740 And I remember these values ​​in variables. Then I run the program. When I need to abort the program, I send the "!" command, then delay 500 milliseconds to stop the machine, and then send a soft reset command (0x18). Since after the reset, the offset of the working coordinates is lost, I restore them from the variables. After that I see that the values ​​are wrong: -145.105, -53.930, -73.740 Because of this, the working zero is lost and you need to do a home search again. Why is this happening? How to do it right?

Discorez commented 1 year ago

Problem is solved, thanks.