I need help?! I tried GRBL setting $22=1 for Homing (I Enabled it) But for laser only X and Y are needed right?

I need help?! I tried GRBL setting $22=1 for Homing (I Enabled it) But for laser only X and Y are needed right?? But… when I activated it, Alarm 9 appeared. It said “No Limit Switch Detected” then I looked for the problem. I opened the “Config.h” file, then I read that the Homing was done from the Z-axis. My GRBL or my laser only needs X and Y. I changed the configuration (I deactivated the Homing Z section in VSCode then I saved it) Then I compiled it in Arduino nothing changed. Can anyone help me? I checked the wiring and everything was fine. I used the NC (Normaly Closed) limit switch and then at $5=1 then I checked the “?” on the console and the comment “PN : X” or “PN : Y” worked Normally when I pressed it. This also applies to $21=1 (Hard Limit) when the stepper motor is running and I press the limit switch. The motor will stop and an alarm will appear. That means the switch is working normally, right?

Looks like you have the right idea. If Z-homing is enabled in the software, the Zaxis must Home first, then X&Y.

It is possible there is another reference to the Zaxis related to Homing. You may not have found it all.

Basically, if you have no Zaxis, then you have the wrong build of GRBL. Or the wrong controller board. Can you go back into GitHub and try again?

2 Likes

The easiest way would be to use LaserGRBL to flash the included firmware version, it has all changes already done. You don’t need to deactivate z in the config.h, you only need to change the homing sequence. Did you do that?

I recommend setting these:

#define HOMING_CYCLE_0 ((1<<X_AXIS)|(1<<Y_AXIS))  // Homes both X-Y in one cycle. 
#define N_HOMING_LOCATE_CYCLE 2 // improve repeatability
#define HOMING_FORCE_SET_ORIGIN // set the machine origin at the homed location
#define HOMING_SINGLE_AXIS_COMMANDS //Enables single axis homing commands. $HX, $HY, and $HZ for X, Y, and Z-axis homing.

The first line is the most important one you need to change. Make sure there is no other homing cycle enabled.

2 Likes

Previously I had changed the configuration (File "Config.h) in the Homing section, the first was the Homing Z section then followed by Homing X and Y. I’ve actually already flashed the XY Homing Firmware on the GRBL Laser. However… When I tried the PWM setting, the laser couldn’t be adjusted. The laser module could only fire a small amount of power.It was probably only outputting 5% of the power. Then I tried adjusting the potentiometer on top of the laser module, but it didn’t respond. I was sure it was broken, as the laser module was quite old… Lol… Well… For a while I wanted to try doing Homing but it couldn’t work at all. Even when I put the Limit Switch on the Z axis, it managed to do Homing,Then I pressed the limit switch, the Z-axis stepper stopped for a while, then I tried the X-axis (I didn’t have a stepper motor for the X-axis before, when I pressed it… “Homing Fail”)So it looks like I’ve followed your advice. But… I will try again

Maybe this will explain why a “Homing Fail”. I think you left out Step #3.

HOME

  1. Trolley and gantry rapid move towards the switches.
  2. When the switches are hit, the machine will stop and reverse. First Zaxis must complete, then X and Y. It may not reverse until both switches are found for X and Y.
  3. The machine will pull off the switches slowly until the switches open.
  4. The machine will reverse back onto the switches very slowly until the switches close.
  5. The machine will reverse and pull off the switches slowly until they open.
  6. The controller establishes this as the Home position. It is usually shown as something very close to 0,0 as the position if the controller is set for the first quadrant. If it shows large numbers, this can be changed with the G10 command.

There is no other version of the Home cycle. If you have limit switches, this is how it should work.

If you do not have limit switches, where it powers up is the Origin. Home is a machine mechanical function. Origin is a software design position. They are not the same thing.