I’m trying to insert homing function on my CNC machine, but when give command $H it appears:
“An unexpected error was detected: (ALARM:1) Hard limit has been triggered. Machine position is likely lost due to sudden halt. Re-homing is highly recommended. [MSG:Reset to continue]”
I inserted the ceramic capacitors between the signal pin and GND of the limit switches. Something interesting is that if it were noisy, probably during gcode compilation the limit switches would be activated, and they are only activated when homing ($H).
GRBL settings and limit switch diagram:
Grbl 1.1h [‘$’ for help]
$0 = 10 (Step pulse time, microseconds)
$1 = 25 (Step idle delay, milliseconds)
$2 = 0 (Step pulse invert, mask)
$3 = 2 (Step direction invert, mask)
$4 = 0 (Invert step enable pin, boolean)
$5 = 1 (Invert limit pins, boolean)
$6 = 0 (Invert probe pin, boolean)
$10 = 2 (Status report options, mask)
$11 = 0.010 (Junction deviation, millimeters)
$12 = 0.002 (Arc tolerance, millimeters)
$13 = 0 (Report in inches, boolean)
$20 = 0 (Soft limits enable, boolean)
$21 = 1 (Hard limits enable, boolean)
$22 = 1 (Homing cycle enable, boolean)
$23 = 2 (Homing direction invert, mask)
$24 = 25.000 (Homing locate feed rate, mm/min)
$25 = 500.000 (Homing search seek rate, mm/min)
$26 = 244 (Homing switch debounce delay, milliseconds)
$27 = 20.000 (Homing switch pull-off distance, millimeters)
$30 = 1000 (Maximum spindle speed, RPM)
$31 = 0 (Minimum spindle speed, RPM)
$32 = 0 (Laser-mode enable, boolean)
$100 = 75.000 (X-axis travel resolution, step/mm)
$101 = 80.000 (Y-axis travel resolution, step/mm)
$102 = 250.000 (Z-axis travel resolution, step/mm)
$110 = 2500.000 (X-axis maximum rate, mm/min)
$111 = 2500.000 (Y-axis maximum rate, mm/min)
$112 = 150.000 (Z-axis maximum rate, mm/min)
$120 = 30.000 (X-axis acceleration, mm/sec^2)
$121 = 30.000 (Y-axis acceleration, mm/sec^2)
$122 = 2.000 (Z-axis acceleration, mm/sec^2)
$130 = 300.000 (X-axis maximum travel, millimeters)
$131 = 300.000 (Y-axis maximum travel, millimeters)
$132 = 20.000 (Z-axis maximum travel, millimeters)
Detail: I disabled Z axis homing, my CNC is a COREXY.