LinuxCNC / linuxcnc

LinuxCNC controls CNC machines. It can drive milling machines, lathes, 3d printers, laser cutters, plasma cutters, robot arms, hexapods, and more.
http://linuxcnc.org/
GNU General Public License v2.0
1.73k stars 1.13k forks source link

Update interp_convert.cc: fix broken G52/G92 reset on M2/M30 #2921

Closed Sigma1912 closed 3 months ago

Sigma1912 commented 4 months ago

Current code does not reset G52/G92 offset to zero on M2/M30 this is contrary to RS274NGC standard (see Point1 below):

https://tsapps.nist.gov/publication/get_pdf.cfm?pub_id=823374

RS274NGC_m2

This does not change the behavior of automatic reactivation of G92 offsets on config startup when G92 was active on shutdown if 'DISABLE_G92_PERSISTENCE = 0' . For 'DISABLE_G92_PERSISTENCE = 1' the G92 offset values will be zero on startup regardless of the state at shutdown. This will also not zero G92 offsets after an ABORT event. This can be handled by the user with the ON_ABORT_COMMAND in the ini file.

Note: The inserted code is the same as is used for 'G92.2' in the same file: g92_code

Sigma1912 commented 3 months ago

I'll update the documentation once this has been merged

Sigma1912 commented 3 months ago

included this in my other PR