Skip to content

Commit

Permalink
Added error messages for grblHAL vlachoudis#1428
Browse files Browse the repository at this point in the history
  • Loading branch information
Harvie committed Dec 27, 2020
1 parent 4fe624b commit b8c2c54
Showing 1 changed file with 36 additions and 10 deletions.
46 changes: 36 additions & 10 deletions bCNC/controllers/_GenericGRBL.py
Expand Up @@ -7,6 +7,7 @@
import time

# From https://github.com/grbl/grbl/wiki/Interfacing-with-Grbl
# and https://github.com/terjeio/grblHAL
ERROR_CODES = {
"Run" : _("bCNC is currently sending a gcode program to Grbl"),
"Idle" : _("Grbl is in idle state and waiting for user commands"),
Expand Down Expand Up @@ -56,16 +57,41 @@
"error:35" : _("A G2 or G3 arc, traced with the offset definition, is missing the IJK offset word in the selected plane to trace the arc."),
"error:36" : _("There are unused, leftover G-code words that aren't used by any command in the block."),
"error:37" : _("The G43.1 dynamic tool length offset command cannot apply an offset to an axis other than its configured axis. The Grbl default axis is the Z-axis."),

"ALARM:1" : _("Hard limit triggered. Machine position is likely lost due to sudden and immediate halt. Re-homing is highly recommended."),
"ALARM:2" : _("G-code motion target exceeds machine travel. Machine position safely retained. Alarm may be unlocked."),
"ALARM:3" : _("Reset while in motion. Grbl cannot guarantee position. Lost steps are likely. Re-homing is highly recommended."),
"ALARM:4" : _("Probe fail. The probe is not in the expected initial state before starting probe cycle, where G38.2 and G38.3 is not triggered and G38.4 and G38.5 is triggered."),
"ALARM:5" : _("Probe fail. Probe did not contact the workpiece within the programmed travel for G38.2 and G38.4."),
"ALARM:6" : _("Homing fail. Reset during active homing cycle."),
"ALARM:7" : _("Homing fail. Safety door was opened during active homing cycle."),
"ALARM:8" : _("Homing fail. Cycle failed to clear limit switch when pulling off. Try increasing pull-off setting or check wiring."),
"ALARM:9" : _("Homing fail. Could not find limit switch within search distance. Defined as 1.5 * max_travel on search and 5 * pulloff on locate phases."),
"error:38" : _("Tool number greater than max supported value or undefined tool selected. (grblHAL)"),
"error:39" : _("Value out of range. (grblHAL)"),
"error:40" : _("G-code command not allowed when tool change is pending. (grblHAL)"),
"error:41" : _("Spindle not running when motion commanded in CSS or spindle sync mode. (grblHAL)"),
"error:42" : _("Plane must be ZX for threading. (grblHAL)"),
"error:43" : _("Max. feed rate exceeded. (grblHAL)"),
"error:44" : _("RPM out of range. (grblHAL)"),
"error:45" : _("Only homing is allowed when a limit switch is engaged. (grblHAL)"),
"error:46" : _("Home machine to continue. (grblHAL)"),
"error:47" : _("ATC: current tool is not set. Set current tool with M61. (grblHAL)"),
"error:48" : _("Value word conflict. (grblHAL)"),
"error:50" : _("Emergency stop active. (grblHAL)"),
"error:59" : _("(grblHAL internal)"),
"error:60" : _("SD Card mount failed. (grblHAL bdring)"),
"error:61" : _("SD Card file open/read failed. (grblHAL bdring)"),
"error:62" : _("SD Card directory listing failed. (grblHAL bdring)"),
"error:63" : _("SD Card directory not found. (grblHAL bdring)"),
"error:64" : _("SD Card file empty. (grblHAL bdring)"),
"error:70" : _("Bluetooth initalisation failed. (grblHAL bdring)"),

"ALARM:1" : _("Hard limit triggered. Machine position is likely lost due to sudden and immediate halt. Re-homing is highly recommended."),
"ALARM:2" : _("G-code motion target exceeds machine travel. Machine position safely retained. Alarm may be unlocked."),
"ALARM:3" : _("Reset while in motion. Grbl cannot guarantee position. Lost steps are likely. Re-homing is highly recommended."),
"ALARM:4" : _("Probe fail. The probe is not in the expected initial state before starting probe cycle, where G38.2 and G38.3 is not triggered and G38.4 and G38.5 is triggered."),
"ALARM:5" : _("Probe fail. Probe did not contact the workpiece within the programmed travel for G38.2 and G38.4."),
"ALARM:6" : _("Homing fail. Reset during active homing cycle."),
"ALARM:7" : _("Homing fail. Safety door was opened during active homing cycle."),
"ALARM:8" : _("Homing fail. Cycle failed to clear limit switch when pulling off. Try increasing pull-off setting or check wiring."),
"ALARM:9" : _("Homing fail. Could not find limit switch within search distance. Defined as 1.5 * max_travel on search and 5 * pulloff on locate phases."),
"ALARM:10" : _("EStop asserted. Clear and reset (grblHAL)"),
"ALARM:11" : _("Homing required. Execute homing command ($H) to continue. (grblHAL)"),
"ALARM:12" : _("Limit switch engaged. Clear before continuing. (grblHAL)"),
"ALARM:13" : _("Probe protection triggered. Clear before continuing. (grblHAL)"),
"ALARM:14" : _("Spindle at speed timeout. Clear before continuing. (grblHAL)"),
"ALARM:15" : _("Homing fail. Could not find second limit switch for auto squared axis within search distances. Try increasing max travel, decreasing pull-off distance, or check wiring. (grblHAL)"),

"Hold:0" : _("Hold complete. Ready to resume."),
"Hold:1" : _("Hold in-progress. Reset will throw an alarm."),
Expand Down

0 comments on commit b8c2c54

Please sign in to comment.