mirror of
https://github.com/sinseman44/PyCNC.git
synced 2026-04-20 18:48:11 +00:00
add G53
This commit is contained in:
@@ -19,7 +19,7 @@ perfect choice for easy development of this project.
|
||||
Video demo - [YouTube video](https://youtu.be/vcedo59raS4)
|
||||
|
||||
# Current command support
|
||||
G0, G1, G4, G20, G21, G28, G90, G91, G92, M2, M3, M5, M30
|
||||
G0, G1, G4, G20, G21, G28, G53, G90, G91, G92, M2, M3, M5, M30
|
||||
Commands can be easily added, see [gmachine.py](./cnc/gmachine.py) file.
|
||||
|
||||
# Config
|
||||
|
||||
@@ -124,13 +124,16 @@ class GMachine(object):
|
||||
self._convertCoordinates = 1.0
|
||||
elif c == 'G28': # home
|
||||
self.home()
|
||||
elif c == 'G53': # switch to machine coords
|
||||
self._local = Coordinates(0.0, 0.0, 0.0)
|
||||
elif c == 'G90': # switch to absolute coords
|
||||
self._absoluteCoordinates = True
|
||||
elif c == 'G91': # switch to relative coords
|
||||
self._absoluteCoordinates = False
|
||||
elif c == 'G92': # switch to local coords
|
||||
self._local = self._position - \
|
||||
gcode.coordinates(Coordinates(0.0, 0.0, 0.0), self._convertCoordinates)
|
||||
gcode.coordinates(Coordinates(0.0, 0.0, 0.0),
|
||||
self._convertCoordinates)
|
||||
elif c == 'M3': # spinle on
|
||||
self._spindle(spindle_rpm)
|
||||
elif c == 'M5': # spindle off
|
||||
|
||||
Reference in New Issue
Block a user